![]() |
VOOZH | about |
Prerequisite - CPU Scheduling List Scheduling also known as Priority List Based Scheduling is a scheduling technique in which an ordered list of processes are made by assigning them some priorities. So, basically what happens is, a list of processes that are ready to be executed at a given point is made. And then depending on the availability of processors i.e, whether they are free or busy, if processors are free they pick the processes and execute them. Let us now understand the List Scheduling using one example. Example: Suppose we have 7 processes P1, P2, P3, P4, P5, P6, P7 such that -
Dependencies are shown below in the figure. 👁 Image
Lets us assume that we have constraint of two processors and we are having both processors free. Since P1, P2, P5, P7 are independent, lets us assume are they are initially waiting in the ready list and are ready for execution. Step by step execution of the processes :
Ready list is shown below at each step is shown in figure: 👁 Image
So you can see that after 4 unit time the whole processes gets executed. But this time may vary depending upon the scheduling mechanism operating system is using. Explanation showing execution time depends on scheduling algorithms used.
Ready list for this process is shown below: 👁 Image
So you can see this time that 5 units of time are taken if we change the order of processes in which they gets executed. The priorities are determined statically before scheduling process begins. The first step chooses the process with the highest priority, the second step selects the best possible resource. Some of the scheduling strategies that can be used are:
Goal of algorithm is to maximize CPU utilization and minimize the delay.So whichever Scheduling algorithm helps to achieve this can used depending on the processes.