An instruction pipeline can be implemented by means of
- (A)
LIFO buffer
- (B)
FIFO buffer
- (C)
Stack
- (D)
None of the above
An instruction pipeline can be implemented by means of
LIFO buffer
FIFO buffer
Stack
None of the above
ANSWER
An instruction pipeline can be implemented by means of a FIFO buffer, option (b).
Official answer: BSource: ISRO's revised and final answer key of 16 February 2024
An instruction pipeline overlaps the stages (fetch, decode, execute, write-back) of successive instructions. Instructions must move through the stages in program order.
The instruction fetched first must be decoded and executed first. That is first-in, first-out behaviour.
A prefetch queue or instruction buffer between the fetch stage and the decode stage therefore works as a FIFO buffer, so option (b) fits.
A LIFO buffer or a stack returns the most recently stored item first. That would reverse the program order of the instructions, so options (a) and (c) are wrong.
Because option (b) is correct, option (d), None of the above, is also wrong.
KEY IDEA
Instructions flow through a pipeline in program order, so the buffer holding them between stages must be first-in, first-out (an instruction prefetch queue).
WATCH OUT FOR
Choosing a stack or LIFO buffer because buffers are often associated with stacks. A LIFO structure would reverse the instruction order and break sequential execution.
From the ISRO CS 2023 paper. Every question of this paper · The full paper (PDF, ISRO) · All 2 ISRO Pipelining questions, with notes