Institute of Computer Science
  1. Courses
  2. 2020/21 spring
  3. Distributed Systems (LTAT.06.007)
ET
Log in

Distributed Systems 2020/21 spring

  • General
  • Lectures
  • Practical work
  • Study materials
  • Practical work submission
  • Message board

Seminar 10: Quorum-Based Protocols


Goal:

  • Gifford's Scheme of Voting for supporting replicated writes
  • Apply Gifford Quorum-Based protocol to a set of examples and look for Conflicts.

Definitions:

Quorum-Based Protocols:

  • Resolves write-write or read-write conflicts
  • Client processes are required to request and acquire the permission of multiple servers before reading and writing a replicated data item.
  • Example protocol (on a distributed file system):
    • A process that wants to update a replicated file first contacts at majority of servers and get them to agree to do the update.
    • Once they agreed, the file is changed and a new version number is associated with the file.
    • To read a replicated file, a client must also contact at least half the servers plus one and ask them to send the version numbers associated with the file.
    • If all version numbers agree then the file is the most recent one.

Gifford's Scheme:

  • N replicas exist.
  • To read a file, a client needs to assemble a Read Quorum:
    • An arbitrary collection of any NR servers.
  • To write a file, a client needs to assemble a Write Quorum:
    • An arbitrary collection of any NW servers
  • Constraints: The values NR and NW are subject to following constraints:
  1. . NR + NW > N
  2. . NW > {$ \frac{N}{2} $}
    • The first constraint prevents Read-Write conflicts
    • The second constraint prevents Write-Write conflicts

Examples:

Example 1: N = 12 , NR = 3 , NW = 10

A correct choice of read and write set

Example 2: N = 12 , NR = 7 , NW = 6

  • A Write-Write conflict may occur because NW <= {$ \frac{N}{2} $}.
  • One client may choose (A, B, C, E, F,G) as its write set and another client may choose (D,H, I, J,K, L) as its write set.
  • Trouble as the two updates will both be accepted without detecting that they actually conflict.

Example 3: N = 12 , NR = 1 , NW = 12

  • Sets NR to one, making it possible to read a replicated file by finding any copy and using it.
  • Read-One, Write-All (ROWA).

EXERCISE Given below are the N, NR, NW, Where N denotes the total number of replica servers available; NR denotes the read quorum and NW denotes the write quorum. Against each, denote whether the combination is a correct choice or not using above mentioned constraints:

  1. N = 5 , NR = 2 , NW = 4
  2. N = 16 , NR = 8 , NW = 10
  3. N = 16 , NR = 9 , NW = 8
  4. N = 10 , NR = 1 , NW = 10
  5. N = 11 , NR = 4 , NW = 5
  6. N = 20 , NR = 6 , NW = 11

Deliverables of practical session: A PDF file containing the answers to above exercise


Referrences:

  • Distributed Systems, Third edition, Version 3.02 (2018) by Maarten van Steen and Andrew S. Tanenbaum

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment