Question
Consider the following reservation table for a pipeline having three stages and :
| Stage \ Time | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| S1 | X | X | |||
| S2 | X | X | |||
| S3 | X |
The minimum average latency (MAL) is _____.
Official answer and solution
- Official answer
- 3
- From
- Official GATE 2015 answer key
Solution
Determine the forbidden latency set from the reservation table and find the simple cycles in the state transition diagram.
Find forbidden latencies by taking differences of time slots where any stage is reused:
- Stage is used at times 1 and 5: difference .
- Stage is used at times 2 and 4: difference .
- Stage is used only at time 3: no collision.
Forbidden latency set .
Initial collision vector: .
State transitions:
- Latency 1 is permissible ():
Next state .
From , only latencies are allowed, returning to .
Cycle: with average latency .
- Latency 3 is permissible ():
Next state .
From state , latency 3 is permissible ():
Next state (self-loop).
Cycle: with average latency .
The minimum average latency among all simple cycles is .
3
Selecting 1 as the latency, forgetting that after a latency of 1 the pipeline reaches state (1111) which cannot accept another task until cycle 5.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 3
- Question
- 61 of 65, printed as CS Q.51
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.