...
Question 17341 – NTA UGC NET Dec 2023 Paper-2
January 12, 2024
Question 8037 – GATE 2016 [Set-1]
January 12, 2024
Question 17341 – NTA UGC NET Dec 2023 Paper-2
January 12, 2024
Question 8037 – GATE 2016 [Set-1]
January 12, 2024

Question 9355 – Pipelining

A CPU has a five-stage pipeline and runs at 1 GHz frequency. Instruction fetch happens in the first stage of the pipeline. A conditional branch instruction computes the target address and evaluates the condition in the third stage of the pipeline. The processor stops fetching new instructions following a conditional branch until the branch outcome is known. A program executes 109 instructions out of which 20% are conditional branches. If each instruction takes one cycle to complete on average, the total execution time of the program is:

Correct Answer: C

Question 14 Explanation: 
No. of total instructions = 109
20% are condition branches out of 109
⇒ 20/100 × 109
⇒ 2 × 108
In third stage of pipeline it consists of 2 stage cycles.
Total cycle penalty = 2 × 2 × 108 = 4 × 108
Clock speed = 1 GHz
Each Instruction takes 1 cycle i.e., 109 instructions.
Total execution time of a program is
= (109 / 109) +((4× 108) / 109) = 1+0.4 = 1.4 seconds
A
1.0 second
B
1.2 seconds
C
1.4 seconds
D
1.6 seconds
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!