Process Schedulers in Operating System
Process Schedulers in Operating System
System
• Process scheduling is the activity of the process manager that handles
the removal of the running process from the CPU and the selection of
another process based on a particular strategy.
• Categories of Scheduling
• Scheduling falls into one of two categories:
• Non-preemptive: In this case, a process’s resource cannot be taken before
the process has finished running. When a running process finishes and
transitions to a waiting state, resources are switched.
• Preemptive: In this case, the OS assigns resources to a process for a
predetermined period. The process switches from running state to ready
state or from waiting for state to ready state during resource allocation.
Types of Process Schedulers
• Switching context.
• Switching to user mode.
• Jumping to the proper location in the newly loaded program.
Medium-Term Scheduler
• It is responsible for suspending and resuming
the process. It mainly does swapping (moving
processes from main memory to disk and vice
versa). Swapping may be necessary to improve
the process mix or because a change in
memory requirements has overcommitted
available memory, requiring memory to be
freed up.