GateAI
Cache Memory and Hierarchy

GATE CSE 2017 Set 2 · Q29

MCQ2 marksMedium

Time

In a two-level cache system, the access times of L1L_1 and L2L_2 caches are 1 and 8 clock cycles, respectively. The miss penalty from the L2L_2 cache to main memory is 18 clock cycles. The miss rate of L1L_1 cache is twice that of L2L_2. The average memory access time (AMAT) of this cache system is 2 cycles. The miss rates of L1L_1 and L2L_2 respectively are:

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) 0.111 and 0.056

Cache Memory and Hierarchy

Given parameters:

  • L1L_1 cache access time, tL1=1t_{L1} = 1 cycle

  • L2L_2 cache access time, tL2=8t_{L2} = 8 cycles

  • Miss penalty from L2L_2 to main memory, PL2=18P_{L2} = 18 cycles

  • AMAT=2\text{AMAT} = 2 cycles

  • Miss rate relation: m1=2m2  ⟹  m2=m12m_1 = 2 m_2 \implies m_2 = \frac{m_1}{2}

The formula for Average Memory Access Time (AMAT) for a two-level hierarchical cache system is:

AMAT=tL1+m1×(tL2+m2×PL2)\text{AMAT} = t_{L1} + m_1 \times (t_{L2} + m_2 \times P_{L2})

Substitute the given values:

2=1+m1×(8+m12×18)2 = 1 + m_1 \times \left(8 + \frac{m_1}{2} \times 18\right)
1=m1(8+9m1)1 = m_1 (8 + 9m_1)
9m12+8m1−1=09m_1^2 + 8m_1 - 1 = 0

Factorize the quadratic equation:

(9m1−1)(m1+1)=0(9m_1 - 1)(m_1 + 1) = 0

Since a miss rate must be positive (m1>0m_1 > 0):

m1=19≈0.111m_1 = \frac{1}{9} \approx 0.111
m2=m12=118≈0.056m_2 = \frac{m_1}{2} = \frac{1}{18} \approx 0.056

Thus, the miss rates of L1L_1 and L2L_2 are 0.111 and 0.056 respectively, matching Option (A).

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 Q29 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 MCQs 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 · Q29 · MCQ

In a two-level cache system, the access times of L1 and L2 caches are 1 and 8 clock cycles, respectively. The miss penalty from the L2 cache to main memory is 18 clock cycles. The miss rate of L1 cache is twice that of L2. The average memory access time (AMAT) of this cache system is 2 cycles. The miss rates of L1 and L2 respectively are:

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.