GATE Computer ScienceVery hardGATE CS (PYQ pattern)
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. The data cache is direct-mapped, 2 KB, with 32-byte blocks (empty before each traversal). How many misses do the row-wise and column-wise traversals cause, as (row, column)?
- A. (4096, 512)
- B. (512, 512)
- C. (512, 4096)
- D. (512, 2048)
Correct answer: C. (512, 4096)
Row-wise reads each 32-byte block once: 4096/8 = 512 misses. Column-wise the stride is 256 B = 8 blocks, so only 8 distinct lines (8i mod 64) are ever used, and each line is evicted before the next element of its block is needed: every one of the 4096 accesses misses.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- 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…
- An 8-bit x86-style SUB computes 0x01 − 0xFF. In this convention CF = 1 exactly when the unsigned subtraction needs a borrow, OF = signed…
- A two-level memory has a 32 KB cache costing 100 per KB (access 10 ns) and a 4 MB main memory costing 1 per KB (access 100 ns); total…
- A write-back, write-allocate cache has a 2 ns hit time and a 5% miss rate. A miss that evicts a clean block costs 40 ns; a miss that…
- An 8-bit CPU multiplies the two's-complement bytes 0xF6 and 0x0D as signed numbers into a 16-bit product. What is the product, and is the…