1. Multi Level Queue Scheduling (MLQ) :
It is quite difficult to have just one queue and schedule all the processes. This is where multi level queue scheduling is used. In this the processes are divided into various classes depending upon the property of the processes such as system process, I/O process etc. Thus we get ‘n’ number of queues for n classes of processes. Each queue is assigned a priority and can use its own scheduling algorithm which makes it convenient to use many scheduling algorithms at the same time. Generally the topmost level of queue has the highest priority which decreases as we move to the lower levels. If the upper level has an absolute priority over lower levels then it is non preemptive else if the time slice is divided between various queues then it becomes preemptive in nature.
- Advantages :
The major advantage of this algorithm is that we can use various algorithms such as FCFS, SSJF, LJF, etc. At the same time in different queues.
The lowest level processes suffer from starvation problem.
2. First Come First Served (FCFS) Scheduling Algorithm :
It is the simplest and non-preemptive scheduling algorithm. In First Come First Served (FCFS), the process is allocated to the CPU in the order of their arrival. A queue data structure is used to implement the FCFS scheduling algorithm. The process which is at the head of the ready queue is allocated to the CPU, when CPU is free. Then the process which is running is removed from the queue. When a new process enters into the ready queue, it is placed onto the tail of the ready queue.
Difference between FCFS and Multi Level Queue Scheduling :
|First Come First Served (FCFS)||Multi Level Queue Scheduling|
|First Come First Served (FCFS) is the non-preemptive scheduling algorithm.||MLQ can be non-preemptive or preemptive depending on the conditions.|
|It executes the processes in ascending order of their arrival time.||Processes are executed depending on the priority of that particular level of queue to which the process belongs. Further selection of process is based upon the type of algorithm used in that particular queue.|
|FCFS has the minimal overhead.||MLQ has some CPU overhead as it needs to switch between the queues.|
|First Come First Served Scheduling Algorithm provides high response time for the processes.||Response time may be high or low depending upon the algorithms used in various levels of the multi level queue.|
|FCFS is inconvenient to use in the time sharing system.||It can be implemented in any system depending upon the need.|
|Average waiting time is generally not minimal in First Come First Served Scheduling Algorithm.||Average waiting time depends upon the algorithms used in various levels of queues.|
|It is the simplest type of algorithm.||It is complex algorithm and is difficult to implement.|
|It leads to convoy effect.||It leads to the starvation of processes at lower levels.|
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.
- Difference between First Come First Served (FCFS) and Longest Job First (LJF) CPU scheduling algorithms
- Difference between First Come First Served (FCFS) and Round Robin (RR) Scheduling Algorithm
- Difference between Multi Level Queue Scheduling (MLQ) and Priority Scheduling
- Difference between Multilevel Queue (MLQ) and Multi Level Feedback Queue (MLFQ) CPU scheduling algorithms
- Difference between Multi Level Queue Scheduling (MLQ) and Shortest Job First
- Difference between Multi Level Queue Scheduling (MLQ) and Longest Job First (LJF)
- Difference between Multi Level Queue (MLQ) Scheduling and Round Robin (RR) algorithms
- Multilevel Queue (MLQ) CPU Scheduling
- First Come, First Serve – CPU Scheduling | (Non-preemptive)
- Difference between FCFS and SCAN disk scheduling algorithms
- Difference between FCFS and SJF CPU scheduling algorithms
- Difference between FCFS and SSTF Disk Scheduling Algorithm
- Difference between FCFS and C-LOOK disk scheduling algorithm
- Difference between FCFS and Priority CPU scheduling
- Difference between FCFS and C-SCAN disk scheduling algorithm
- Difference between Multi-tasking and Multi-threading
- Two Level Paging and Multi Level Paging in OS
- Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
- Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling
- Relation in FCFS and Preemptive Priority 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 firstname.lastname@example.org. 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.