An OS follows round robin scheduling with a time quantum of 4 ms. Assuming that the CPU is free now and there are 20 processes waiting in the ready queue, what is the maximum amount of time that a process waits before getting into the CPU?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. 76 ms
Explanation
In round robin, every process in the ready queue is given at most one time quantum (4 ms) before the scheduler moves to the next process in line. The process that waits longest for its first turn is the one sitting at the very back of the queue, which must let every one of the other 19 processes ahead of it use up to a full 4 ms quantum each before it is finally dispatched. Maximum wait = (20 − 1) × 4 ms = 19 × 4 = 76 ms, option (ii); 80 ms would be the (incorrect) result of counting the process's own quantum as part of its own wait.More Discrete Structures and Optimization questions
- If an operating system does not allow a child process to exist when the parent process has been terminated, this phenomenon is called:
- Consider the following 3 processes, with the length of the CPU burst time given in milliseconds: Process Arrival Time Burst Time P1 0 8 P2…
- Assuming that the system call fork() never fails, consider the following C programs P1 and P2 executed on a UNIX/Linux system. P1 P2 int ma…
- Consider the following four processes with the arrival time and length of CPU burst given in milliseconds: Process Arrival Time Burst Time…
- Which module gives control of the CPU to the process selected by the short-term scheduler?
- A fair share scheduler computes the priority of a process based on which of the following? (1) Processor utilization by the individual proc…