Question description
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 program’s 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