CSE 40771 - Distributed Systems - Spring 2023
Start by following the general instructions for assignments to set up your Python environment appropiately.
The first assignment will be a warm up in which you conduct a careful measurement of the costs of basic operations in distributed systems. To that end, write a series of small Python programs that measure the time to do the following things on the student machines:
/tmp
scandir
to iterate over all the items in your home directory and stat
each one to measure its size.ls -l
as a subprocess to accomplish the same thing.Of course, there is little value in measuring a single one of these items, one of which may be faster than the resolution of the clock. So, measure how long it takes a number of items in a loop, such that the loop takes about five seconds. (You will have to experiment with the proper number of loop iterations for each test, since the times will vary widely.)
Each test program should run without arguments, carry out its measurement silently, and then report the elapsed time, number of operations, and average time per operation.
Then, run each test program ten times, so that you have ten average measurements for each operation. Make note of the fastest and slowest averages out of each ten.
Turn in each of your Python programs, naming them Test1.py
, Test2.py
, … corresponding to the numbering above. Also turn in a concise lab report written in plain text called REPORT
that indicates:
See the general instructions for how to turn in your materials.