In a multi-programming system, multiple process exists concurrently in the main memory. Each process alternates between using a processor and waiting for some event to occur, such as completion of an input/output operation. The processor or processors are kept busy while executing one process, while the others wait. The key to multi-programming is scheduling.
When the process enters into the system, they are put by system in the queue called job queue. All the process in the system reside in the job queue. When the processes are ready for execution and wait for CPU, they are placed in ready queue. The operating system also has other queues. When process wait for particular device, they are kept in respective device queue. After allocation of CPU to a process, the process starts its execution. While executing a process, one of the number of events could occur. Until the process finishes its execution, it travels between various scheduling queues. The operating system selects the processes from queries based on various scheduling
algorithms. This selection is carried out by the program called as scheduler.
There are three types of scheduler:
1. Long Term Scheduler: When programs are submitted to the system for the purpose of processing, long term scheduler comes to know about it. The scheduler's job is to choose process from the queue and place it in the main memory for execution purpose. The primary responsibility of the long-term scheduler is to supply reasonable mix of jobs, such as I/O bound and CPU bound. It also controls the degree of multi-programming.
2. Short Term Scheduler: Processes which are in ready queue wait for CPU. A short-term scheduler chooses the process from ready queue and assigns it to CPU based on various scheduling algorithms.
3. Medium Term Scheduler: If the degree of multi-programming increases, the medium-term scheduler swaps out the process from the main memory. The swapped out processes are again swapped in by medium term scheduler.
Comparison of Three Schedulers:
It is a Job Scheduler.
It is a CPU Scheduler.
It is a Process Swapping Scheduler.
It selects the process from the queue and loads them into main memory for execution.
It selects the process from ready queue and assigns it to CPU.
It swaps the processes in and out from the main memory.
Speed is lesser than short term scheduler.
Speed is fastest among the other two.
Speed is in between short and long term scheduler.
Transition of process state from New to Ready.
Transition of process state from Ready to Executing.
No process state transition.
It controls the degree of
It provides lesser control over degree of multi-programming.
It reduces the degree of multi-programming.
It is almost absent or minimal in time sharing systems.
It is also minimal in time sharing systems.
It is a part of time sharing systems.
|Introduction to Process Scheduling||1956||5|
|Python Shortest Job First (Preemptive) Algorithm with Different Arrival Time||4921||4|
|Python Round-Robin Scheduling Algorithm with Same Arrival Time||5457||4|
|Python FCFS Algorithm with Different Arrival Time||8638||4|
|Python HRRN Scheduling (Non-Preemptive) Algorithm||2437||5|
|Python Priority Scheduling (Preemptive) Algorithm with Same Arrival Time||4796||4|
|Secure Chat Application||955||0|
|Python Round Robin Scheduling Algorithm with Different Arrival Time||17351||6|
|Python Shortest Job First Ppreemptive) Algorithm with Different Arrival Time||8203||10|
|Python Priority Scheduling (Non-Pre-emptive) Algorithm with Different Arrival Time||3522||4|
|Packet Sniffer using Python||1075||0|
|Python Shortest Job First (Non-Preemptive) Algorithm with Same Arrival Time||3612||4|
|Date and Time Verification||664||4|
|FCFS Algorithm with Same Arrival Time||7736||4|
|Python Shortest Job First (Preemptive) Algorithm with Same Arrival Time||2165||5|
|Python Priority Scheduling (Non-Preemptive) Algorithm with Same Arrival Time||4652||4|
|Python Shortest Job First (Non-Preemptive) Algorithm with Different Arrival Time||17360||5|
|Python Program to calculate number of lines in a text file||634||4|
|Python Priority Scheduling (Preemeptive) Algorithm with Different Arrival Time||9206||4|
Dilkhush28-Sep-2019 09:39:40 PM