Distributed Coordination
Timing Events
Timestamp
Mutual Exclusion
Centralized approach -- Single coordinator using 3 messages.
- Fair?
- Election held if coordinator fails. Process which detects failure send message to all higher numbered processes (highest is coordinator). Waits T for reply and if none, assumes coordinator duties by sending out assumption message. If reply received, waits T for assumption message and if not received (new coordinator died) starts election over again.
Distributed approach --- Sends messages to all processes. If all replies received, enter critical section. Replies are returned on 3 factors:
- Wait if in critical section
- Reply immediately if not in critical section AND do not wish to enter.
- If want to enter, look at timestamp and reply if the other process asked first.
Advantages:
- No deadlock possible.
- Mutual exclusion enforced.
- No starvation.
Problems:
- Need ID of all processes.
- Process failure?
Token Passing -- Similar to Token Bus LAN. If failure, election held by passing election message with ID enclosed to neighbor, who sends to its neighbor, etc. until it returns to originator. Every process that receives it sends out their ID so a process list can be built with all active processes included. Highest # becomes coordinator.
Atomic Transactions -- more difficult over network.
- Every node has transaction coordinator.
- Commit or abort protocol.
- Log everything for recovery or reconstruction.
- Coordinator failure? Network failure?
Concurrency Control -- Locking Protocols to protect data.
- Non-replicated scheme
- Majority
- Primary copy
- Single coordinator
Reaching Agreement -- Bad comms or bad processes
Deadlock detection -- nightmare in distributed systems, mostly impossible.
- Centralized method --- Global Wait-for Graph.
- Distributed method --- Edge Chasing.
- Phantom Deadlock.
Copyright ©2014, G. Hill Price
Send comments to G. Hill Price