GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 48

GATE CSE 2015 Set 3 Q48

Computer Organization & Architecture · Pipelining & Hazards · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q48 2 marks · NAT
Report issue

Pipelining & Hazards

Question 48, GATE 2015: A three-stage pipeline has a five-column reservation table. Stage S1 is used at time slots 1 and 5, S2 at slots 2 and 4, and S3 only at slot 3; all other cells are blank. Determine the minimum average initiation latency (MAL). Initiation times may vary, but no two active operations may use the same stage simultaneously.
Tap to enlarge
Answer & solution

Official answer: 3

1. The forbidden separations come from differences between occupied columns in the same row, not from differences across different stages. Thus the initial forbidden-latency set is exactly {2,4}. To attain average 3, start operations at times 0,3,6,9,...; every pairwise separation is a positive multiple of 3 and therefore safe.

2. Repeated use in S1 forbids initiation separation 4; S2 forbids 2. Therefore allowed positive gaps include 1, 3, 5. Constant gap 3 is collision-free because no multiple of 3 is 2 or 4, achieving average 3. If any gap is 1, its next gap cannot 1 or 3 (the two-gap total would be 2 or 4) and must be at least 5. Pair each such 1 with its following≥5 gap; every pair averages≥3, while unpaired gaps are≥3. Thus no lower long-run average is possible.

Original paper, page 70 · Answer key