SlideServe
Menu
Préférences
© SlideServe · v2026

Distributed Mutual Exclusion Algorithms: Achieving Synchronization in Distributed Systems

victortaylor avatar
14 diapositives · 501 Views · Jan 07, 2020

Explore how mutual exclusion algorithms ensure exclusive resource access in distributed systems, comparing centralized and distributed approaches with advantages and disadvantages.

Distributed Mutual Exclusion Algorithms: Achieving Synchronization in Distributed Systems - slide 1
01 / 14Distributed Mutual Exclusion Algorithms: Achieving Synchronization in Distributed Systems
1 / 17

Télécharger la présentation

Distributed Mutual Exclusion Algorithms: Achieving Synchronization in Distributed Systems
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Distributed Mutual Exclusion • Synchronization in Distributed Systems • Synchronization in distributed systems are often more difficult compared to synchronization in uniprocessor and multiprocessor systems.

  2. Synchronization in Distributed Systems • Synchronization in time – achieved by Clock Synchronization algorithms • Synchronization between resources - Mutual Exclusion algorithms • Synchronization in activities - Distributed Transaction paradigms

  3. Distributed Mutual Exclusion • Mutual Exclusion Mutual exclusion (often abbreviated to mutex) algorithms are used in concurrent programming to avoid the simultaneous use of a common resource, such as a global variable, by pieces of computer code called critical sections.

  4. Distributed Mutual Exclusion • Critical Sections In concurrent programming a critical section is a piece of code that accesses a shared resource (data structure or device) that must not be concurrently accessed by more than one thread of execution. A critical section will usually terminate in fixed time, and a thread, task or process will only have to wait a fixed time to enter it. Some synchronization mechanism is required at the entry and exit of the critical section to ensure exclusive use, for example a semaphore.

  5. Distributed Mutual Exclusion • Achieving Mutual exclusion • Hardware solutions - Disabling interrupts on entry into the critical section • System variables - By using semaphores implemented as Locks • Software solutions - Mutual Exclusion Algorithms

  6. Distributed Mutual Exclusion • Mutual Exclusion Algorithms • Centralized algorithms • Distributed algorithms • Token ring algorithm

  7. Mutual Exclusion – centralized Algorithm • Process 1 asks the coordinator for permission to enter a critical region. Permission is granted • Process 2 then asks permission to enter the same critical region. The coordinator does not reply. • When process 1 exits the critical region, it tells the coordinator, when then replies to 2

  8. Centralized Algorithm – Advantages Vs Disadvantages • Advantages • Fair algorithm, grants in the order of requests • The scheme is easy to implement • Scheme can be used for general resource allocation • Shortcomings • Single point of failure. No fault tolerance • Confusion between No-reply and permission denied • Performance bottleneck of single co-ordinator in a large system

  9. Mutual Exclusion – Distributed Algorithm • Two processes want to enter the same critical region at the same moment. • Process 0 has the lowest timestamp, so it wins. • When process 0 is done, it sends an OK also, so 2 can now enter the critical region.

  10. Distributed Algorithm – Advantages Vs Disadvantages • Advantages • Single point of failure is overcome by keeping the system running even if one processes fail • No bottleneck on one process • Shortcomings • 2(n-1) messages or more than that • Waiting for n-1 processes to accept is overkill • Improvements • Group membership for easy communication

  11. A Token Ring Algorithm • An unordered group of processes on a network. • A logical ring constructed in software.

  12. Token Ring Algorithm – Advantages Vs Disadvantages • Advantages • No co-ordinator and does not depend on other processes • On Crash token is just passed on to the neighbour • Shortcomings • Only a physical Q, no logical Q • Loss of token – Regeneration of tokens • Difficulty in finding the token crash – The processor might be alive

  13. Comparison • A comparison of three mutual exclusion algorithms.

  14. References • Distributed systems – Principles and Paradigms – Andrew S Tanenbaum • A Survey of Mutual-Exclusion Algorithms for Multiprocessor Operating Systems http://www.teamten.com/lawrence/242.paper/242.paper.html