A multi-level queue scheduling algorithm partitions the ready queue into several separate
queues.
The processes are permanently assigned to one queue, generally based on some property of the
process, such as memory size, process priority, or process type.
Each queue has its own scheduling algorithm.
Let us consider an example of a multilevel queue-scheduling algorithm with five queues:
1. System Processes
2. Interactive Processes
3. Interactive Editing Processes
4. Batch Processes
5. Student Processes
Each queue has absolute priority over lower-priority queues. No process in the batch queue, for
example, could run unless the queues for system processes, interactive processes, and interactive
editing processes were all empty. If an interactive editing process entered the ready queue while
a batch process was running, the batch process will be pre-empted.
Banker’s Algorithm:
This algorithm calculates resources allocated, required and available before allocating
resources to any process to avoid deadlock.
It contains two matrices on a dynamic basis.
Matrix A contains resources allocated to different processes at a given time.
Matrix B maintains the resources which are still required by different processes at the
same time.
Algorithm F: Free resources
Step 1: When a process requests for a resource, the OS allocates it on a trial basis.
Step 2: After trial allocation, the OS updates all the matrices and vectors. This updating can be
done by the OS in a separate work area in the memory.
Step 3: It compares F vector with each row of matrix B on a vector to vector basis.
Step 4: If F is smaller than each of the row in Matrix B i.e. even if all free resources are allocated
to any process in Matrix B and not a single process can completes its task then OS concludes that
the system is in unstable state.