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 26–30 of 68
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______.
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______.
Answer: 4.72
The I-cache and the D-cache are the first-level (L1) caches, and both are backed by the same L2 cache. On an L1 miss the request goes to L2 (8 ns), and on an L2 miss it goes to main memory (90 ns). The caches use the referred-word-first policy, so the requested word is passed on as soon as it arrives, and the time to fill the rest of the block is not added. The dirty bit is always 0, so no write back time is added. Only the access times add up.
Cost of an L1 miss: ns
Instruction read: ns
Data read: ns
Average read time ns
Answer: 4.72 ns
Cost of an L1 miss: ns
Instruction read: ns
Data read: ns
Average read time ns
Answer: 4.72 ns
Consider a machine with a byte addressable main memory of bytes divided into blocks of size 32 bytes. Assume that a direct mapped cache having 512 cache lines is used with this machine. The size of the tag field in bits is ______.
Answer: 18
The block offset needs 5 bits, because a block is 32 B. The index needs 9 bits, because there are 512 lines. So the tag is 32 5 9 = 18 bits.
Answer: 18
Answer: 18
The width of the physical address on a machine is 40 bits. The width of the tag field in a 512KB 8-way set associative cache is ________ bits.
Answer: 24
Size of one way = 512 KB / 8 = 64 KB = bytes. So the index and offset bits together are 16 bits.
Tag bits = 40 16 = 24 bits
Answer: 24
Tag bits = 40 16 = 24 bits
Answer: 24
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 10ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10MB.
The smallest cache size required to ensure an average read latency of less than 6ms is_________ MB.
The smallest cache size required to ensure an average read latency of less than 6ms is_________ MB.
Answer: 30
The average latency is (1 m) 1 + m 10 = 1 + 9m, where m is the miss rate. The condition we need is .
The graph shows that 20 MB gives a miss rate of 60%, which is too high. 30 MB gives 40% latency 1 + 3.6 = 4.6 ms. This is True.
Answer: 30
The graph shows that 20 MB gives a miss rate of 60%, which is too high. 30 MB gives 40% latency 1 + 3.6 = 4.6 ms. This is True.
Answer: 30
Assume that for a certain processor, a read request takes 50 nanoseconds on a cache miss and 5 nanoseconds on a cache hit. Suppose while running a program, it was observed that 80% of the processor's read requests result in a cache hit. The average read access time in nanoseconds is __________.
Answer: 14
Average read access time: 0.8 5 + 0.2 50 = 4 + 10 = 14 ns
Answer: 14
Answer: 14
Keep practising