GATE Exam  >  GATE Questions  >   Consider execution of 100 instructions on a ... Start Learning for Free
Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?
(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)
  • a)
    0.05
  • b)
    0.08
  • c)
    0.06
  • d)
    0.04
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Consider execution of 100 instructions on a 5 stage pipeline. Let P b...
12P ≤ 1
= 0.08
View all questions of this test
Most Upvoted Answer
Consider execution of 100 instructions on a 5 stage pipeline. Let P b...
To calculate the value of P, we need to consider the speedup achieved in a pipeline. The speedup is given by the formula:

Speedup = (Pipeline Execution Time without Branches) / (Pipeline Execution Time with Branches)

Let's break down the calculation step by step:

1. Pipeline Execution Time without Branches:
- We have 100 instructions to execute.
- Each instruction takes 5 cycles to complete in the 5-stage pipeline.
- So, the total number of cycles required to execute 100 instructions without branches = 100 * 5 = 500 cycles.

2. Pipeline Execution Time with Branches:
- We are given that the branch is predicted on the fourth stage of the pipeline.
- This means that if the branch prediction is correct, the pipeline does not need to be flushed and restarted.
- Only when the branch prediction is incorrect, the pipeline needs to be flushed and restarted, resulting in a delay of 3 cycles.
- So, in the worst case, for every branch instruction, we have an additional delay of 3 cycles.
- Therefore, the total number of cycles required to execute 100 instructions with branches = 100 * 5 + 3 * (P * 100), where P is the probability of an instruction being a branch.

3. Speedup:
- We are given that the speedup is at least 4.
- So, Speedup >= 4.
- Using the formula for speedup, we have:
Speedup = (Pipeline Execution Time without Branches) / (Pipeline Execution Time with Branches)
4 <= 500="" (500="" +="" 3="" *="" (p="" *="">

4. Solving for P:
- Rearranging the inequality, we get:
4 <= 500="" (500="" +="">
2000 + 1200P <=>
1200P <=>
P <= -1500="">
P <=>

- Since P represents the probability, it cannot be negative. Therefore, we need to find the smallest positive value of P that satisfies the inequality.
- The closest positive option is 0.08, which satisfies the inequality.
- Therefore, the correct answer is option 'B' (P = 0.08).

Hence, the value of P that must be chosen to achieve a speedup of at least 4 is 0.08.
Explore Courses for GATE exam

Similar GATE Doubts

Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer?
Question Description
Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer?.
Solutions for Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider execution of 100 instructions on a 5 stage pipeline. Let P be the probability of an instruction being a branch. What must be the value of P such that speed up is atleast 4?(Assume each stage takes 1 cycle to perform it’s task and branch is predicted on fourth stage of the pipeline)a)0.05b)0.08c)0.06d)0.04Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev