Instruction Pipelining questions

Q48

GATE CS 2015 CS-3Instruction PipeliningNAT2 marks
Consider the following reservation table for a pipeline having three stages S1S_1, S2S_2 and S3S_3.
Time →\to12345
S1S_1XX
S2S_2XX
S3S_3X
The minimum average latency (MAL) is ____________.
Show answer without attempting

Answer: 3

Q49

GATE CS 2015 CS-3Instruction PipeliningMCQ2 marks−2/3 if wrong
Consider the following code sequence having five instructions I1I_1 to I5I_5. Each of these instructions has the following format.

OP Ri, Rj, Rk

where operation OP is performed on contents of registers Rj and Rk and the result is stored in register Ri.

I1I_1: ADD R1, R2, R3
I2I_2: MUL R7, R1, R3
I3I_3: SUB R4, R1, R5
I4I_4: ADD R3, R2, R4
I5I_5: MUL R7, R8, R9

Consider the following three statements.

S1: There is an anti-dependence between instructions I2I_2 and I5I_5
S2: There is an anti-dependence between instructions I2I_2 and I4I_4
S3: Within an instruction pipeline an anti-dependence always creates one or more stalls

Which one of above statements is/are correct?
Show answer without attempting

Answer: B

Q55

GATE CS 2015 CS-1Instruction PipeliningNAT2 marks
Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz. Assume that there are no stalls in the pipeline. The speed up achieved in this pipelined processor is ________.
Show answer without attempting

Answer: 3.2

Q53

GATE CS 2015 CS-2Instruction PipeliningNAT2 marks
Consider the sequence of machine instructions given below:
MUL  R5, R0, R1
DIV  R6, R2, R3
ADD  R7, R5, R6
SUB  R8, R7, R4
In the above sequence, R0 to R8 are general purpose registers. In the instructions shown, the first register stores the result of the operation performed on the second and the third registers. This sequence of instructions is to be executed in a pipelined instruction processor with the following 4 stages: (1) Instruction Fetch and Decode (IF), (2) Operand Fetch (OF), (3) Perform Operation (PO) and (4) Write back the result (WB). The IF, OF and WB stages take 1 clock cycle each for any instruction. The PO stage takes 1 clock cycle for ADD or SUB instruction, 3 clock cycles for MUL instruction and 5 clock cycles for DIV instruction. The pipelined processor uses operand forwarding from the PO stage to the OF stage. The number of clock cycles taken for the execution of the above sequence of instructions is ____________.
Show answer without attempting

Answer: 13

0/40 correct0 marks

Related topics in Computer Organization and Architecture