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

In Process Scheduling (a key topic in Operating Systems and commonly tested in GATE), understanding the various types of times is crucial. Below is a concise explanation of each important time type involved:


🕒 1. Arrival Time (AT)

  • Definition: The time at which a process enters the ready queue.

  • Example: If a process arrives at time 0, its Arrival Time is 0.


🔧 2. Burst Time (BT) / Execution Time

  • Definition: The total time required by a process to execute on CPU.

  • Note: It does not include time spent waiting.

  • Example: If a process needs 5 ms of CPU time, its Burst Time is 5.


🔄 3. Completion Time (CT)

  • Definition: The time at which a process finishes execution.

  • Example: If a process completes at time 12, its Completion Time is 12.


📊 4. Turnaround Time (TAT)

  • Definition: The total time taken from arrival to completion.

  • Formula:

    TAT=CT−AT\text{TAT} = \text{CT} – \text{AT}

  • Interpretation: How long a process stayed in the system.

  • Example: If AT = 2, CT = 10 → TAT = 10 – 2 = 8


⏳ 5. Waiting Time (WT)

  • Definition: The time a process spends in the ready queue, not running.

  • Formula:

    WT=TAT−BT\text{WT} = \text{TAT} – \text{BT}

  • Example: If TAT = 8 and BT = 5 → WT = 8 – 5 = 3


🕐 6. Response Time (RT)

  • Definition: Time from arrival to first time the process gets CPU.

  • Used in: Preemptive algorithms like Round Robin, SRTF, etc.

  • Formula:

    RT=First CPU Start Time−Arrival Time\text{RT} = \text{First CPU Start Time} – \text{Arrival Time}


📘 Example Table for Clarification

Process AT BT CT TAT = CT – AT WT = TAT – BT
P1 0 5 5 5 0
P2 1 3 8 7 4
P3 2 2 10 8 6

Would you like a solved example with Gantt chart for a specific scheduling algorithm (like FCFS, SJF, Round Robin)?

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

PROCESS SCHEDULING ALGORITHMS: A REVIEW

Chapter 5: Process Scheduling

Chapter 6: CPU Scheduling



Leave a Reply

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

error: