Question: Write a small program that copies data from a file A to a file B. For different file sizes 1KB 100MB (doubling the file size

Write a small program that copies data from a file A to a file B. For different file sizes 1KB 100MB (doubling the file size in each step) record the time your program requires to complete the copy when using read() and write() system calls for each byte that is being copied. Generate a graph that depicts the program performance. Briefly describe what you observe and investigate if you can improve the programs performance. For this program it is imperative that file A and file B are located on the local disk. On Linux, the \tmp directory is located on the local file system. After completing the assignment with the read/write system calls, use the C Library functions fread() and fwrite() as replacements. Include the performance using these functions in your graph, and discuss the differences (if any) you observe. Speculate on the reason for any differences. For submission,

a. Provide your source code in a file named copying.cpp

b. Provide your graph in a file named copying.jpg

c. Provide your description in a file named copying.txt

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!