GATE Computer ScienceVery hardGATE CSE · UGC NET
A 256×256 array of 4-byte integers is stored in row-major order starting at address 0. A 16 KB direct-mapped cache has 32-byte lines (512 lines). The array is traversed column by column (for each column i, for each row j, read A[j][i]). How many cache misses occur in total?
- A. 8192
- B. 32768
- C. 65536
- D. 16384
Correct answer: C. 65536
A column step is 1024 bytes = 32 lines, so only 16 distinct sets are used by a column and rows j and j+16 conflict; every access misses: 65536 (= 256×256), versus 8192 for row-major order.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- In IEEE 754 single precision with round-to-nearest-even, let x = 2^24 = 16777216. What are the values of (x + 1) + 1 and x + (1 + 1)?
- A 4 KB direct-mapped cache has 32-byte lines. The loop "for i = 0..127: sum += A[i] + B[i]" reads 4-byte integers, A starting at address 0…
- A RISC ISA has fixed 4-byte instructions. A conditional branch holds a 16-bit signed offset counted in instructions and the target is…
- How many distinct single-precision IEEE 754 values x satisfy 1 ≤ x < 1024?
- A disk spins at 7200 rpm, has an 8 ms average seek and a 100 MB/s media rate (1 KB = 1000 B, 1 MB = 10⁶ B). Request X reads one contiguous…
- A memory has 8 low-order interleaved banks (bank = word address mod 8). An access started in cycle t keeps its bank busy in cycles t … t+5…