In CPU Scheduling, we often need to find average Turnaround and Waiting Time with the help of Arrival, Burst and Completion Time. Let’s have a brief look of them:
Turnaround Time (TAT):
- It is the time interval from the time of submission of a process to the time of the completion of the process.
- Difference b/w Completion Time and Arrival Time is called Turnaround Time.
Completion Time (CT): This is the time when the process completes it’s execution.
Arrival Time (AT): This is the time when the process has arrived in the ready state.
TAT = CT - AT
Waiting Time (WT):
- The time spent by a process waiting in the ready queue for getting the CPU.
- The time difference b/w Turnaround Time and Burst Time is called Waiting Time.
Burst Time (BT): This is the time required by the process for it’s execution.
WT = TAT - BT
Now with Waiting Time and Burst Time we can also calculate Turn Around Time via:
TAT = BT + WT
|Process||Burst Time (in sec.)|
Avg. TAT = (24 + 27 + 31) / 3 = 27.33 sec Avg. WT = (0 + 24 + 27) / 3 = 17.0 sec
Let’s see the difference between Turnaround Time and Waiting Time:
|S.No.||Turn Around Time||Waiting Time|
|1.||The time since the process entered into ready queue for execution till the process completed it’s execution.||The time process spent in the ready queue and for I/O completion.|
|2.||Different CPU Scheduling algorithms produce different TAT for the same set of processes.||CPU Scheduling Algorithm doesn’t affect the amount of time during which a process executes or does I/O but only the amount of time that a process spends waiting in the ready queue.|
|3.||The turnaround time is generally limited by the speed of the output device.||Waiting time has no such major effect.|
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.
- Difference between Priority Scheduling and Round Robin (RR) CPU scheduling
- Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
- Difference between Arrival Time and Burst Time in CPU Scheduling
- Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling
- Difference between Preemptive Priority based and Non-preemptive Priority based CPU scheduling algorithms
- Difference between Preemptive and Non-preemptive CPU scheduling algorithms
- Difference between SJF and LJF CPU scheduling algorithms
- Difference between FCFS and SJF CPU scheduling algorithms
- Difference between SJF and SRJF CPU scheduling algorithms
- Difference between SRJF and LRJF CPU scheduling algorithms
- Difference between First Come First Served (FCFS) and Longest Job First (LJF) CPU scheduling algorithms
- Difference between FCFS and Priority CPU scheduling
- Difference between EDF and LST CPU scheduling algorithms
- Difference between Multilevel Queue (MLQ) and Multi Level Feedback Queue (MLFQ) CPU scheduling algorithms
- Difference between LJF and LRJF CPU scheduling algorithms
- Shortest Job First CPU Scheduling with predicted burst time
- Priority CPU Scheduling with different arrival time - Set 2
- Longest Remaining Time First (LRTF) CPU Scheduling Algorithm
- Longest Remaining Time First (LRTF) CPU Scheduling Program
- Time Slicing in CPU scheduling
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.