Open In App

Difference Between Arrival Time and Burst Time in CPU Scheduling

Last Updated : 19 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

In CPU scheduling, there are two important terms called as “Arrival Time” and “Burst Time.” These two terms play a key role in understanding the way processes are managed in the operating system and specifically, when the CPU time is to be allocated towards different tasks. By knowing the difference between Arrival Time and Burst Time one is indeed in a position to know how the performance of processes within the system is and how the overall performance is offer affected.

What is Arrival Time (AT)?

Arrival time is the point of time in milliseconds at which a process arrives at the ready queue to begin the execution. It is merely independent of the CPU or I/O time and just depicts the time frame at which the process becomes available to complete its specified job. The process is independent of which process is there in the Running state. Arrival Time can be calculated as the difference between the Completion Time and the Turn Around Time of the process.

Arrival Time (A.T.) = Completion Time (C.T.) - Turn Around Time (T.A.T) 

Importance of Arrival Time

  • Order of Execution: It assists in understanding which processes should be selected for execution next one.
  • Scheduling Algorithms: Scheduling algorithms such as the FCFS largely rely on the Arrival Time in order to determine the CPU resource to allocate.
  • System Responsiveness: Sometimes, a process with a smaller Arrival Time is allocated a higher priority in some of the scheduling strategies.

What is Burst Time (BT)?

Burst Time refers to the time required in milliseconds by a process for its execution. The Burst Time takes into consideration the CPU time of a process. The I/O time is not taken into consideration. It is called the execution time or running time of the process. The process makes a transition from the Running state to the Completion State during this time frame. Burst time can be calculated as the difference between the Completion Time of the process and the Waiting Time, that is,

Burst Time (B.T.) = Completion Time (C.T.) - Waiting Time (W.T.) 

Importance of Burst Time

  • Process Completion: It directly impacts upon the time that would be required to complete a process’s run time.
  • Efficiency: The CPU also utilizes Burst Time in formulas for Introduce Priority (IP) in which resources are given to jobs that come with shorter Burst Time.
  • Turnaround Time: It affects not only the sojourn time a process takes within the system from the time it is entered till it is completed.

The following table illustrates the Arrival and Burst time of three processes P1, P2, and P3. A single CPU is allocated for the execution of these processes.

Processes Arrival Time (in ms) Burst Time (in ms)
P1 0 3
P2 4 2
P3 6 4

If we compute the Gantt chart, based on FCFS scheduling where the process that comes first in the ready queue is executed first. The process’s arrival decides the order of execution of the process for a time equal to its Burst time.

Gantt Chart

Since, the process P2 arrives at 4ms, and process P1 requires 3ms for its execution (=Burst Time), CPU waits for 1ms, that is the idle time for the CPU, where it doesn’t perform any process execution. The last process to get executed is P3. The following table illustrates the key differences in the Arrival and Burst Time respectively

Arrival Time Burst Time
Marks the entry point of the process in the queue. Marks the exit point of the process in the queue.
Computed before the execution of process. Computed after the execution of process.
Related to the Ready State of the CPU. Related to the Running State of the CPU.

Conclusion

Therefore, in CPU scheduling, both Arrival Time and Burst Time are rudimentary. Arrival Time determines at what time a process becomes eligible for execution while Burst Time indicates how long the process will require the services of the CPU to complete. It is necessary to realize the differences and their importance in order to fine-tune scheduling algorithms based on CPU and enhance the efficiency of a given system.



Next Article

Similar Reads