
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
I understand how to implement a static file membership. (static and dynamic list) tracking system when the servers are.
Typology: Lecture notes
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























[Winter 2021] School of Engineering and Technology, UW-Tacoma
TCSS 558: APPLIED DISTRIBUTED COMPUTING
Chapter 6.3: Distributed Mutual Exclusion
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. OBJECTIVES – 3/
[Winter 2021] School of Engineering and Technology, UW-Tacoma Daily Feedback Quiz in Canvas – Available After Each Class Extra credit available for completing surveys ON TIME Tuesday surveys: due by ~ Wed @ 10p Thursday sur veys: due ~ Mon @ 10p March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. ONLINE DAILY FEEDBACK SURVEY March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18.
[Winter 2021] School of Engineering and Technology, UW-Tacoma Can we submit assignment-2 without implementing the docker? If yes, how many points does the team lose? The docker files are scored as 5 points However, if the docker files (runser ver.sh) is the only documentation that describes how to deploy your distributed key value store is missing, the p oint los s c ould b e muc h mor e! Implementing docker involves updating the docker_ser ver and d o cker_client directories do cker_ser ver should have a runserver.sh script that describes how to star t the ser ver and configure methods of membership tracking runserver.sh script should have comments Examples for star ting ser ver s with all available methods of membership tracking should be provided Can comment out using “#” all but the active method Container rebuilt w/ new runserver.sh to change method for testing March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. FEEDBACK - 2
Chapter 6.3: Distributed Mutual Exclusion
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. OBJECTIVES – 3/
[Winter 2021] School of Engineering and Technology, UW-Tacoma Include readme.txt or doc file with instructions in submission Must document membership tracking method
please indicate which types to test << ID Description F Static file membership tracking – file is not reread FD Static file membership tracking DYNAMIC - file is periodically reread to refresh membership list T TCP membership tracking – servers are configured to refer to central membership ser ver U UDP membership tracking - automatically discovers nodes with no configuration March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. SHORT-HAND-CODES FOR MEMBERSHIP TRACKING APPROACHES Due Saturday March 20th^ at 11:59am (revised) Goal: Replicated Key Value Store
Team signup to be posted on Canvas under ‘People’ Build off of Assignment 1 GenericNode Focus on TCP client/server w/ replication How to track membership for data replication? Can implement multiple types of membership tracking for extra credit March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. ASSIGNMENT 2
[Winter 2021] School of Engineering and Technology, UW-Tacoma
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18.
L18.
[Winter 2021] School of Engineering and Technology, UW-Tacoma Provide a vector clock label for unlabeled events March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. VECTOR CLOCKS EXAMPLE - 3 TRUE/FALSE: The sending of message m 3 is causally dependent on the sending of message m 1. The sending of message m 2 is causally dependent on the sending of message m 1. March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. VECTOR CLOCKS EXAMPLE - 4
[Winter 2021] School of Engineering and Technology, UW-Tacoma
Chapter 6.3: Distributed Mutual Exclusion
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18.
L18.
[Winter 2021] School of Engineering and Technology, UW-Tacoma
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. DISTRIBUTED MUTUAL EXCLUSION ALGORITHMS
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. TOKEN-BASED ALGORITHMS
[Winter 2021] School of Engineering and Technology, UW-Tacoma
CONTRAST: Token-ring did not ask nodes for permission
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. DISTRIBUTED MUTUAL EXCLUSION ALGORITHMS - 3 When resource not available, coordinator can block the requesting process, or respond with a reject message P2 must poll the coordinator if it responds with reject otherwise can wait if simply blocked Requests granted permission fairly using FIFO queue Just three messages: (request, grant (OK), release) March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. CENTRALIZED MUTUAL EXCLUSION P 1 executes P 2 blocks P 1 finishes; P 2 executes Permission granted from coordinator / No response from coordinator
[Winter 2021] School of Engineering and Technology, UW-Tacoma Issues Coordinator is a single point of failure Processes can’t distinguish dead coordinator from “blocking” when resource is unavailable No difference between CRASH and Block (for a long time) Large systems, coordinator becomes performance bottleneck Scalability: Performance does not scale Benefits Simplicity: Easy to implement compared to distributed alternatives March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. CENTRALIZED MUTUAL EXCLUSION - 2 Ricart and Agrawala [1981], use total ordering of all events Leverages Lamport logical clocks Package up resource request message (AKA Lock Request) Send to all nodes Include: Name of resource Process number Current (logical) time Assume messages are sent reliably No messages are lost March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. DISTRIBUTED ALGORITHM
[Winter 2021] School of Engineering and Technology, UW-Tacoma
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. CHALLENGES WITH DISTRIBUTED ALGORITHM Problem: Multicast communication required –or- each node must maintain full group membership Track nodes entering, leaving, crashing… Problem: Every process is involved in reaching an agreement to grant access to a shared resource This approach may not scale on resource-constrained systems Solution: Can relax total agreement requirement and proceed when a simple majority of nodes grant permission Presumably any one node locking the resource prevents agreement If one node gets majority of acknowledges no other can Requires every node to know size of system (# of nodes) Distributed algorithm for mutual exclusion works best for: Small groups of processes When memberships rarely change March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. CHALLENGES WITH DISTRIBUTED ALGORITHM - 2
[Winter 2021] School of Engineering and Technology, UW-Tacoma
March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. DECENTRALIZED ALGORITHM Assumption #2: When a coordinator crashes, it recovers quickly, but will have forgotten votes before the crash. Approach assumes coordinators reset arbitrarily at any time Risk: on crash, coordinator forgets it previously granted permission to the shared resource, and on recovery it errantly grants permission again The Hope: if coordinator crashes, upon recover y, the node granted access to the resource has already f inished before the restored coordinator grants access again... March 11, 2021 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. DECENTRALIZED ALGORITHM - 2
[Winter 2021] School of Engineering and Technology, UW-Tacoma WE WILL RETURN AT 3:01 PM October 24, 2016 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18.
[Winter 2021] School of Engineering and Technology, UW-Tacoma October 24, 2016 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18. October 24, 2016 TCSS558: Applied Distributed Computing [Winter 2021] School of Engineering and Technology, University of Washington - Tacoma L18.