CPU scheduling algorithms require CPU time and IO time required for its execution. CPU time is time taken by CPU to carry out the process while I/O time illustrates the time required for I/O operation by the process.
The execution of multiple processes in an optimised way is based on different kinds of algorithms, like FCFS, Shortest Job First etc., which depend on the time frame values, like the Arrival Time, Burst Time, Waiting Time etc.
1. Arrival Time (AT) :
Arrival time is the point of time in milli seconds 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 of 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)
2. Burst Time (BT) :
Burst Time refers to the time required in milli seconds 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 as 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 of the Completion Time of the process and the Waiting Time, that is,
Burst Time (B.T.) = Completion Time (C.T.) - Waiting Time (W.T.)
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)|
If we compute the Gantt chart, based on FCFS scheduling where the process that comes first in the ready queue is executed first. The processes arrival decides the order of execution of the process for time equal to its Burst time.
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.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Shortest Job First CPU Scheduling with predicted burst time
- Priority CPU Scheduling with different arrival time - Set 2
- Program for FCFS CPU Scheduling | Set 2 (Processes with different arrival times)
- Difference between Priority Scheduling and Round Robin (RR) CPU scheduling
- Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
- Difference between Turn Around Time (TAT) and Waiting Time (WT) in CPU Scheduling
- Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling
- Round Robin Scheduling with different arrival times
- Difference between Preemptive Priority based and Non-preemptive Priority based CPU scheduling algorithms
- Difference between Preemptive and Non-preemptive CPU scheduling algorithms
- Difference between SJF and LJF CPU scheduling algorithms
- Difference between FCFS and SJF CPU scheduling algorithms
- Difference between SJF and SRJF CPU scheduling algorithms
- Difference between SRJF and LRJF CPU scheduling algorithms
- Difference between First Come First Served (FCFS) and Longest Job First (LJF) CPU scheduling algorithms
- Difference between FCFS and Priority CPU scheduling
- Difference between EDF and LST CPU scheduling algorithms
- Difference between Multilevel Queue (MLQ) and Multi Level Feedback Queue (MLFQ) CPU scheduling algorithms
- Difference between LJF and LRJF CPU scheduling algorithms
- Longest Remaining Time First (LRTF) CPU Scheduling Algorithm
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.