GATE Computer ScienceHardGATE CS (PYQ pattern)
A 16 × 16 matrix of 4-byte ints is stored in row-major order from address 0. It is traversed column by column on a direct-mapped 2 KB cache with 32-byte blocks. How many misses occur?
- A. 128
- B. 256
- C. 32
- D. 64
Correct answer: C. 32
The whole matrix is 1 KB = 32 blocks and the block index of element (i, j) is 2i + ⌊j/8⌋, all different mod 64, so there are no conflicts: only 32 compulsory misses. The large-stride intuition (every access misses) fails when the data fits in the cache.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- An unpipelined multiplier is busy for 4 cycles starting in the cycle a multiply issues; a later multiply that reaches issue while it is…
- Which of the following are correct for addressing modes? I. PC-relative addressing helps make code position independent. II. Register…
- Each interrupt costs 5000 cycles of fixed overhead (save, vector, restore) and its handler then spends 2000 cycles on every event it…
- A program sums a 64 × 64 matrix of 4-byte ints stored in row-major order starting at address 0, once row by row and once column by column…
- A processor makes one instruction fetch per instruction and 0.36 data references per instruction. Option S has split 16 KB I- and D-caches…
- Which of these 8-bit two's-complement operations overflow as signed arithmetic? I. 0x80 − 0x01. II. 0x00 − 0x80. III. 0x7F + 0x80. IV…