开发平台(Platform): (Ex: VC++, GCC, Linux, ...) 
  Linux Scientific 6.2 , GCC 4.4.6
额外使用到的函数库(Library Used): (Ex: OpenGL, ...) 
问题(Question):
  由于研究的关系我写了一个测试fwrite的小程式,每次写入51200Byte大小的binary资料
  ,程式码如下,结果显示大部分每次花0.1ms,但有时候会有100~200ms的出现,不知道
  这种现象造成的原因是什么? 如果需要长时间稳定写入时间,是否有其他方式可以处理?
程式码(Code):(请善用置底文网页, 记得排版) 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
int main(){
        FILE *time;
        FILE *test;
        float time_use=0;
        struct timeval start;
        struct timeval end;
        int size;
        int i=0;
        test=fopen("file.dat","wb");
        time=fopen("time1.txt","w");
        for(i=1;i<40000;i++){
                size=51200;
                unsigned char a[size];
                gettimeofday(&start,NULL);
                fwrite(a,sizeof(char),size,test);
                gettimeofday(&end,NULL);
        time_use=(end.tv_sec-start.tv_sec)*1000000+(end.tv_usec-start.tv_usec);
                fprintf(time,"size=%d\ttime=%f\n",size,time_use);
        }
        fclose(time);
        fclose(test);
        return 0;
}