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

OS Process Management Guide

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 views16 pages

OS Process Management Guide

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/ 16

OPERATING

SYSTEM:
OPERATION
PROCESS
MANAGEMENT
L. ARCHANA

NEXT 1
INTRODUCTION TO PROCESS IMPORTANCE OF PROCESS
MANAGEMENT MANAGEMENT

• Definition of a Process: - A • Efficient process management


process is a program in ensures optimal utilization of
execution, consisting of code, CPU, memory, and other
data, and a stack.- resources. - It enables
multitasking and ensures system
stability and responsiveness.

2
UNDERSTANDING
PROCESS MANAGEMENT
Processes in OS Process Management Resource Utilization
Processes are fundamental Process management involves Efficient process management
units of execution in an OS. creating, scheduling, ensures optimal resource
They consist of program terminating, and utilization and system
instructions, processor state, synchronizing processes. OS responsiveness. Monitoring
and resource allocations. OS provides mechanisms to and controlling processes are
manages processes by control and coordinate key for overall system
scheduling them efficiently. processes for optimal stability.
performance.

NEXT 3
PROCESS SCHEDULING ALGORITHMS

Types of Algorithms Scheduling Efficiency Scheduling Algorithms:

Operating systems use The choice of scheduling First-Come-First-Serve (FCFS):


various scheduling algorithms Processes are executed in the
algorithm impacts system order they arrive.
like FCFS, Round Robin, and performance. Balancing
Priority Scheduling to manage factors like throughput, Shortest Job First (SJF): The process
process execution. Each response time, and fairness is with the smallest execution time is
algorithm has unique crucial for effective process scheduled next. -
characteristics and objectives. management. Round Robin (RR): Processes are
given a fixed time slice in rotation.
Priority Scheduling: Processes are
executed based on priority

NEXT 4
PROCESS SYNCHRONIZATION
Importance of Synchronization

Process synchronization is critical for


avoiding race conditions and ensuring
data consistency in multi-threaded
environments. Techniques like locks,
semaphores, and monitors help achieve
synchronization.

NEXT 5
Process Lifecycle
States of a Process:
New: Process is being created.
Ready: Process is waiting to be
assigned to a processor.
Running: Process is currently being
executed.
Waiting: Process is waiting for an
event or resource.
Terminated: Process has finished
execution.
6
7

Memory Management
Memory Management in OS Description

OS allocates memory to processes efficiently, ensuring each process gets the


Allocation
required memory space.

Released memory is reclaimed by the OS and made available for other processes,
Deallocation
preventing memory leaks.

NEXT
Process Control Block (PCB)
• Role of PCB: - PCB contains all the information about a process
required for its management.-
• Components of PCB:
• Process ID: Unique identifier for each process.
• State: Current state of the process (e.g., running, waiting).
• Program Counter: Address of the next instruction to be executed.
• CPU Registers: Contents of the CPU registers. - Memory Limits:
Address space allocated to the process. - I/O Status Information: List
of I/O devices allocated to the process.
I/O
MANAGEMENT
Input/Output Operations
I/O management involves handling input/output
requests from processes efficiently. OS
coordinates device communication and ensures
data integrity.

NEXT 9
10

Resource Allocation and


Deadlocks
60% 40%

Resource Allocation Deadlocks in Operating


Strategies Systems
Various resource allocation Deadlocks occur when processes
strategies like Banker's Algorithm are waiting for resources held by
and FIFO prevent resource others, leading to a system-wide
contention and ensure fair stalemate. Detection and recovery
resource distribution. mechanisms are essential to
handle deadlocks.
NEXT
Context Switching

• Definition: - Context switching is


the process of saving the state of
a currently running process and
loading the state of the next
process to be executed.
• Steps in Context Switching: -
Save the state of the current
process (e.g., CPU registers,
program counter)

11
Inter-Process Communication
(IPC)
• Definition: - IPC allows processes to communicate and synchronize
their actions.-
• Mechanisms:
• Pipes: Provide a unidirectional flow of data between processes.
• Message Queues: Allow processes to send and receive messages. -
• Shared Memory: Multiple processes can access the same memory
space. -
• Semaphores and Mutexes: Used for synchronization to prevent race
conditions.

12
Deadlock Handling
• Definition of Deadlock: A situation where a group of processes become
stuck in a state where they cannot proceed because each is waiting for
a resource held by another.
• Conditions for Deadlock:
• Mutual Exclusion: Only one process can use a resource at a time.
• Hold and Wait: Processes holding resources can request additional
resources.
• No Preemption: Resources cannot be forcibly taken from processes. -
• Circular Wait: A circular chain of processes exists where each process is
waiting for a resource held by the next process in the chain.-.
13
Deadlock Handling
• Strategies:
• Prevention: Ensure that at least one of
the necessary conditions for deadlock
cannot occur.
• Avoidance: Use algorithms like Banker's
Algorithm to allocate resources safely.
• Detection: Identify deadlock and
recover by aborting or preempting
processes.
• Recovery: Methods for recovering from
deadlock situations, such as process
termination or resource preemption
14
PROCESS MANAGEMENT IN MODERN
OPERATING SYSTEMS
Overview: Different OSes handle process management in various
ways.-

Windows: Linux macOS


Provides detailed task Utilizes process management Uses Activity Monitor to
management through Task tools like ps, top, and htop. - manage and monitor
Manager. - Supports multi- Supports process scheduling processes. - Incorporates
threading and prioritization.- with different algorithms.- * advanced scheduling
techniques and prioritization.

NEXT 15
THANK YOU

NEXT 16

You might also like