Question: . Write a small C program that copies data from a file A to a file B byte - by - byte. For different file

. Write a small C program that copies data from a file A to a file B byte-by-byte. For different file sizes 1MB 128MB (doubling the file size in each step), record the time your program requires to complete the file copy when using read() and write() system calls. Generate a graph that depicts the program performance. Use the Unix time(1) command.
b. Repeat this experiment, but instead of copying individual bytes, use larger size portions of the file that are copied in each read() and write() system call. For instance, you may choose to copy the file in chunks of 2,4,8,...,1024 byte units. Use a 128MB file for each test. Generate a performance graph of transfer size vs execution time and interpret your experimental results.
What do you observe? Why do you think the system shows the observed behavior?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!