Process scheduling is the process of the process manager handling the process of removing a process from the CPU and selecting another process according to a specific plan. Process planning is an integral part of Multiprogramming applications. Such applications allow more than one process to be loaded into effective memory simultaneously and the upload process share CPU using time multiplexing.

Process Scheduling Queues

The OS stores all the PCBs in the configuration lines. The OS maintains a separate line for each process condition and the PCBs of all processes are in the same condition to be placed in the same line. When the process status changed, its PCB was disconnected from its current line and moved to its new state line.

The application maintains the following key line editing process -

  • Activity line - This line keeps all processes in order.
  • Ready line - This line keeps a set of all processes that stay in the main memory, ready and waiting to uninstall. A new process is always added to the queue.
  • Device Lines - Procedures blocked due to device I / O not forming this line.

The OS can use a variety of policies to manage each line (FIFO, Round Robin, Most Important, etc.). The OS editor determines how processes can be removed between ready-to-use lines and runners that can only have one access per core of a particular processor in the system; in the diagram above, it is integrated with the CPU.

Model Processes Both

A two-dimensional process model means the efficient and effective operation described below -

1. It runs : When a new process is performed, it enters the system as in operating mode.

2. It's not running : Ineffective processes are kept in line, waiting for their turn to act. Each input is an indicator of a specific process. The line is applied using a linked list. The use of a dispatcher is as follows. When a process is interrupted, that process is transferred to the waiting line. Once the process is complete or uninstalled, the process is discarded. In any case, the dispatcher then selects the process from the line you are going to make.

The editors

Schedules are a special system software that handles process planning in a variety of ways. Their main task is to select the tasks that will be sent to the system and to decide which process you will perform. Editors of three types -

  • Long Time Planner
  • Short Term Planner
  • Medium Term Scheduler

Long Time Planner

Also called a work schedule. The long-term editor decides which programs are allowed in the system to be processed. Selects processes from the queue and uploads them to the performance memory. The process loads from the CPU configuration memory.

The main purpose of a job editor is to provide balanced services, such as I / O tied and processor bound. It also controls the level of multiprogramming. If the level of multiprogramming is stable, the average performance rate should be equal to the flow rate of the processes running in the system.

In some programs, the long schedule may be unavailable or limited. Time sharing apps do not have a long-term editor. When the process changes the state from new to right, then there is the use of a long-term schedule.

Short Term Planner

Also called CPU editor. Its main purpose is to increase the efficiency of the system in accordance with selected principles. It is a change in operating conditions. The CPU Editor selects the process among the processes ready to perform and assigns the CPU to one of them.

Short-term planners, also known as senders, decide on the next procedure. Short-term planners are faster than long-term planners.

Medium Term Scheduler

Mid-term planning is part of the exchange. Clears processes in memory. It reduces the level of multiprogramming. The medium term planner manages to manage the modified processes.

The process can be stopped if you apply for an I / O. The set processes cannot make any progress on completion. In this case, to remove the process from memory and make room for other processes, the default process is moved to secondary storage. This process is called exchange, it is said that the process is changed or released. Exchanges may be required to improve process integration.

Comparisons between Schedules

1. Long Term Schedule 

It is a task scheduler, Speed ​​is below the short-term schedule, Controls multiprogramming level, Almost no or less in the time-sharing system 

2. Sort Term Schedule 

It is a CPU schedule,  Speed ​​is faster between two other Speeds between short-term and short-term programming, There is also little or no time in the time-sharing system

3. Medium Term Schedule 

Provides minimal control over multiprogramming level Reduces multiprogramming rate,  It is a process of exchanging a schedule, It is part of the time-sharing system.

Total Change

Contextual modification is a way to save and restore the CPU status or context to the Process Control block so that the process can be restarted from the same location in the future. Using this method, the context switch enables multiple processes for a single CPU sharing. Content change is an important part of many system operating features.

When a schedule changes the CPU from one process to another, the state from the current operating system is kept in the process control block. After this, the state of the following process is loaded onto its PCB and used to set up the PC, registers, etc. At that point, the second process can begin to unravel.

Contextual changes are great for the computer because the register and memory status must be saved and restored. To avoid time-varying content content, some hardware applications use two or more sets of processor registers. Once the process has changed, the following information is saved for later use.

  • Calculation System
  • Editing details
  • Base and limit of register
  • Currently used register
  • Changed Status
  • Details of I / O State
  • Accounting Details