Day 02Part 03- Various types of times in Process Scheduling algorithm, Arrival, Burst TAT.

Day 02Part 03- Various types of times in Process Scheduling algorithm, Arrival, Burst TAT.



play-rounded-fill play-rounded-outline play-sharp-fill play-sharp-outline
pause-sharp-outline pause-sharp-fill pause-rounded-outline pause-rounded-fill
00:00

 Day 02 | Part 03 – Process Scheduling Algorithm: Various Types of Times

Process scheduling in an operating system involves different types of times that determine the efficiency and execution sequence of processes. Let’s explore them one by one:

 Arrival Time (AT)

Definition: The time when a process enters the ready queue.
✔ Example: If Process P1 arrives at time 0 ms and P2 at 2 ms, then:

  • AT(P1) = 0 ms
  • AT(P2) = 2 ms

 Burst Time (BT)

Definition: The total time required by a process to execute on the CPU.
 Also called Execution Time or CPU Time.
Example:

  • P1 requires 5 ms to complete execution.
  • P2 requires 8 ms to complete execution.
  • So, BT(P1) = 5 ms, BT(P2) = 8 ms.

 Turnaround Time (TAT)

Definition: The total time taken by a process from arrival to completion.
Formula:

TAT=CompletionTime(CT)−ArrivalTime(AT)TAT = Completion Time (CT) – Arrival Time (AT)

Example: If a process arrives at 0 ms and completes at 10 ms, then:

  • AT = 10 – 0 = 10 ms

 Waiting Time (WT)

Definition: The total time a process spends waiting in the ready queue before execution.
Formula:

WT=TurnaroundTime(TAT)−BurstTime(BT)WT = Turnaround Time (TAT) – Burst Time (BT)

Example:

  • If TAT = 10 ms, BT = 5 ms, then
  • WT = 10 – 5 = 5 ms

 Completion Time (CT)

Definition: The time at which a process finishes execution.
Example: If process P1 finishes execution at 12 ms, then

  • CT(P1) = 12 ms

 Response Time (RT)

Definition: The time from arrival to the first execution of a process.
Formula:

RT=FirstExecutionTime−ArrivalTime(AT)RT = First Execution Time – Arrival Time (AT)

Example:

  • If a process arrives at 0 ms but starts execution at 3 ms, then
  • RT = 3 – 0 = 3 ms

 Summary Table:

Time Type Definition Formula
Arrival Time (AT) When process arrives in the queue Given in question
Burst Time (BT) Total execution time Given in question
Turnaround Time (TAT) Time from arrival to completion CT - AT
Waiting Time (WT) Time spent waiting in queue TAT - BT
Completion Time (CT) When process finishes execution Given or calculated
Response Time (RT) Time from arrival to first execution First Execution - AT

 Example Problem:

Given Processes:

Process AT BT
P1 0 5
P2 1 3
P3 2 8

If scheduled using FCFS (First Come First Serve), find TAT, WT, and RT.

Would you like me to solve this example step by step?

Day 02Part 03- Various types of times in Process Scheduling algorithm, Arrival, Burst TAT.

Operating System : Scheduling Algorithm – Jaunpur

PROCESSES AND CPU Scheduling



Leave a Reply

Your email address will not be published. Required fields are marked *

error: