GateAI
Cache Memory and Hierarchy

GATE CSE 2017 Set 2 · Q45

NAT2 marksMedium

Time

The read access times and the hit ratios for different caches in a memory hierarchy are as given below. The read access time of main memory is 90 nanoseconds. Assume that the caches use the referred-word-first read policy and the write back policy. Assume that all the caches are direct mapped caches. Assume that the dirty bit is always 0 for all the blocks in the caches. In execution of a program, 60% of memory reads are for instruction fetch and 40% are for memory operand fetch. The average read access time in nanoseconds (up to 2 decimal places) is ________.

GATE CSE 2017 Set 2 Q45 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 4.72 (±0)

Cache Memory and Hierarchy

Given:

  • I-cache: access time TI=2 nsT_{I} = 2\text{ ns}, hit ratio hI=0.8h_I = 0.8

  • D-cache: access time TD=2 nsT_{D} = 2\text{ ns}, hit ratio hD=0.9h_D = 0.9

  • L2-cache: access time TL2=8 nsT_{L2} = 8\text{ ns}, hit ratio hL2=0.9h_{L2} = 0.9

  • Main memory access time TMM=90 nsT_{MM} = 90\text{ ns}

### 1. Instruction Fetch (60% of reads) Uses hierarchical access through I-cache →\to L2-cache →\to Main Memory:

Tinst=TI+(1−hI)×[TL2+(1−hL2)×TMM]=2+(1−0.8)×[8+(1−0.9)×90]=2+0.2×[8+9]=2+0.2×17=2+3.4=5.4 ns\begin{aligned} T_{\text{inst}} &= T_I + (1 - h_I) \times [T_{L2} + (1 - h_{L2}) \times T_{MM}] \\ &= 2 + (1 - 0.8) \times [8 + (1 - 0.9) \times 90] \\ &= 2 + 0.2 \times [8 + 9] \\ &= 2 + 0.2 \times 17 = 2 + 3.4 = 5.4\text{ ns} \end{aligned}

### 2. Data/Operand Fetch (40% of reads) Uses hierarchical access through D-cache →\to L2-cache →\to Main Memory:

Tdata=TD+(1−hD)×[TL2+(1−hL2)×TMM]=2+(1−0.9)×[8+(1−0.9)×90]=2+0.1×17=2+1.7=3.7 ns\begin{aligned} T_{\text{data}} &= T_D + (1 - h_D) \times [T_{L2} + (1 - h_{L2}) \times T_{MM}] \\ &= 2 + (1 - 0.9) \times [8 + (1 - 0.9) \times 90] \\ &= 2 + 0.1 \times 17 = 2 + 1.7 = 3.7\text{ ns} \end{aligned}

### 3. Average Read Access Time

Tavg=0.60×Tinst+0.40×Tdata=0.60×5.4+0.40×3.7=3.24+1.48=4.72 ns\begin{aligned} T_{\text{avg}} &= 0.60 \times T_{\text{inst}} + 0.40 \times T_{\text{data}} \\ &= 0.60 \times 5.4 + 0.40 \times 3.7 \\ &= 3.24 + 1.48 = 4.72\text{ ns} \end{aligned}

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 Cache Memory and Hierarchy previous year question is Q45 of the GATE CSE 2017 Set 2 paper. Find more GATE CSE PYQs on Cache Memory and Hierarchy in Computer Organization and Architecture, 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 Cache Memory and Hierarchy 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.

Cache Memory and Hierarchy in GATE CSE

Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 16 of them are 2-mark NAT questions like this one, and GATE CSE 2017 Set 2 has 3.

How GATE tests Cache Memory and Hierarchy

More from GATE CSE 2017 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2017 Set 2 · Q45 · NAT

The read access times and the hit ratios for different caches in a memory hierarchy are as given below. The read access time of main memory is 90 nanoseconds. Assume that the caches use the referred-word-first read policy and the write back policy. Assume that all the caches are direct mapped caches. Assume that the dirty bit is always 0 for all the blocks in the caches. In execution of a program, 60% of memory reads are for instruction fetch and 40% are for memory operand fetch. The average read access time in nanoseconds (up to 2 decimal places) is …

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.