AdvancedOperatingSystems
I
M
C
A
-
I
I
S
E
M
E
S
T
E
R
S
U
B
J
E
C
T
C
O
D
E
:
P
2
2
M
C
A
C
C
2
2
UNIT – I
Process Synchronization & Scheduling
Presented By
S.Vijaya Lakshmi B.E(CSE)
Assistant Professor,
Department of Computer Science,
Sri Sarada Niketan College for Women,Karur.
Process Synchronization
 Process Synchronization is the coordination of execution of
multiple processes in a multi-process system to ensure that they
access shared resources in a controlled and predictable manner.
 It aims to resolve the problem of race conditions and other
synchronization issues in a concurrent system.
 The main objective of process synchronization is to ensure that
multiple processes access shared resources without interfering
with each other, and to prevent the possibility of inconsistent data
due to concurrent access.
Process Synchronization – categories
 Independent Process: The execution of one
process does not affect the execution of other
processes.
 Cooperative Process: A process that can affect or
be affected by other processes executing in the
system.
Synchronization Mechanisms
There are various synchronization mechanisms that are
used to synchronize the processes.
• Race Condition
A Race Condition typically occurs when two or more threads
try to read, write and possibly make the decisions based on the
memory that they are accessing concurrently.
• Critical Section
The regions of a program that try to access shared
resources and may cause race conditions are called critical section.
Process Scheduling
 Process Scheduling is an OS task that schedules
processes of different states like ready, waiting, and
running. Process scheduling allows OS to allocate a
time interval of CPU execution for each process.
 Another important reason for using a process
scheduling system is that it keeps the CPU busy all
the time.
Process scheduling categories
 Long-Term Scheduler or Job Scheduler. The job
scheduler is another name for Long-Term scheduler....
 Short-Term Scheduler or CPU Scheduler. CPU
scheduler is another name for Short-Term scheduler....
 Medium-Term Scheduler.
PROCESS SCHEDULING QUEUES
 Job queue This queue keeps all the processes in the
−
system.
 Ready queue This queue keeps a set of all processes
−
residing in main memory, ready and waiting to execute. A
new process is always put in this queue.
 Device queues The processes which are blocked due to
−
unavailability of an I/O device constitute this queue.
Allocation
 Allocation is the process of requesting access to a
data set. If you allocate a data set that exists, the
system allows you to open the data set.
 If you allocate a data set that does not exist, the
system creates space for it on an available device
and allows you to open that space.
Memory Management
 In a multiprogramming computer, the operating
system resides in a part of memory and the rest is
used by multiple processes.
 The task of subdividing the memory among different
processes is called memory management.
 Memory management is a method in the operating
system to manage operations between main memory
and disk during process execution.
Memory management techniques
 Single contiguous allocation.
 Partitioned allocation.
 Paged memory management.
 Segmented memory management.
Low Memory: This is
the memory where
the OS resides in this
memory.
High Memory: This
memory holds user
processes.
Memory Management in OS
Thank You

Advanced Operating Systems- Process Synchronization

  • 1.
    AdvancedOperatingSystems I M C A - I I S E M E S T E R S U B J E C T C O D E : P 2 2 M C A C C 2 2 UNIT – I ProcessSynchronization & Scheduling Presented By S.Vijaya Lakshmi B.E(CSE) Assistant Professor, Department of Computer Science, Sri Sarada Niketan College for Women,Karur.
  • 2.
    Process Synchronization  ProcessSynchronization is the coordination of execution of multiple processes in a multi-process system to ensure that they access shared resources in a controlled and predictable manner.  It aims to resolve the problem of race conditions and other synchronization issues in a concurrent system.  The main objective of process synchronization is to ensure that multiple processes access shared resources without interfering with each other, and to prevent the possibility of inconsistent data due to concurrent access.
  • 3.
    Process Synchronization –categories  Independent Process: The execution of one process does not affect the execution of other processes.  Cooperative Process: A process that can affect or be affected by other processes executing in the system.
  • 4.
    Synchronization Mechanisms There arevarious synchronization mechanisms that are used to synchronize the processes. • Race Condition A Race Condition typically occurs when two or more threads try to read, write and possibly make the decisions based on the memory that they are accessing concurrently. • Critical Section The regions of a program that try to access shared resources and may cause race conditions are called critical section.
  • 5.
    Process Scheduling  ProcessScheduling is an OS task that schedules processes of different states like ready, waiting, and running. Process scheduling allows OS to allocate a time interval of CPU execution for each process.  Another important reason for using a process scheduling system is that it keeps the CPU busy all the time.
  • 6.
    Process scheduling categories Long-Term Scheduler or Job Scheduler. The job scheduler is another name for Long-Term scheduler....  Short-Term Scheduler or CPU Scheduler. CPU scheduler is another name for Short-Term scheduler....  Medium-Term Scheduler.
  • 7.
    PROCESS SCHEDULING QUEUES Job queue This queue keeps all the processes in the − system.  Ready queue This queue keeps a set of all processes − residing in main memory, ready and waiting to execute. A new process is always put in this queue.  Device queues The processes which are blocked due to − unavailability of an I/O device constitute this queue.
  • 8.
    Allocation  Allocation isthe process of requesting access to a data set. If you allocate a data set that exists, the system allows you to open the data set.  If you allocate a data set that does not exist, the system creates space for it on an available device and allows you to open that space.
  • 9.
    Memory Management  Ina multiprogramming computer, the operating system resides in a part of memory and the rest is used by multiple processes.  The task of subdividing the memory among different processes is called memory management.  Memory management is a method in the operating system to manage operations between main memory and disk during process execution.
  • 10.
    Memory management techniques Single contiguous allocation.  Partitioned allocation.  Paged memory management.  Segmented memory management.
  • 11.
    Low Memory: Thisis the memory where the OS resides in this memory. High Memory: This memory holds user processes. Memory Management in OS
  • 13.