GATE Computer ScienceVery hardGATE CS (PYQ pattern)
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 (6 cycles) and completes at the end of cycle t+5. The processor starts at most one access per cycle, in program order, the first in cycle 1, and waits whenever the next access's bank is busy. How many cycles are needed to complete 64 accesses with stride 3 (addresses 0, 3, 6, …), and with stride 6 (addresses 0, 6, 12, …)?
- A. 69 and 69
- B. 69 and 193
- C. 69 and 99
- D. 99 and 99
Correct answer: C. 69 and 99
Stride 3 is coprime to 8, so the accesses cycle through all 8 banks and a bank is revisited after 8 > 6 cycles: one access per cycle, last starts in cycle 64, done at 69. Stride 6 shares the factor 2 with 8, so only 8/gcd(6,8) = 4 banks are used (0, 6, 4, 2); each bank is reused every 4 accesses but needs 6 cycles, so 4 accesses per 6 cycles: simulation gives 99. (193 would be stride 4, which uses only 2 banks.)
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A classic 5-stage pipeline (IF, ID, EX, MEM, WB) has no forwarding; the register file is written in the first half of a cycle and read in…
- A pipeline has a two-slot delayed branch: the two instructions after every branch always execute. The compiler fills the first slot with a…
- A cache miss fetches an 8-word block. Sending the address takes 1 cycle, a memory access takes 15 cycles and putting one word on the…
- A 1 GHz machine has instruction classes A, B, C with CPI 1, 2 and 3. For the same program, compiler X produces 5×10⁹ class-A, 1×10⁹…
- A non-pipelined datapath takes 100 + 120 + 90 + 150 + 110 ps per instruction. It is cut into those 5 stages with a 10 ps latch after each…
- A device streams 2 MB/s (1 MB = 10⁶ B) into memory on a 1.5 GHz CPU. With interrupt-driven I/O every 4-byte word costs 600 CPU cycles…