Consider an arbitrary set of CPU-bound processes with unequal CPU burs...
Turnaround time is the total time taken by the process between starting and the completion and waiting time is the time for which process is ready to run but not executed by CPU scheduler. As we know, in all CPU Scheduling algorithms, shortest job first is optimal i.ie. it gives minimum turn round time, minimum average waiting time and high throughput and the most important thing is that shortest remaining time first is the pre-emptive version of shortest job first. shortest remaining time first scheduling algorithm may lead to starvation because If the short processes are added to the cpu scheduler continuously then the currently running process will never be able to execute as they will get pre-empted but here all the processes are arrived at same time so there will be no issue such as starvation. So, the answer is Shortest remaining time first, which is answer (A).
View all questions of this test
Consider an arbitrary set of CPU-bound processes with unequal CPU burs...
Shortest Remaining Time First (SRTF)
Explanation:
The shortest remaining time first (SRTF) scheduling algorithm selects the process with the smallest remaining burst time from the ready queue. This algorithm ensures that the process with the shortest burst time gets executed first, which in turn minimizes the average waiting time in the ready queue.
Advantages of SRTF:
1. Minimizes waiting time: By selecting the process with the shortest remaining burst time, SRTF ensures that the processes with shorter bursts are executed first, reducing their waiting time.
2. Efficient for CPU-bound processes: SRTF is particularly useful for CPU-bound processes as it optimizes the utilization of the CPU by executing processes with shorter bursts first.
3. Suitable for preemptive scheduling: SRTF is a preemptive scheduling algorithm, meaning that it can interrupt a process if a new process with a shorter burst time arrives.
Disadvantages of SRTF:
1. High overhead: SRTF requires frequent context switching, which can result in a high overhead due to the time spent on context switching.
2. Susceptible to starvation: If a process with a long burst time arrives and there are always processes with shorter burst times in the ready queue, the long process may starve and not get a chance to execute.
Comparison with other algorithms:
1. Round-robin with time quantum less than the shortest CPU burst: This algorithm divides the CPU time equally among all processes, regardless of their burst time. It does not prioritize shorter bursts, so it may not minimize the average waiting time.
2. Uniform random: This algorithm randomly selects a process from the ready queue for execution. It does not consider the burst time, so it may not minimize the average waiting time.
3. Highest priority first with priority proportional to CPU burst length: This algorithm assigns priorities to processes based on their burst time. However, it does not ensure that the process with the shortest burst time is executed first, so it may not minimize the average waiting time.
Therefore, the SRTF scheduling algorithm is the best choice to minimize the average waiting time in the ready queue for an arbitrary set of CPU-bound processes with unequal CPU burst lengths.
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).