Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Difference between Turn Around Time (TAT) and Waiting Time (WT) in CPU Scheduling
CPU scheduling is a crucial aspect of operating systems that determines the order in which processes are executed on the central processing unit (CPU). Two important metrics used to evaluate the efficiency of CPU scheduling algorithms are Turn Around Time (TAT) and Waiting Time (WT). Understanding the difference between these two metrics provides insights into the performance and responsiveness of a CPU scheduling algorithm.
What is Turn Around Time (TAT)?
Turn Around Time (TAT) is the total time taken for a process to complete its execution from the moment it enters the system until it finishes. It includes both the time the process spends executing on the CPU and the time it spends waiting for CPU time.
Calculation: TAT = Completion Time ? Arrival Time
Components: Includes both waiting time and execution time (burst time)
Purpose: Measures overall system efficiency and process completion speed
Impact: Lower TAT indicates better system performance and faster process completion
What is Waiting Time (WT)?
Waiting Time (WT) refers to the total amount of time a process spends waiting in the ready queue before it gets executed on the CPU. It excludes the actual execution time and focuses solely on the delay experienced by the process.
Calculation: WT = Start Time ? Arrival Time
Focus: Only measures time spent waiting in the ready queue
Purpose: Evaluates process responsiveness and scheduling fairness
Impact: Lower WT improves system responsiveness and user experience
Example Calculation
Consider a process with the following timeline:
| Process | Arrival Time | Start Time | Completion Time | Burst Time |
|---|---|---|---|---|
| P1 | 0 | 2 | 7 | 5 |
Waiting Time (WT) = Start Time ? Arrival Time = 2 ? 0 = 2 units
Turn Around Time (TAT) = Completion Time ? Arrival Time = 7 ? 0 = 7 units
Relationship: TAT = WT + Burst Time = 2 + 5 = 7 units ?
Key Differences
| Criteria | Turn Around Time (TAT) | Waiting Time (WT) |
|---|---|---|
| Definition | Total time from arrival to completion | Time spent waiting in ready queue |
| Formula | Completion Time ? Arrival Time | Start Time ? Arrival Time |
| Components | Waiting Time + Execution Time | Only waiting time (no execution) |
| Measures | Overall system efficiency | Process responsiveness |
| Optimization Goal | Minimize for better throughput | Minimize for better responsiveness |
| User Impact | Total time to complete task | Perceived delay before execution |
Relationship Between TAT and WT
The fundamental relationship between these metrics is:
TAT = WT + Burst Time (Execution Time) WT = TAT ? Burst Time
This relationship shows that TAT is always greater than or equal to WT, as it includes the actual execution time of the process.
Conclusion
Turn Around Time (TAT) measures the complete journey of a process from arrival to completion, while Waiting Time (WT) focuses specifically on delays in the ready queue. Both metrics are essential for evaluating CPU scheduling algorithms ? TAT for overall efficiency and WT for system responsiveness.
