This is an old revision of the document!


05. [20p] Multitool Comparison

Now we will see in a slightly different approach, with a source file and a final file of the same size, how the I/O mechanisms work as they are implemented by the compiler to be optimized.

Modify the script so that it reads one line at a time from the file with the novel from the previous exercise, and writes it in a resulting file 500 times each. Follow the process with a classic tool (vmstat, iostat). Why most of the time the number of bytes read is 0?

TODO COSMIN: Aici pui un hidden script cu rezolvarea pt asistenti cum e la 4, in python o pui, verifica sa fie astfel incat sa tina linia in RAM.

[10p] Task A - Different tool, same I/O

For more special situations, a classic tool is not enough as long as we want to have a more detailed analysis on the behavior of I/O mechanisms. An example would be to create an infinite loop that copies endlessly (simulation of a demanding process for a long time) a large file (use one of the files obtained previously).

Put the command below in a script:

$ while true; do cp loadfile loadfile1; done

[10p] Task B - Plot of Comparison

ep/labs/03/contents/tasks/ex5.1596473387.txt.gz ยท Last modified: 2020/08/03 19:49 by cristian.marin0805
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0