Skip to content
Official PYQ · 2014

GATE CS 2014 Set 3 Q44 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI
The memory access time is 11 nanosecond for a read operation with a hit in cache, 55 nanoseconds for a read operation with a miss in cache, 22 nanoseconds for a write operation with a hit in cache and 1010 nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves 100100 instruction fetch operations, 6060 memory operand read operations and 4040 memory operand write operations. The cache hit-ratio is 0.90.9. The average memory access time (in nanoseconds) in executing the sequence of instructions is ______.
View worked solution

Answer: 1.68

To find the average memory access time (AMAT) for the given sequence of instructions, we first categorize the operations into Read and Write operations.

1. Categorizing the Operations

  • Instruction Fetch: This is a read operation.
    Number of instruction fetches = 100100
  • Memory Operand Read: This is a read operation.
    Number of operand reads = 6060
  • Memory Operand Write: This is a write operation.
    Number of operand writes = 4040

Thus, we have:

  • Total Read Operations (NRN_R): 100+60=160100 + 60 = 160
  • Total Write Operations (NWN_W): 4040
  • Total Operations (NtotalN_{\text{total}}): 160+40=200160 + 40 = 200

2. Calculating Average Access Times

Given the cache hit ratio (hh) is 0.90.9, the miss ratio (mm) is 1−0.9=0.11 - 0.9 = 0.1.

Average Read Access Time (TRT_{R}):

TR=(h×TR,hit)+(m×TR,miss)T_{R} = (h \times T_{R, \text{hit}}) + (m \times T_{R, \text{miss}}) TR=(0.9×1 ns)+(0.1×5 ns)=0.9+0.5=1.4 nsT_{R} = (0.9 \times 1\text{ ns}) + (0.1 \times 5\text{ ns}) = 0.9 + 0.5 = 1.4\text{ ns}

Average Write Access Time (TWT_{W}):

TW=(h×TW,hit)+(m×TW,miss)T_{W} = (h \times T_{W, \text{hit}}) + (m \times T_{W, \text{miss}}) TW=(0.9×2 ns)+(0.1×10 ns)=1.8+1.0=2.8 nsT_{W} = (0.9 \times 2\text{ ns}) + (0.1 \times 10\text{ ns}) = 1.8 + 1.0 = 2.8\text{ ns}

3. Calculating Overall Average Memory Access Time (AMAT)

AMAT=(NR×TR)+(NW×TW)Ntotal\text{AMAT} = \frac{(N_R \times T_{R}) + (N_W \times T_{W})}{N_{\text{total}}} AMAT=(160×1.4)+(40×2.8)200\text{AMAT} = \frac{(160 \times 1.4) + (40 \times 2.8)}{200} AMAT=224+112200=336200=1.68 ns\text{AMAT} = \frac{224 + 112}{200} = \frac{336}{200} = 1.68\text{ ns}

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Hierarchy: Cache, Main Memory and Secondary Storage questions