Advanced Operating Systems
I MCA- II SEMESTER
SUBJECT CODE : P22MCACC22
UNIT – II
Clock Synchronization & Mutual Exclusion
Presented By
S.Vijaya Lakshmi B.E(CSE)
Assistant Professor,
Department of Computer Science,
Sri Sarada Niketan College for Women,Karur.
Clock Synchronization in Distributed
System
 Clock synchronization is the mechanism to
synchronize the time of all the computers
in the distributed environments or system.
 Assume that there are three systems
present in a distributed environment.
Properties of Distributed algorithms to
maintain Clock synchronization:
• Relevant and correct information will be
scattered among multiple machines.
• The processes make the decision only on
local information.
• Failure of the single point in the system must
be avoided.
• No common clock or the other precise global
time exists.
• In the distributed systems, the time is
ambiguous.
Types of Clock Synchronization
 Physical clock synchronization
 Logical clock synchronization
 Mutual exclusion synchronization
Mutual exclusion in distributed system
Mutual exclusion is a concurrency control
property which is introduced to prevent race
conditions.
It is the requirement that a process can not
enter its critical section while another
concurrent process is currently present or
executing in its critical section i.e, only one
process is allowed to execute the critical
section at any given instance of time.
Requirements of Mutual exclusion
Algorithm:
 No Deadlock
 No Starvation
 Fairness
 Fault Tolerance
Solution to distributed mutual
exclusion:
 Token Based Algorithm
 Non-token based approach
 Quorum based approach
Election algorithm
 It assumes that every active process in the
system has a unique priority number.
 The process with highest priority will be
chosen as a new coordinator.
 Hence, when a coordinator fails, this
algorithm elects that active process which
has highest priority number.
Distributed Deadlock Detection
 Distributed deadlocks can occur when
distributed transactions or concurrency
control are utilized in distributed systems.
 It may be identified via a distributed
technique like edge chasing or by creating
a global wait-for graph (WFG) from local
wait-for graphs at a deadlock detector.
Types of deadlock detection
An operating system (OS) can detect deadlocks
by using one of the four common algorithms:
 Banker's algorithm,
 Resource Hierarchy algorithm,
 Deadlock Detection Algorithm or
 Wait-For-Graphs.
Process Deadlocks in Operating System
 Coffman Conditions. A deadlock occurs if the four
Coffman conditions hold true.
 Deadlock Detection. A deadlock can be detected by a
resource scheduler as it keeps track of all the resources
that are allocated to different processes.
 Deadlock Prevention.
 Deadlock Avoidance.
Thank You

Advanced Operating Systems- Clock synchronization and mutual exclusive

  • 1.
    Advanced Operating Systems IMCA- II SEMESTER SUBJECT CODE : P22MCACC22 UNIT – II Clock Synchronization & Mutual Exclusion Presented By S.Vijaya Lakshmi B.E(CSE) Assistant Professor, Department of Computer Science, Sri Sarada Niketan College for Women,Karur.
  • 2.
    Clock Synchronization inDistributed System  Clock synchronization is the mechanism to synchronize the time of all the computers in the distributed environments or system.  Assume that there are three systems present in a distributed environment.
  • 3.
    Properties of Distributedalgorithms to maintain Clock synchronization: • Relevant and correct information will be scattered among multiple machines. • The processes make the decision only on local information. • Failure of the single point in the system must be avoided. • No common clock or the other precise global time exists. • In the distributed systems, the time is ambiguous.
  • 4.
    Types of ClockSynchronization  Physical clock synchronization  Logical clock synchronization  Mutual exclusion synchronization
  • 5.
    Mutual exclusion indistributed system Mutual exclusion is a concurrency control property which is introduced to prevent race conditions. It is the requirement that a process can not enter its critical section while another concurrent process is currently present or executing in its critical section i.e, only one process is allowed to execute the critical section at any given instance of time.
  • 6.
    Requirements of Mutualexclusion Algorithm:  No Deadlock  No Starvation  Fairness  Fault Tolerance
  • 7.
    Solution to distributedmutual exclusion:  Token Based Algorithm  Non-token based approach  Quorum based approach
  • 8.
    Election algorithm  Itassumes that every active process in the system has a unique priority number.  The process with highest priority will be chosen as a new coordinator.  Hence, when a coordinator fails, this algorithm elects that active process which has highest priority number.
  • 9.
    Distributed Deadlock Detection Distributed deadlocks can occur when distributed transactions or concurrency control are utilized in distributed systems.  It may be identified via a distributed technique like edge chasing or by creating a global wait-for graph (WFG) from local wait-for graphs at a deadlock detector.
  • 10.
    Types of deadlockdetection An operating system (OS) can detect deadlocks by using one of the four common algorithms:  Banker's algorithm,  Resource Hierarchy algorithm,  Deadlock Detection Algorithm or  Wait-For-Graphs.
  • 11.
    Process Deadlocks inOperating System  Coffman Conditions. A deadlock occurs if the four Coffman conditions hold true.  Deadlock Detection. A deadlock can be detected by a resource scheduler as it keeps track of all the resources that are allocated to different processes.  Deadlock Prevention.  Deadlock Avoidance.
  • 12.