Check here:
Difference between turnaround time and waiting time in CPU scheduling
- Turnaround time refers to the time interval from the time of submission of a process towards the time of the finishing of the process. Turnaround time can also be considered the addition of the time periods spent waiting to get into memory or ready queue and execution on CPU . Turnaround time is a vital metric when it comes to the evaluation of the scheduling algorithms of an operating system. On the other hand, the waiting time is called as a procedure in which the time process waits between its arrival in a waiting queue and the time it gets wholly executed. Thus, waiting time = exit time – arrival time.
- The total speed of output affects the turnaround time. On the other hand, no effect is put on the waiting time due to the output rate.
Turnaround time (TAT)
Turnaround time (TAT) is defined as the total time interval between the time of process submission and the time of its completion. The significant difference between the time of completion and the time of arrival is named the turnaround time of the process.
CT (Completion Time) – Completion time is the exact time when a process finishes the execution.
AT (Arrival Time) – Arrival time is called as the time of arrival of a process before the state of preparedness (before its execution).
Therefore, CT – AT = TAT.
Waiting time (WT)
Waiting time (WT) is defined as the total time that is spent by the process while staying in a ready queue before it reaches the CPU. The difference between turnaround time and burst time is called the waiting time of a process.
BT (Burst Time) – Burst time is the total time that is required by a process for its overall execution.
Hence, TAT – BT = WT.
Further, we can quickly determine the Turnaround Time with the help of the Burst Time and the Waiting Time.
So, BT + WT = TAT.
CPU scheduling
CPU scheduling is known as a procedure that permits one process to utilize the CPU while the execution of another process is on hold(in a waiting state) simultaneously. This happens due to a lack of any resources such as I/O etc. This leads to making complete use of the CPU. The primary objective of CPU scheduling is to make the system efficient, fast, as well as fair.
Whenever the CPU gets idle, the operating system must choose one of the processes in the ready queue to be executed. The selection process is done with the help of the short-term scheduler (or CPU scheduler). The scheduler selects from among the methods in memory that are willing to execute and allows the CPU to one of them.
Types of CPU algorithms
Given below are the different kinds of CPU algorithms :
- First come, First serve.
- Round Robin Scheduling.
- Shortest Job First.
- Shortest remaining time first.
- Priority scheduling.
- Multilevel queue scheduling.
- Multilevel feedback queues scheduling.
Conclusion
Turnaround time (TAT) means the time interval between the time of process submission and the completion time. The difference that is there between the time of completion and time of arrival is called the Turnaround time. Waiting time (WT) is the total time a process takes while waiting in a ready queue before reaching the CPU. The significant differences between the turnaround time and waiting time are on the basis of their definitions as well as the effect of speed on the output.