GATE CSE 2018 Q60: Clock cycles for 100 instructions with variable-length PO stage
- Computer Organization and Architecture
- 2 marks
- NAT
- No negative marking
Syllabus topic: Instruction pipelining and pipeline hazards
Question
The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback (WB). The IF, ID, OF and WB stages take 1 clock cycle each for every instruction. Consider a sequence of 100 instructions. In the PO stage, 40 instructions take 3 clock cycles each, 35 instructions take 2 clock cycles each, and the remaining 25 instructions take 1 clock cycle each. Assume that there are no data hazards and no control hazards.
The number of clock cycles required for completion of execution of the sequence of instructions is ______.
Try it: numerical answer: type the value
Show answer and explanation
Answer: 219 (official GATE 2018 final answer key)
Concept used: When one stage takes variable time, it becomes the bottleneck: total time is the fill time of the stages before it, plus the total time spent in it, plus the drain time after it.
First step: Add up the PO cycles over all 100 instructions, then add the cycles the first instruction spends before PO and the last instruction spends after PO.
Full step-by-step solution
Loading…
Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.
More questions on Instruction pipelining and pipeline hazards
Every PYQ on this topic →Share this question
Source: official GATE 2018 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key
More Computer Organization and Architecture PYQs
- 2026 Session 1 · Q14Match addressing modes with high-level data elements
- 2026 Session 1 · Q15Instruction sequence for Z = X + Y on a load-store machine
- 2026 Session 1 · Q16Register dependency that causes a data hazard
- 2026 Session 1 · Q36IEEE 754 single-precision sum of 35C00000 and 34A00000
- 2026 Session 1 · Q38Tag length: direct-mapped vs K-way set-associative cache
- 2026 Session 1 · Q54Impossible TLB / page table / cache event sequences