A uni-processor computer system only has two processes, both of which ...
When Round Robin scheduling is used We are given that the time slice is 5ms. Consider process P and Q. Say P utilizes 5ms of CPU and then Q utilizes 5ms of CPU. Hence after 15ms P starts with I/O And after 20ms Q also starts with I/O. Since I/O can be done in parallel, P finishes I\O at 105th ms (15 + 90) and Q finishes its I\O at 110th ms (20 + 90). Therefore we can see that CPU remains idle from 20th to 105th ms. That is when Round Robin scheduling is used, Idle time of CPU = 85ms CPU Utilization = 20/105 = 19.05% When First Come First Served scheduling scheduling or Shortest Remaining Time First is used Say P utilizes 10ms of CPU and then starts its I/O. At 11th ms Q starts processing. Q utilizes 10ms of CPU. P completes its I/O at 100ms (10 + 90) Q completes its I/O at 110ms (20 + 90) At 101th ms P again utilizes CPU. Hence, Idle time of CPU = 80ms CPU Utilization = 20/100 = 20% Since only two processes are involved and I\O time is much more than CPU time, "Static priority scheduling with different priorities" for the two processes reduces to FCFS or Shortest remaining time first. Therefore, Round robin will result in least CPU utilization.
View all questions of this test
A uni-processor computer system only has two processes, both of which ...
Explanation:
First come first served scheduling:
In first come first served scheduling, the processes are executed in the order in which they arrive. In this scenario, both processes will have equal priority and will be executed in a sequential manner. This means that one process will complete its 10ms CPU burst, followed by its 90ms I/O burst, and then the other process will start its CPU burst. This process will continue in a sequential manner. As a result, the CPU utilization will be high as there will be idle time when one process is waiting for its I/O burst to complete.
Shortest remaining time first scheduling:
In shortest remaining time first scheduling, the process with the smallest remaining burst time is given the CPU. In this scenario, both processes have equal burst times of 10ms CPU bursts and 90ms I/O bursts. Therefore, the CPU will alternate between the two processes, resulting in high CPU utilization.
Static priority scheduling with different priorities for the two processes:
In static priority scheduling, each process is assigned a priority value, and the process with the highest priority is given the CPU. In this scenario, both processes have equal priority. Therefore, the CPU will alternate between the two processes, resulting in high CPU utilization.
Round robin scheduling with a time quantum of 5 ms:
In round robin scheduling, each process is given a fixed time quantum to execute on the CPU. In this scenario, both processes have equal burst times of 10ms CPU bursts and 90ms I/O bursts. With a time quantum of 5ms, each process will get to execute for 5ms before being preempted and the other process will be given a chance to execute. This means that both processes will execute for half of their CPU burst time before being preempted. This will result in a lower CPU utilization compared to the other scheduling strategies, as the CPU will not be idle for long periods of time.
Therefore, round robin scheduling with a time quantum of 5ms will result in the least CPU utilization for this system.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).