April 2014
Beginner
534 pages
14h 4m
English
Let’s introduce the problems of the buffer block selection and the use of request through a set of cases of multiprocess operating files. The situations of the three processes are as follows. Process A is a write process in order to write characters “ABCDE” in str1[] to the file hello1.txt. The code is as follows:
void FunA();void main(){ ...... FunA(); ......}void FunA(){ char str1[] = "ABCDE"; int i; //open the file int fd = open("/mnt/user/user1/user2/hello1.txt", O_RDWR,0644)); for(i=0;i<1000000;i++) { //write the file write(fd,str1,strlen(str1)); ...
Read now
Unlock full access