Which of the following statements are true?I. Shortest remaining time ...
I) Shortest remaining time first scheduling is a pre-emptive version of shortest job scheduling. In SRTF, job with the shortest CPU burst will be scheduled first. Because of this process, It may cause starvation as shorter processes may keep coming and a long CPU burst process never gets CPU.
II) Pre-emptive just means a process before completing its execution is stopped and other process can start execution. The stopped process can later come back and continue from where it was stopped. In pre-emptive scheduling, suppose process P1 is executing in CPU and after some time process P2 with high priority then P1 will arrive in ready queue then p1 is pre-empted and p2 will brought into CPU for execution. In this way if process which is arriving in ready queue is of higher priority then p1, then p1 is always pre-empted and it may possible that it suffer from starvation.
III) round robin will give better response time then FCFS ,in FCFS when process is executing ,it executed up to its complete burst time, but in round robin it will execute up to time quantum. So Round Robin Scheduling improves response time as all processes get CPU after a specified time. So, I,II,III are true which is option (D).
Option (D) is correct answer.
View all questions of this test
Which of the following statements are true?I. Shortest remaining time ...
I. Shortest remaining time first scheduling may cause starvation: True
Shortest remaining time first (SRTF) scheduling is a preemptive scheduling algorithm where the process with the shortest remaining burst time is executed first. While this algorithm ensures optimal average waiting time and turnaround time, it can cause starvation for long-running processes.
Starvation occurs when a process is unable to get the required resources for execution despite being ready to run. In the case of SRTF scheduling, if there are processes with very long burst times, they may never get a chance to execute if shorter processes keep arriving frequently.
II. Preemptive scheduling may cause starvation: True
Preemptive scheduling allows the operating system to interrupt a running process and allocate the CPU to another process. While this helps in achieving better throughput and response time, it can also lead to starvation.
In preemptive scheduling, if a process with higher priority continuously arrives, lower priority processes may never get a chance to execute, resulting in starvation. This issue can be mitigated by using priority aging techniques, where the priority of a process increases over time, ensuring fairness in resource allocation.
III. Round robin is better than FCFS in terms of response time: True
Round robin (RR) scheduling is a preemptive scheduling algorithm where each process is given a fixed time quantum to execute before being preempted. This algorithm provides fairness and prevents starvation as all processes get a chance to execute.
On the other hand, First-Come-First-Serve (FCFS) scheduling is a non-preemptive scheduling algorithm where the processes are executed in the order they arrive. FCFS can result in longer response times as shorter processes may have to wait for longer processes to complete.
Therefore, considering the given statements, all three statements are true. Shortest remaining time first scheduling and preemptive scheduling can cause starvation, while round robin is indeed better than FCFS in terms of response time.
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).