![]() ![]() P2 will get executed again, since it only requires only 2 units of time hence this will be completed. The Next process P2 requires only 2 units of time. There are only two processes present in the ready queue. Since P6 is completed, hence it will not be added again to the queue. P6 will be executed for 4 units of time till completion. ![]() The next process P6 requires only 4 units of burst time and it will be executed next. P1 is completed and will not be added back to the ready queue. Since it only requires 1 unit of burst time hence it will be completed. The process P1 will be given the next turn to complete its execution. P5 has not been completed yet it will be added back to the queue with the remaining burst time of 1 unit. P5 will be executed for the whole time slice because it requires 5 units of burst time which is higher than the time slice. Since P4 is completed hence it will not be added back to the queue. The next process in the ready queue is P5 with 5 units of burst time. Its burst time is only 1 unit which is lesser then the time quantum hence it will be completed. P4Īfter, P1, P2 and P3, P4 will get executed. Since P3 has been completed, hence it will be terminated and not be added to the ready queue. P3Īfter P1 and P2, P3 will get executed for 3 units of time since its CPU burst time is only 3 seconds. Since P2 has not completed yet hence, P2 will also be added back to the ready queue with the remaining burst time 2 units. Ready Queueĭuring the execution of P2, one more process P6 is arrived in the ready queue. P2Īfter P1, P2 will be executed for 4 units of time which is shown in the Gantt chart. P1 has not completed yet, it needs another 1 unit of time hence it will also be added back to the ready queue. Meanwhile the execution of P1, four more processes P2, P3, P4 and P5 arrives in the ready queue. The P1 will be executed for 4 units first. ![]() ![]() Hence in the ready queue, there will be only one process P1 at starting with CPU burst time 5 units. Initially, at time 0, process P1 arrives which will be scheduled for the time slice 4 units. The structure of both the data structures will be changed after every scheduling. Process IDĪccording to the algorithm, we have to maintain the ready queue and the Gantt chart. The time quantum of the system is 4 units. Their arrival time and burst time are given below in the table. In the following example, there are six processes named as P1, P2, P3, P4, P5 and P6. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |