GateAI
File Systems

GATE CSE 2016 Set 2 · Q50

NAT2 marksMedium

Time

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 1 ms and to read a block from the disk is 10 ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10 MB. The smallest cache size required to ensure an average read latency of less than 6 ms is ________ MB.

GATE CSE 2016 Set 2 Q50 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 30

File Systems

Let mm be the miss rate of the cache, and h=1−mh = 1 - m be the hit rate.

The average read latency TavgT_{\text{avg}} is given by:

Tavg=(1−m)×Tcache+m×TdiskT_{\text{avg}} = (1 - m) \times T_{\text{cache}} + m \times T_{\text{disk}}

Given:

  • Tcache=1 msT_{\text{cache}} = 1\text{ ms}

  • Tdisk=10 msT_{\text{disk}} = 10\text{ ms}

  • Desired Tavg<6 msT_{\text{avg}} < 6\text{ ms}

Substitute the values into the inequality:

(1−m)×1+m×10<6(1 - m) \times 1 + m \times 10 < 6
1−m+10m<61 - m + 10m < 6
1+9m<61 + 9m < 6
9m<5  ⟹  m<59≈55.56%9m < 5 \implies m < \frac{5}{9} \approx 55.56\%

From the given miss rate graph:

  • For cache size =10 MB= 10\text{ MB}, miss rate =80%= 80\%

  • For cache size =20 MB= 20\text{ MB}, miss rate =60%= 60\%

  • For cache size =30 MB= 30\text{ MB}, miss rate =40%= 40\%

  • For cache size =40 MB= 40\text{ MB}, miss rate =35%= 35\%

For Tavg<6 msT_{\text{avg}} < 6\text{ ms}, we require m<55.56%m < 55.56\%.

  • At 20 MB20\text{ MB}, m=60%>55.56%m = 60\% > 55.56\% (Tavg=0.4(1)+0.6(10)=6.4 msT_{\text{avg}} = 0.4(1) + 0.6(10) = 6.4\text{ ms}).

  • At 30 MB30\text{ MB}, m=40%<55.56%m = 40\% < 55.56\% (Tavg=0.6(1)+0.4(10)=4.6 msT_{\text{avg}} = 0.6(1) + 0.4(10) = 4.6\text{ ms}).

Thus, the smallest available cache size meeting the requirement is 30 MB.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This File Systems previous year question is Q50 of the GATE CSE 2016 Set 2 paper. Find more GATE CSE PYQs on File Systems in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related File Systems PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

File Systems in GATE CSE

File Systems has 14 GATE CSE PYQs across 14 papers from 2011 to 2026. 7 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2016 Set 2.

How GATE tests File Systems

More from GATE CSE 2016 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2016 Set 2 · Q50 · NAT

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 1 ms and to read a block from the disk is 10 ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10 MB. The smallest cache size required to ensure an average read latency of less than 6 ms is … MB.

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.