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.

Free Tests

Free
Must Attempt
Video Solutions

RBI Assistant Pre 2026 Full Mock Test -01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Asst Prelims 2026 : Quant Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Asst Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English

Similar Questions

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
353k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow