A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is ms and to read a block from the disk is ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of MB.

The smallest cache size required to ensure an average read latency of less than ms is _________ MB.
View worked solution
Answer: 30
To find the smallest cache size required to ensure an average read latency of less than , we first formulate the average read latency equation.
Let:
- Latency to read from cache,
- Latency to read from disk,
- Miss rate of the cache =
Since the cost of checking the cache is and a disk access is required on a miss, the average read latency is given by:
We require :
From the given miss rate graph, we observe the miss rates for different cache sizes:
- At ,
- At ,
- At ,
The smallest cache size that achieves a miss rate is (which gives ).
Free practice · Your answers on this page are not saved.
