CS603 Process Synchronization February 11, 2002. Synchronization: Basics Problem: Shared Resources –Generally data –But could be others Approaches: –Model.

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Distributed Mutual Exclusion.
Advertisements

CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Chapter 12 Message Ordering. Causal Ordering A single message should not be overtaken by a sequence of messages Stronger than FIFO Example of FIFO but.
CS542 Topics in Distributed Systems Diganta Goswami.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Synchronization in Distributed Systems
Distributed Systems Spring 2009
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
1. Explain why synchronization is so important in distributed systems by giving an appropriate example When each machine has its own clock, an event that.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
Coordination in Distributed Systems Lecture # 8. Coordination Anecdotes  Decentralized, no coordination  Aloha ~ 18%  Some coordinating Master  Slotted.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Mutex EE324 Lecture 11.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Mutual exclusion Concurrent access of processes to a shared resource or data is executed in mutually exclusive manner Distributed mutual exclusion can.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
4.5 Distributed Mutual Exclusion Ranjitha Shivarudraiah.
QoS-enabled Tree-based Distributed Mutexes James Edmondson Brian Sulcer.
Lecture 5: Sun: 1/5/ Distributed Algorithms - Distributed Databases Lecturer/ Kawther Abas CS- 492 : Distributed system &
MUTUAL EXCLUSION AND QUORUMS CS Distributed Mutual Exclusion Given a set of processes and a single resource, develop a protocol to ensure exclusive.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
1 Mutual Exclusion: A Centralized Algorithm a)Process 1 asks the coordinator for permission to enter a critical region. Permission is granted b)Process.
Coordination and Agreement. Topics Distributed Mutual Exclusion Leader Election.
Synchronization CSCI 4780/6780. Mutual Exclusion Concurrency and collaboration are fundamental to distributed systems Simultaneous access to resources.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
1 Clock Synchronization & Mutual Exclusion in Distributed Operating Systems Brett O’Neill CSE 8343 – Group A6.
Lecture 10 – Mutual Exclusion Distributed Systems.
CS603 Fault Tolerance - Communication April 17, 2002.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Distributed Transaction Management, Fall 2002Lecture 2 / Distributed Locking Jyrki Nummenmaa
Distributed Process Coordination Presentation 1 - Sept. 14th 2002 CSE Spring 02 Group A4:Chris Sun, Min Fang, Bryan Maden.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Election Distributed Systems. Algorithms to Find Global States Why? To check a particular property exist or not in distributed system –(Distributed) garbage.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
Synchronization in Distributed Systems Chapter 6.3.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are:  Resource sharing  Avoiding concurrent update on shared data  Controlling the.
CS3771 Today: Distributed Coordination  Previous class: Distributed File Systems Issues: Naming Strategies: Absolute Names, Mount Points (logical connection.
CSC 8420 Advanced Operating Systems Georgia State University Yi Pan Transactions are communications with ACID property: Atomicity: all or nothing Consistency:
Process Synchronization Presentation 2 Group A4: Sean Hudson, Syeda Taib, Manasi Kapadia.
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –Mutual exclusion.
Lecture 11: Coordination and Agreement Central server for mutual exclusion Election – getting a number of processes to agree which is “in charge” CDK4:
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
4.5 Distributed Mutual Exclusion
Distributed Mutex EE324 Lecture 11.
Chapter 6.3 Mutual Exclusion
Timewarp Elias Muche.
Outline Distributed Mutual Exclusion Introduction Performance measures
Lecture 10: Coordination and Agreement
Synchronization (2) – Mutual Exclusion
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
Prof. Leonardo Mostarda University of Camerino
Lecture 11: Coordination and Agreement
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
Presentation transcript:

CS603 Process Synchronization February 11, 2002

Synchronization: Basics Problem: Shared Resources –Generally data –But could be others Approaches: –Model as sequential process –Model as parallel process Models assume global state! P1 P3P2

Global State Plausible in sequential system –But expensive –Solution: Send only needed portions of state What about Parallel model? –Distributed Virtual Memory! –With all the advantages and problems –What about non-memory resources? Question: What is global state?

Alternative: Mutual Exclusion Control access to shared resources –Only one process allowed to use resource at a time –Doesn’t require global state Sequential simulation can be viewed as mutual exclusion on entire state –But we can do better –Control only when resource in contention

Mutual Exclusion Techniques: Centralized Approach Request for resource sent to coordinator When available, responds “go ahead” When done, requestor sends “release” to coordinator Problems: –Doesn’t scale –Single point of failure –No way to distinguish failure from resource in use

Evaluating Mutual Exclusion Techniques Does it guarantee mutual exclusion? Does it prevent starvation? –If a process requests a resource, it is guaranteed to eventually get it –Assumes resource use bounded Is it fair? –What do we mean by fair? Does it scale? Does it handle failures?

Mutual Exclusion: Token Passing Token associated with resource –Initially held by “first” process –When resource not in use, token passed to next process Problems: –Potential delay Resource need and path of token unrelated –Communication cost –Failure causing “loss of token”

Mutual Exclusion: Token Passing Does it guarantee mutual exclusion? –Yes Does it prevent starvation? –Yes Is it fair? –Everyone gets their turn –But not “first-come, first-served” Does it scale? –Yes Does it handle failures? –No

Timestamp-based request (Lamport ’78) When resource needed broadcast request: –Name of resource needed –Process ID of requestor –Time at requestor On receiving a request message: –If using resource, queue request –If waiting for resource, compare request timestamp with your own request timestamp Lowest “wins” – if other is lower, send “OK”, else queue –If not waiting for or using resource, send “OK” When OK received from all other processes, use resource

Timestamp-based request (Lamport ’78) Does it guarantee mutual exclusion? –Yes Does it prevent starvation? –Yes Is it fair? –First-come, first-served Where “first” defined by clock synchronization Does it scale? –Requires all processes to respond to any request Does it handle failures? –No single point of failure –Instead, n points of failure!

Comparison of Approaches AlgorithmMessages per request Delay (in messages) Fault tolerance Coordinator32Single point of failure Token Ring1 to ∞0 to n-1n points of failure Timestamp2 (n-1) n points of failure

What’s next? Fault tolerant solutions –Colored Ticket Algorithm Multiple resources –Dining philosophers problem