0% found this document useful (0 votes)
10 views23 pages

Process Management Presentation

Process management in operating systems involves the creation, scheduling, and termination of processes, utilizing components such as process control blocks and scheduling algorithms. Key concepts include process states, inter-process communication, and deadlock management, which are crucial for efficient CPU utilization and system stability. Understanding these elements helps in appreciating how operating systems manage resources and ensure fair execution of applications.

Uploaded by

pchingwaru544
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views23 pages

Process Management Presentation

Process management in operating systems involves the creation, scheduling, and termination of processes, utilizing components such as process control blocks and scheduling algorithms. Key concepts include process states, inter-process communication, and deadlock management, which are crucial for efficient CPU utilization and system stability. Understanding these elements helps in appreciating how operating systems manage resources and ensure fair execution of applications.

Uploaded by

pchingwaru544
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

PROCESS

MANAGEMENT
WHAT IS PROCESS MANAGEMENT?

• Process Management in Operating Systems refers to how an OS handles the


creation, scheduling and termination of processes.
• Here are the key components and concepts involved in process management
within operating systems:
1. processes and process states
• 2. process control block
• 3. process scheduling
• 4. scheduling algorithms
• 5. inter-process communication(IPC)
• 6. Process Synchronization
• 7. Deadlock Management
• 8. Multithreading
PROCESSSES AND PROCESS STATES

• A process is a program in execution, which includes the program


code, current activity and associated resources.
• When it comes to the process states we have the primary states
which are:
• New- the process is being created.
• Ready- the process is waiting to be assigned to a processor.
• Running- the process is currently being executed by the CPU
• Waiting/blocked- the process is waiting for some event to
occur(e.g, i/o completion)
• Terminated/exit – the process has finished execution.
• There are additional stated which are:
• 1. sleeping- waiting for an event(eg, i/o completion)
• 2. stopped- suspended, awaiting continuation signal
• 3. suspended- temporarily stopped, awaiting resume signal
additionally, we have the process state transitions which
refer to the changes in the state of a process(program) as it
executes. These transitions occur dur to various events, such
as:
• New Ready: process creation completes, and the
process is added to the ready queue.
• Read y Running: scheduler selects the process for
execution, and it starts running the CPU.
• Running Waiting (Blocked): Process requests I/O or
encounters an event that requires waiting.
• Waiting Ready: I/O operation completes, or event
occurs, making the process ready again.
• Running Stopped: process is suspended temporarily.
• Stopped Ready: Process is resumed.
• Transitions are caused by the following:
• 1. CPU Scheduling-the scheduler allocates/ deallocates the
CPU
• 2. I/O operations- completion of I/O requests
• 3. Interrupts- Hardware interrupts(e.g, keyboard,network)
• 4. Exceptions- exceptions or errors occur
• 5. Timeouts- Process exceeds time limits.
PROCESS STATE MODELS
PROCESS CONTROL BLOCK

• This is a data structure used by the OS to store all information about a process including:
- Process ID
• -Process state
• - CPU registers
• -Memory Management Information
• -Accounting Information(e.g CPU time)
• -scheduling information
• -program counter
• -security information
• -memory pointers
• -i/o status information
• The process keeps track of many important pieces of information needed to manage
processes efficiently.
• While creating a process, the OS performs several operations.
To identify processes, it assigns a process identification
number(PID)to each process. As the operating system supports
multi-programming, it needs to keep track of all the processes.
• For this task, the process control block(PCB) is used to track the
process’s execution status. Each block of memory contains
information about the process state, program counter, stack
pointer, status of opened files, scheduling algorithms.
• When the process makes a transition from one state to another,
the operating system must update information in the process’s
PCB.
Structures of the Control Block
PROCESS SCHEDULING

• A scheduler is a component that decides which process runs at any given time.
• The 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
• 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 a ready state
or from a waiting state to ready state during resource allocation. This switching
happens because the CPU may give other processes priority and substitute the
currently active process for the higher priority
• Types of scheduling:
- Long term scheduling- this controls the admission of processes into
the system. It brings the new process to the ‘ready state’. It controls
the degree of multi-programming that is the number of processes
present in a ready state at any point in time.
• -Short Term Scheduling – decides which of the ready processes to
execute next(CPU scheduling). Note that this only selects the process
to schedule it dosen’t load the process on running. here is when all
the scheduling algorithms are used.
• - Medium-term scheduling- involves swapping processes in and out of
memory(used in virtual memory systems). It is responsible for
suspending and resuming the process.
Some other schedulers

• We have the I/O schedulers- these are in charge of managing


the execution of I/O operations such as reading and writing to
discs or networks. They can use various algorithms to
determine the order in which I/O operations are executed
such as the first come first served(FCFS) or round robin (RR).
• Real- time schedulers- in real time systems, real-time
schedulers ensure that critical tasks are completed within a
specified time frame. They can prioritize and schedule tasks
using various algorithms such as Earliest Deadline First(EDF)
or Rate Monotomic(RM)
SCHEDULING ALGORITHMS

There are terminologies that you should note:


• Arrival time-the time at which the process arrives in the
ready queue
• Completion time- the time at which the process completes
its execution
• Burst time- time required by a process for CPU execution
• Turn Around time- time difference between completion and
arrival time
• Turnaround time=completion time-arrival time
• Waiting time-time difference between turnaround time and
burst time
• Waiting time=turn around time – burst time
• FIRST COME FIRST SERVE
• - this is considered to be the simplest of all scheduling algorithms. First come
first serve scheduling algorithm states that the process that requests the
CPU first is allocated the CPU first and is implemented by using FIFO queue.
• The characteristics of FCFS are as follows-
- The FCFS supports non-preemptive and preemptive CPU scheduling
algorithms.
- Tasks are always executed on a first come, first serve, concept
- FCFS is easy to implement and use.
- This algorithm is not much efficient in performance, and the wait time is
quite high.
• SHORTEST JOB FIRST(SJF)
• - this is a scheduling process process that selects the waiting process with
the smallest execution time to execute next.
• This scheduling method may or may not be preemptive. It significantly
reduces the average time for other processes waiting to be executed
• Characteristics of SJF
• -it is associated with each task as a unit of time to complete
• It may cause starvation if shorter processes keep coming. This problem
can be solved using the concept of ageing.
• It has the advantage of having minimum average waiting among all
operating system scheduling algorithms.
• LONGEST JOB FIRST(LJF)
• -this scheduling process is the opposite of shortest job first, as the name
suggests this algorithm is based upon the fact that the process with the
largest burst time is processed first. Longest Job First is non-preemptive in
nature.
• Characteristics of LJF:
-among all the processes waiting in a waiting queue, CPU is always
assigned to the process having the largest burst time.
• -if two processes have the same burst time then the tie is broken using
FCFS that is the process tat arrived first is processed first.
• It can be of both preemptive and non preemptive types.

• ROUND ROBIN
• -this is a CPU scheduling algorithm where each process is cyclically
assigned a fixed time slot. It is the preemptive version of the First
come First Serve CPU scheduling algorithm.
• Round Robin CPU Algorithm generally focuses on Time Sharing
technique.
• Characteristics of Round Robin:
• -simple, easy to use starvation-free all processes get the balanced
CPU allocation.
• Considered as preemptive as the processes are given to the CPU for a
very limited time.
• SHORTEST REMAINING TIME FIRST
• -the preemptive version of the Shortest Job first where the processor
is allocated to the job closest to completion. In SRTF the process with
the smallest amount of time remaining until completion is selected
to execute.
• Characteristics of SRTF
• -the algorithm makes the processing of the jobs faster than SJF
algorithm,given it’s overhead charges are not counted.
• - the context switch is done a lot more times in SRTF than in SJF and
consumes the CPU’S valuable time for processing. This adds up to its
processing time and diminishes its advantage of fast processing.
• PRIORITY SCHEDULING
• -the preemptive priority CPU scheduling algorithm is a
preemptive method of CPU Scheduling algorithm that works
based on the priority of a process. In this algorithm, the
editor sets the functions to be as important, meaning that
the most important process must be done first. In the case
of any conflict, that is where there is more than one
process with equal value, then the most CPU planning
algorithm works on the basis of the FCFS algorithm.
• CHARACTERISTICS OF PRIORITY SCHEDULING
• - schedule tasks based on priority.
• - lower is the number assigned, higher is the priority level
of a process
CONCLUSION

• - effective process management in operating systems Is


essential for maximizing CPU utilization, ensuring fair
process execution, and maintaining system stability. By
understanding these concepts, one can appreciate how
operating systems manage system resources efficiently an
provide a conducive environment for running applications.

You might also like