Characterize and compare the performance of file I/O by implementing reading and writing of files through the following three methods:
· I/O through system calls read and write
· Memory mapped I/O through mmap
· Buffered I/O through read and write
You should implement a program that can either read or write blocks of a given size from a large file. The user should be able to specify the I/O method to use for reading and writing. For example, writing blocks of 1K through system calls (the first method above) may be done as follows:
iotest --method=syscall --blocksize=1024 --operation=write
Use your program to measure the read and write I/O performance achieved through the three methods for various block sizes. What can you deduce from your observations?
How do I start solving this?