Write program to find a file size which can be read


Assignment Task: Measurement

When measuring things it helps if they run for "reasonable" time. It is hard to measure things that run too fast as you need high-precision clocks and a lot of other things can affect the measurement. It is also annoying to wait for a long time for an experiment, especially if you have to do many experiments. For this reason you should make sure that your experiments take "reasonable" time. I recommend something between 5 and 15 seconds.

Write program to find a file size which can be read in "reasonable" time.

  • Input: block size
  • Output: file size

Hint: You can start with a small file size and use your program from (1) above to read it and measure the time it takes. You can keep doubling your file size until you get between 5 and 15 seconds.

How to run : ./run2

Expected Output: Given the file and block_size output the block_count for which the time taken is between 5 and 15. The output for this case should be the XOR value, the file size for which the read time is between 5 and 15 sec, and the performance of reading the file in MiB/s or bytes/sec.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write program to find a file size which can be read
Reference No:- TGS03286463

Expected delivery within 24 Hours