Question
Which CPU scheduling algorithm always selects the
process with the smallest burst time first, potentially leading to starvation?Solution
Shortest Job First (SJF) selects the process with the smallest burst time for execution. This reduces the average waiting time and is optimal in that sense. However, it can cause starvation for longer processes if smaller processes keep arriving, as they continually preempt the longer ones. SJF can be preemptive (Shortest Remaining Time First) or non-preemptive. The algorithm is often used in batch systems where burst times are known beforehand. For example, it works well in scenarios like batch job execution in legacy systems. Why Other Options Are Incorrect :
- Round Robin (RR) : Ensures fairness by assigning equal time slices, but does not prioritize based on burst time.
- First Come First Serve (FCFS) : Simple but may lead to poor average waiting time if a long process arrives first.
- Priority Scheduling : Schedules based on priority, not burst time, and may also lead to starvation of low-priority tasks.
- Multilevel Queue Scheduling : Divides processes into multiple queues based on priority or type, but does not specifically prioritize short jobs.
βAβ is 100% more efficient than βCβ, while βBβ is 200% more efficient than βAβ. Together, they complete a task in 15 days. After βAβ...
Choose the statements that correctly show two workers taking 6 hours and 9 hours to complete a task, respectively.
Ashish and Anil can do a piece of work in 10 days and 15 days respectively. Ashish completed 40% of the work. Find the time taken by Anil to complete th...
- 24 men can complete _______% of the whole work in 12 days working 10 hours in a day. 30 men working 8 hours in a daycan complete 30% of the whole work in _...
Aman finishes 2/5 of a task in 8 days, while Bhanu completes the entire task in 16 days. How long will it take for both Aman and Bhanu, working together...
- Vikas does 65% of a job in 39 days, while Suman does 40% in 40 days. Vikas worked for 18 days and left. Calculate how many days Suman would need to wrap up...
Anand is capable of finishing a task in 36 days when working solo. Akash, being 40% more efficient than Anand, can accomplish tasks quicker. Calculate h...
X can work as fast as Y and Z together. X and Y together can finish the same task 3 times as fast as Z. If all three working together can finish the tas...
The ratio of time taken by P, Q and R to complete work alone is 6:8:3 respectively. If all three together complete the work in 5 days, then find in how ...
- 'S' alone does a work in 18 days. 'T' is 50% more efficient than 'S'. Both work together but 'S' leaves after 6 days. Find the number of days 'T' will take...