Cache Memory · Computer Organization and Architecture
68 questions · asked in 25 of 27 years (2000–2026)
MCQ 44 · MSQ 4 · NAT 201-mark 30 · 2-mark 38
2000Questions per year2026
Questions 16–20 of 68
Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements.
S1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2
S2: Write allocate policy must be used in conjunction with write through caches and no-write allocate policy is used with writeback caches.
Which of the following statements is correct?
S1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2
S2: Write allocate policy must be used in conjunction with write through caches and no-write allocate policy is used with writeback caches.
Which of the following statements is correct?
Answer: (A)
Let us check each statement.
- S1: an L1 cache that is write-through never holds dirty lines, because every write already goes to L2. So a read miss never writes back a dirty line TRUE.
- S2: the usual pairing is the opposite. Write-allocate goes with write-back, and no-write-allocate goes with write-through. Neither pairing is mandatory FALSE.
Answer: S1 is true and S2 is false
- S1: an L1 cache that is write-through never holds dirty lines, because every write already goes to L2. So a read miss never writes back a dirty line TRUE.
- S2: the usual pairing is the opposite. Write-allocate goes with write-back, and no-write-allocate goes with write-through. Neither pairing is mandatory FALSE.
Answer: S1 is true and S2 is false
A direct mapped cache memory of 1 MB has a block size of 256 bytes. The cache has an access time of 3 ns and a hit rate of 94%. During a cache miss, it takes 20 ns to bring the first word of a block from the main memory, while each subsequent word takes 5 ns. The word size is 64 bits. The average memory access time in ns (round off to 1 decimal place) is______.
Answer: 13.5
One block is 256 bytes, which is 32 words of 8 bytes each.
Miss penalty: the first word takes 20 ns and the other 31 words take ns. The total is ns.
Average access time = hit time + miss rate miss penalty:
ns
(If the 3 ns is counted only on hits, the average is ns. The official GATE 2020 key also accepts 13.3.)
Answer: 13.5 ns
Miss penalty: the first word takes 20 ns and the other 31 words take ns. The total is ns.
Average access time = hit time + miss rate miss penalty:
ns
(If the 3 ns is counted only on hits, the average is ns. The official GATE 2020 key also accepts 13.3.)
Answer: 13.5 ns
A computer system with a word length of 32 bits has a 16 MB byte- addressable main memory and a 64 KB, 4-way set associative cache memory with a block size of 256 bytes. Consider the following four physical addresses represented in hexadecimal notation.
A1=0x42C8A4,
A2=0x546888,
A3=0x6A289C,
A4=0x5E4880
Which one of the following is TRUE?
A1=0x42C8A4,
A2=0x546888,
A3=0x6A289C,
A4=0x5E4880
Which one of the following is TRUE?
Answer: (B)
Lines = 64 KB / 256 B = 256. Sets = 256 / 4 = 64 so 6 set bits sit above the 8 offset bits.
Set = (address / 256) mod 64. Use the low 6 bits after dropping the last two hex digits:
- A1 = 0x42C8A4 0x42C8 set 8
- A2 = 0x546888 0x5468 set 40
- A3 = 0x6A289C 0x6A28 set 40
- A4 = 0x5E4880 0x5E48 set 8
A2 and A3 use set 40 (A1 and A4 use set 8).
Answer: A2 and A3 map to the same cache set
Set = (address / 256) mod 64. Use the low 6 bits after dropping the last two hex digits:
- A1 = 0x42C8A4 0x42C8 set 8
- A2 = 0x546888 0x5468 set 40
- A3 = 0x6A289C 0x6A28 set 40
- A4 = 0x5E4880 0x5E48 set 8
A2 and A3 use set 40 (A1 and A4 use set 8).
Answer: A2 and A3 map to the same cache set
A certain processor uses a fully associative cache of size 16 kB, The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
Answer: (D)
A fully associative cache has no index field, because a block can be placed in any line.
The block size is 16 bytes so the offset is 4 bits. The tag is 32 4 = 28 bits.
Answer: 28 bits and 0 bits
The block size is 16 bytes so the offset is 4 bits. The tag is 32 4 = 28 bits.
Answer: 28 bits and 0 bits
A certain processor deploys a single-level cache. The cache block size is 8 words and the word size is 4 bytes. The memory system uses a 60-MHz clock. To service a cache-miss, the memory controller first takes 1 cycle to accept the starting address of the block, it then takes 3 cycles to fetch all the eight words of the block, and finally transmits the words of the requested block at the rate of 1 word per cycle. The maximum bandwidth for the memory system when the program running on the processor issues a series of read operations is _________ bytes/sec.
Answer: 160
A single cache miss fetches one block. The block has 8 words, and each word is 4 bytes: 8 4 = 32 bytes.
Cycles needed for one block = 1 (address) + 3 (fetch) + 8 (transfer at 1 word per cycle) = 12 cycles.
Time for one block = 12 / 60 MHz = 0.2 s.
Bandwidth = 32 bytes / 0.2 s = bytes/s
Answer: 160
Cycles needed for one block = 1 (address) + 3 (fetch) + 8 (transfer at 1 word per cycle) = 12 cycles.
Time for one block = 12 / 60 MHz = 0.2 s.
Bandwidth = 32 bytes / 0.2 s = bytes/s
Answer: 160
Keep practising