Osc Presentation

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

How Task

Management
(processes)
is important in
operating system
concepts
Agenda
KEY TOPICS To Be DISCUSSED
IN
THIS PRESENTATION
• What is process management?
• Attributes
• Process Creation
• Scheduling
• Execution
• Killing the process
• Types of states
• Context switching
• Conclusion
Process Management

A process is a program in the execution phase. A


process is created, executed, and terminated. A
Process goes through these states. So, in the
short process keeps on changing the states.
According to a process’s activity, the process’s
state is determined.
Attributes
Attributes of process Description
Process State The process could be in any state, so the current state of the process
(ready, running, waiting, terminated)

Process privileges This is required for allowing/disallowing access to the system


resource.

Process ID This specifies Unique identification for all processes in the operating
system.

Program Counter Contains the address of the next instruction, which will be executed in
the process.

CPU registers This specifies the registers that are used by the process. They may
include general-purpose registers, index registers accumulators, stack
pointers, etc.

Memory management This includes the memory information like information related to the
information Segment table, memory limits, and page table.

Accounting information This includes the information about the amount of CPU used for
process execution, execution time, time limits, etc.

IO status information There are many Input/Output devices attached to the process, and
the list of I/O devices allocated to the process is maintained.
Process Operation
Process creation , Scheduling
• The first step is process creation. Process creation could be from a user
request(using fork()), a system call by a running process, or system
initialization.

• If the process is ready to get executed, then it will be in the ready queue, and now
it’s the job of the scheduler to choose a process from the ready queue and starts its
execution
Execution, Killing the process

• Here, execution of the process means the CPU is assigned to

the process. Once the process has started executing, it can go

into a waiting queue or blocked state. Maybe the process wants

to make an I/O request, or some high-priority process comes in.

• After process execution, the operating system terminates the

Process control block(PCB).


Killing the process
New state, Ready state, Running state,
Waiting state & Terminate state
1. When a process is created, it is a new state. The process is not yet ready to run in this state and is waiting for the
operating system to give it the green light. Long term schedulers shift the process from a NEW state to a READY
state.

2. After creation now, the process is ready to be assigned to the processor. Now the process is waiting in the ready
queue to be picked up by the short-term scheduler. The short-term scheduler selects one process from the READY
state to the RUNNING state.

3. Once the process is ready, it moves on to the running state, where it starts to execute the instructions that were
given to it. The running state is also where the process consumes most of its CPU time.

4. If the process needs to stop running for some reason, it enters the waiting state. This could be because
It’s waiting for some input
It’s waiting for a resource that’s not available yet.
Some high-priority process comes in that need to be executed.
Then the process is suspended for some time and is put in a WAITING state. Till then next process is given chance
to get executed.

5. After the execution, the process exit to the terminate state, which means process execution is complete.
Context
Context switching is the process of switching
Switching between tasks or contexts. Basically, the state of
the currently executing process is saved before
moving to the new process. Saving state means
copying all live registers to PCB(Process Control
Block) Context switching can be a resource-
intensive process, requiring allocating CPU time,
memory, and other resources. In addition, context
switching can also cause latency and jitter. Due to
these potential issues, minimizing the amount of
context switching in your operating system is
crucial. By doing so, you can improve performance
and stability.
Conclusion

Process management is a critical function of the


operating system. By managing processes, the
operating system can ensure that resources are
used efficiently and that the system remains
stable. In addition, process management allows
the operating system to control how programs
interact with each other.
Do you have any
questions?

.
THANK
YOU!

You might also like