GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A memory has B low-order interleaved banks (bank = word address mod B, any positive integer B). A bank stays busy for 6 cycles after an access starts, and the processor issues one access per cycle in order, stalling when the target bank is busy. A program streams through an array with a stride of 6 words. What is the smallest B for which the stream never stalls?
- A. 8
- B. 12
- C. 16
- D. 7
Correct answer: D. 7
With stride s the stream visits B / gcd(s, B) distinct banks in rotation, and it never stalls if each bank is revisited no sooner than 6 accesses later: B / gcd(6, B) ≥ 6. B = 6: 1 bank; B = 7: gcd 1 → 7 banks ✓. B = 8 uses only 4 banks and 12 only 2; 16 works (8 banks) but is not the smallest. A prime bank count avoids stride conflicts.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- IEEE 754 half precision has 1 sign bit, 5 exponent bits (bias 15) and 10 fraction bits. What is the smallest positive integer that it…
- A 4-stage pipeline has stage delays 140, 300, 170 and 260 ps and no latch overhead. The slowest stage is duplicated into two identical…
- A 32-bit machine uses a two-level page table: 10-bit top index, 10-bit second-level index, 12-bit offset, 4-byte entries, every table…
- A machine has 48-bit virtual addresses, 4 KB pages and 16 GB of RAM (1 GB = 2³⁰ B). Its inverted page table has one entry per frame…
- Booth's algorithm multiplies M = 0110 (+6) by Q = 1011 (−5) with a 4-bit accumulator A (initially 0000) and a bit Q₋₁ (initially 0). Each…
- Machine X runs a program of 5×10⁹ instructions at 2400 MIPS. Machine Y, with a different ISA and compiler, needs only 3×10⁹ instructions…