GATE Computer ScienceHardGATE CS
A direct-mapped write-back cache of 8 KB has 64-byte blocks and each block is divided into 4 sub-blocks of 16 bytes with their own valid bit and their own dirty bit (one tag per block). With 32-bit byte addresses, how many bits of tag, valid and dirty storage does the cache need in total?
- A. 2688
- B. 2944
- C. 3328
- D. 3456
Correct answer: D. 3456
There are 8192 / 64 = 128 blocks (7 index bits, 6 offset bits), so the tag has 32 − 13 = 19 bits. Each block stores 19 + 4 + 4 = 27 bits, and 128 × 27 = 3456. Ignoring sub-blocks gives 128 × 21 = 2688.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A loop body occupies the 160 bytes from address 0x1000 to 0x109F and runs 100 iterations. The instruction cache is direct mapped, 128…
- The 16-bit multiplier 0x6DB6 (0110 1101 1011 0110) is used by a Booth multiplier. Radix-2 Booth recoding performs one add or subtract for…
- Machines A and B run four benchmarks with execution times (in seconds) A: 12, 30, 8, 50 and B: 24, 15, 16, 25. Which statement is correct?
- A 32 KB direct-mapped cache has 64-byte blocks and the processor issues 32-bit byte addresses. How many tag bits does each cache line store?
- A program of 2×10⁹ instructions runs on a 1.5 GHz processor. The mix is 40% instructions of CPI 1, 30% of CPI 2, 20% of CPI 3 and 10% of…
- An unpipelined datapath needs 10 ns per instruction. A 5-stage pipelined version has a clock period of 2.5 ns (including latch overhead)…