Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:
(A) 13 units
(B) 14 units
(C) 15 units
(D) 16 units
Answer: (A)
Explanation: Let the processes be p0, p1 and p2. These processes will be executed in following order.
p2 p1 p2 p1 p2 p0 p1 p2 p0 p1 p2 0 4 5 6 7 8 9 10 11 12 13 14
Turn around time of a process is total time between submission of the process and its completion.
Turn around time of p0 = 12 (12-0)
Turn around time of p1 = 13 (13-0)
Turn around time of p2 = 14 (14-0)
Average turn around time is (12+13+14)/3 = 13.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- Operating Systems | CPU Scheduling | Question 2
- Operating Systems | CPU Scheduling | Question 3
- Operating Systems | CPU Scheduling | Question 4
- Operating Systems | CPU Scheduling | Question 5
- Operating Systems | CPU Scheduling | Question 6
- Operating Systems | CPU Scheduling | Question 7
- CPU Scheduling in Operating Systems
- CPU Scheduling in Operating Systems using priority queue with gantt chart
- Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling
- Difference between Priority Scheduling and Round Robin (RR) CPU scheduling
- Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
- Two-level scheduling in Operating Systems
- I/O scheduling in Operating Systems
- Program for FCFS CPU Scheduling | Set 1
- Program for Shortest Job First (or SJF) CPU Scheduling | Set 1 (Non- preemptive)
- Program for FCFS CPU Scheduling | Set 2 (Processes with different arrival times)
- Program for Priority CPU Scheduling | Set 1
- Multilevel Queue (MLQ) CPU Scheduling
- Shortest Job First CPU Scheduling with predicted burst time
- Highest Response Ratio Next (HRRN) CPU Scheduling

