In operating system scheduling algorithms, several important formulas and metrics are used to analyze and evaluate the performance of different scheduling policies. Here are some of the key formulae and metrics:
Turnaround Time (TAT):
Turnaround Time is the total time taken by a process to complete its execution, including both waiting time and execution time.
Formula: TAT = Completion Time - Arrival Time
Waiting Time (WT):
Waiting Time is the total time a process spends waiting in the ready queue before getting CPU time.
Formula: WT = Turnaround Time - Burst Time
Response Time (RT):
Response Time is the time it takes for a process to receive a response from the system after it is submitted.
Formula: RT = Start Time - Arrival Time
First Response Time (FRT):
First Response Time is the time it takes for a process to receive CPU time for the first time after entering the ready queue.
Formula: FRT = Start Time - Arrival Time
CPU Utilization (U):
CPU Utilization represents the percentage of time the CPU is actively executing processes.
Formula: U = (Total CPU Time / Total Elapsed Time) * 100%
Throughput (Th):
Throughput measures the number of processes completed within a given time frame, indicating the system's efficiency.
Formula: Th = (Number of Completed Processes / Total Elapsed Time)
Average Turnaround Time (AvgTAT):
Average Turnaround Time provides the average time it takes for all processes to complete their execution.
Formula: AvgTAT = (Sum of Turnaround Times for all processes) / Number of Processes
Average Waiting Time (AvgWT):
Average Waiting Time gives the average time processes spend waiting in the ready queue.
Formula: AvgWT = (Sum of Waiting Times for all processes) / Number of Processes
Average Response Time (AvgRT):
Average Response Time provides the average time it takes for all processes to receive their first response from the system.
Formula: AvgRT = (Sum of Response Times for all processes) / Number of Processes
Turnaround Time Ratio (TAT Ratio):
Turnaround Time Ratio represents the ratio of a process's turnaround time to its burst time.
Formula: TAT Ratio = Turnaround Time / Burst Time
Fairness Index (FI):
Fairness Index measures how fairly CPU time is allocated to different processes or users.
Formula: FI = (Maximum Completion Time - Minimum Completion Time) / Total Elapsed Time
These formulas are crucial for evaluating and comparing scheduling algorithms, as they provide insights into factors like efficiency, responsiveness, and fairness. Depending on the specific scheduling algorithm and the objectives of the system, different metrics may be more relevant for performance analysis.
Last updated