hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    Consider a system with 4 processes with the following burst times: The time quantum for the Round Robin (RR) scheduling algorithm is
    Question



    Consider a system with 4 processes with the following burst times:

    The time quantum for the Round Robin (RR) scheduling algorithm is 4 milliseconds. What is the total waiting time for process P1?

    A.

    18 ms

    B.

    20 ms

    C.

    30 ms

    D.

    32 ms

    E.

    24 ms

    Correct option is A

    To find the waiting time for process P1 using the Round Robin scheduling algorithm with a time quantum of 4 milliseconds, we follow these steps:
    1. First Round:
    · P1: Runs for 4 ms (remaining 20 ms)
    · P2: Runs for 3 ms (completed)
    · P3: Runs for 3 ms (completed)
    · P4: Runs for 4 ms (remaining 8 ms)
    Time elapsed: 4+3+3+4=14 ms
    2. Second Round:
    · P1: Runs for 4 ms (remaining 16 ms)
    · P4: Runs for 4 ms (remaining 4 ms)
    Time elapsed: 14+4+4=22 ms
    3. Third Round:
    · P1: Runs for 4 ms (remaining 12 ms)
    · P4: Runs for 4 ms (completed)
    Time elapsed: 22+4+4=30 ms
    4. Fourth Round:
    · P1: Runs for 4 ms (remaining 8 ms)
    Time elapsed: 30+4=34 ms
    5. Fifth Round:
    · P1: Runs for 4 ms (remaining 4 ms)
    Time elapsed: 34+4=38 ms
    6. Sixth Round:
    · P1: Runs for 4 ms (completed)
    Time elapsed: 38+4=42 ms
    The waiting time for P1 is the total time minus the time it actually spent running:
    Waiting time for P1=(Total time)−(Burst timeforP1)
    Waiting time for P1=42 ms−24 ms= 18 ms
    Important Key Points:
    1. Round Robin (RR):
    · Is a preemptive scheduling algorithm that assigns fixed time slices to each process.
    · Ensures fairness and avoids process starvation.
    2. Waiting Time: The total time a process spends waiting in the ready queue.
    Knowledge Booster:
    · Time Quantum: The fixed time each process gets to execute before the next process starts. It influences the performance of the Round Robin scheduling.
    · Burst Time: The total time required by a process for execution on the CPU.
    · Context Switching: The process of storing and restoring the state of a CPU so that multiple processes can share a single CPU resource.

    test-prime-package

    Access ‘IBPS SO IT Officer’ Mock Tests with

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

    Free Tests

    Free
    Must Attempt

    Current Affairs (Jul 16, 2025 - Jul 23, 2025)

    languageIcon English
    • pdpQsnIcon40 Questions
    • pdpsheetsIcon40 Marks
    • timerIcon20 Mins
    languageIcon English
    Free
    Must Attempt

    General Awareness Section Test 01

    languageIcon English
    • pdpQsnIcon20 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon8 Mins
    languageIcon English
    Free
    Must Attempt

    IB ACIO Grade-II Executive (Held on 17 Jan 2024 S1)

    languageIcon English
    • pdpQsnIcon100 Questions
    • pdpsheetsIcon100 Marks
    • timerIcon60 Mins
    languageIcon English