Process Management
Process Management
Purpose of scheduling:
• Ensures efficient usage of the CPU4
Scheduling
• A high level scheduler program controls the selection of a program to
be moved to onto the main memory
• When a program is installed in memory the low level scheduler
controls when it has access to the CPU
• Its objective is to maximise the system and maintain a stable
performance of the operating system
Scheduling Methods
• There are 4 types of scheduling methods:
1. Round Robin
2. Shortest job first
3. First come first serve
4. Shortest remaining time
Robin Round
• allocates a time slice to each process and is therefore preemptive,
because a process will be halted when its time slice has run out. It can
be implemented as a FIFO queue.
• It normally does not involve prioritising processes.
• If separate queues are created for processes of different priorities then
each queue could be scheduled using a round-robin algorithm.
Shortest Job first
• This is a non-preemptive algorithm and can be implemented by
placing the processes in a first-in first-out (FIFO) queue.
• The algorithm will be very inefficient if it is the only algorithm
employed but it can be used as part of a more complex algorithm.
• It was made to aim at reducing the time wasted in waiting . Therefore
in order to do this the shortest job is placed first in ore to be processed
and completed
First Come first Served
• The data is added to the queue structure using the FIFO(First in First
Out) Principle.
• The first process to enter the queue is processed first regardless of the
priority or the burst time (time taken to complete the task)
• In such cases the average waiting time is longer.
Shortest remaining time first
• With the shortest remaining time the processes are placed in a ready
queue as they arrive however if a process with a shorter burst time(a
shorter time of completion) than the one being processed then the
current process is preempted
• This makes the SRTF a preemptive algoritm (it allows interruption of
processes midway)
Scheduling methods
• The First come first serve algorithm generally takes the longest
• Followed by the robin round
• Then shortest job first
• With Shortest remaining time first
Kernel
• This is a part of the operating system.
• It acts as an interrupt handler and hides the complexities of the Operating
system from the users.
Interrupt handling is used to manage low-level scheduling.
• The CPU will check for interrupt signals if there is one the CPU will
enter kernel mode.
• In this mode the kernel will check the interrupt dispatch table to find an
appropriate interrupt handling routine
• The kernel then dispatches this IHR and save the state of the interrupt
processes in a stack
• These interrupts are prioritised using interrupt prioritised levels
Thank You!!!
By Avril Mukanyangi