hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    A CPU has a 5-stage pipeline with the following stages Fetch (F), Decode (D), Execute (E), Memory (M) and Write-back (W). Each stage takes one clock c
    Question



    A CPU has a 5-stage pipeline with the following stages Fetch (F), Decode (D), Execute (E), Memory (M) and Write-back (W). Each stage takes one clock cycle to complete. Assume there are no pipeline stalls and the pipeline is initially empty. How many clock cycles are required to complete the execution of 10 instructions?

    A.

    10

    B.

    14

    C.

    15

    D.

    19

    Correct option is B

    In a 5-stage pipeline, the number of cycles to complete n instructions can be calculated as:
    1. Initial Pipeline Filling: Requires 5 cycles (one for each stage).
    2. Remaining Instructions: Each new instruction completes in 1 additional cycle.
    Total Cycles = 5 + (10 − 1) = 5 + 9 = 14
    Information Booster:
    · Pipeline Stages:
    · Fetch (F): Retrieves instruction from memory.
    · Decode (D): Decodes the instruction.
    · Execute (E): Executes the instruction.
    · Memory (M): Accesses memory if needed.
    · Write-back (W): Writes results back to register.
    Additional Knowledge:
    Without any stalls, pipelines increase instruction throughput but not necessarily the execution speed of individual instructions.

    Free Tests

    Free
    Must Attempt

    Basics of Education: Pedagogy, Andragogy, and Hutagogy

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon12 Mins
    languageIcon English
    Free
    Must Attempt

    UGC NET Paper 1 Mock Test 1

    languageIcon English
    • pdpQsnIcon50 Questions
    • pdpsheetsIcon100 Marks
    • timerIcon60 Mins
    languageIcon English
    Free
    Must Attempt

    Basics of Education: Pedagogy, Andragogy, and Hutagogy

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon12 Mins
    languageIcon English
    test-prime-package

    Access ‘UGC NET Computer Science’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    students-icon
    354k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow