A file server uses caching, and achieves a hit rate of 80%. File operations in the server cost 5 ms
of CPU time when the server finds the requested block in the cache, and take an additional 15 ms
of disk I/O time otherwise. Explaining any assumptions you make, estimate the server’s
throughput capacity (average requests/sec) if it is:
i) single-threaded;
ii) two-threaded, running on a single processor;
iii) two-threaded, running on a two-processor computer.
What will be an ideal response?
80% of accesses cost 5 ms; 20% of accesses cost 20 ms.
average request time is 0.8*5+.2*20 = 4+4=8ms.
i) single-threaded: rate is 1000/8 = 125 reqs/sec
ii) two-threaded: serving 4 cached and 1 uncached requests takes 25 ms. (overlap I/O with computation).
Therefore throughput becomes 1 request in 5 ms. on average, = 200 reqs/sec
iii) two-threaded, 2 CPUs: Processors can serve 2 rqsts in 5 ms => 400 reqs/sec. But disk can serve the 20%
of requests at only 1000/15 reqs/sec (assume disk rqsts serialised). This implies a total rate of 5*1000/15 = 333
requests/sec (which the two CPUs can service).
Computer Science & Information Technology