Professional Documents
Culture Documents
Ans. CT=50ns,
15×10 6 instructions 1 sec
1 instruction= 1/ (15×10 6) sec
50 ns 1 Clock cycle time
1/ (15×10 6) sec
1/ (15×10 6) /50 ns
But the execution time of both P1 and P2 is equal, so the clock rate of P2 remains as it is,
1.5GHz.
CPI=(0.5×1+0.3×4+0.2×4)=2.5
P2 /P1= E1/E2=1.1
E2= 10/1.1=9.09 sec
P3/P1=E1/E3=10
E3=10/10= 1 sec
Ans.
1.75
Ans.
As per the pipeline cycle calculation = {(n-1) +k } = 149 + 5 =154 clk cycle
20% Load /Store instructions = 20% of 150 = 30 no of instructions takes 1 clock cycle delay
For 30 instructions it will take 30 clock cycles delay
So maximum clock cycles is required to execute = 154 + 30 = 184 clock cycles
SAT Question -4 on concept 3 CO - 2
Ans. Structural hazard :- Arise from resource conflicts among instructions executing
Concurrently (1 mark)
Ans. No (1 Mark)
(give your justification) (1 Mark)
Question Question CO
No Mapping
Q.No:2 A. What is Amdahl’s Law? Assume that 30% instructions are data CO - 1
transfer instruction, 40 % instructions are ALU instruction and the
rest are the control instruction. Each of data transfer, ALU and
control instruction takes respectively 6clock cycle, 4clock cycle
and 7 clock cycle. Find the CPI of the machine. If using latest
hardware there found 3 times enhancement in the ALU instruction,
then find the overall Speedup of the machine.
[5 Marks]
Ans.
Amdahl’s Law: (2.5 Mark)
– Performance improvement gained from using some faster mode of execution is
limited by the amount of time the enhancement is actually used
– FRACTION ENHANCED :-Fraction of the computation time in the original machine
that can use the enhancement
– It is always less than or equal to 1
– SPEEDUP ENHANCED:-Improvement gained by enhancement, that is how much
faster the task would run if the enhanced mode is used for entire program.
– It is always greater than 1
Let initial value = NT, actual outcome of branches is- NT, T, NT, T
Predictions are:
NT, NT, NT, NT
2 wrong (in red), 2 correct = 50% accuracy
Q.No:4 A. Find out the total no of clock cycles required to execute the CO – 2
following instructions without and with operand forwarding?
LD R1, 0(R2)
DADDIU R1,R1,#1
SD R1, 0(R2)
DADDIU R2,R2,#4
DSUB R4,R3,R2
[5 Marks]
Ans.
1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
LD IF ID E M W
DADD IF ID S S E M W
SD IF ID S S E M W
DADD IF ID E M W
DSUB IF ID S S E M W
1 2 3 4 5 6 7 8 9 10 11
LD IF ID E M W
DADD IF ID S E M W
SD IF ID E M W
DADD IF ID E M W
DSUB IF ID E M W
Ans. ( 5 Marks )
Q.No:5 A. A five stage pipeline processor has IF, ID, EXE, MEM, WB. The CO – 2
IF, ID, MEM, WB stages takes 1 clock cycles each for any
instruction. The EXE stage takes 1 clock cycle for LOAD, ADD &
SUB instructions, 2 clock cycles for MUL and DIV instructions
respectively.
Consider the following instructions:-
LOAD R3, 9(R2)
DIV R1, R3, R4
ADD R5, R1, R6
SUB R7, R1, R8
MUL R9, R1, R10
For the above sequence of instructions, find out total number of
clock cycles required to complete the execution, without operand
forwarding?
[5 Marks]
Ans.
ANS.
Q.No:6 A. “Amdahl’s Law Quantifies overall performance gain due to CO - 1
improve in a part of a computation.” -: Justify & prove the
statement for speed up overall.
Ans.
Amdahl’s Law: (2.5 Marks)
– Performance improvement gained from using some faster mode of execution is
limited by the amount of time the enhancement is actually used
– FRACTION ENHANCED :-Fraction of the computation time in the original machine
that can use the enhancement
– It is always less than or equal to 1
– SPEEDUP ENHANCED:-Improvement gained by enhancement that is how much
faster the task would run if the enhanced mode is used for entire program.
– It is always greater than 1
B. In a five stage pipeline IF, ID, EX, MEM, WB; ADD, SUB and CO - 2
LOAD takes one clock cycle, MUL takes three clock cycles to
execute. Then for
Controller of Examinations