FAIL-RECOVERY & BYZANTINE REGISTERS måndag 13 maj 13
OVERVIEW Fail-recovery Precedence (1,N) Logged register Byzantine (1,N) Safe (1,N) Regular x2 (1,N) Atomic måndag 13 maj 13
FAIL-RECOVERY Process can fail before completion. o precedes o’ if 1. o completes before the invocation of o’; OR 2. o and o’ are invoked by the same process and o’ is invoked after o . måndag 13 maj 13
FAIL-RECOVERY Page 171 Correct process = fails & recovers and then “never” fails måndag 13 maj 13
FAIL-RECOVERY If an operation does not complete, it appears as if it never happened. After a crash, we can restart the operation. måndag 13 maj 13
FAIL-RECOVERY - LOGGING Stable storage! Modify “Majority Voting” -> regular logged register. måndag 13 maj 13
Pages 174 -175 måndag 13 maj 13
Stubborn links -> termination. reading & writing no avoid duplication events. Assumption: majority correct. “Read-Impose Write-Majority” -> atomic “Read-Impose Consult-Majority” -> (N,N) atomic. måndag 13 maj 13
BYZANTINE SAFE REGISTER One correct writer! Page 176 No concurrency! måndag 13 maj 13
Page 178 byzhighestval removes all values that occur less than f times. No such values, use default value. Hence only safe. måndag 13 maj 13
BYZANTINE SAFE REGISTER Only works for N > 4f Byzantine masking qourum: More than (N+2f)/2 After write: more than (N+2f)/2 - f correct & informed processes. Less than N - (N+2f)/2 uninformed processes. In read: (N+2f)/2 + 1 (received values) - (N - (N+2f)/2 -1) (uninformed) - f (faulty) > f values from informed processes. måndag 13 maj 13
BYZANTINE REGULAR REGISTER Same properties as before: regular means either current or previous value. One writer w . Digital signatures! N < 3f måndag 13 maj 13
Page 181 faulty may not return latest value måndag 13 maj 13
RECAP: BYZANTINE QUORUM N- f > (N + f)/2 <=> N> 3f. More than (N + f)/2 - f = (N -f)/2 correct processes. (N -f)/2 x 2 = N-f. Two quorums have more than N-f correct processes. At least one is in both! måndag 13 maj 13
NO SIGNATURES! “Read-Impose Write-Majority” + digital signatures => Byzantine atomic (1, N) register. But: we will do it the hard way! No signatures! Regular Atomic måndag 13 maj 13
BYZANTINE REGULAR REGISTER - AGAIN Only problem with concurrency! Each process store both old and new value. Write twice! It’s only safe to erase the old value when majority has the new. If either the old or new value occurs more than f times -> authentic ! Take the value (old or new) with largest timestamp ( selectedmax ). måndag 13 maj 13
Pages 184-185 Prewrite with a larger timestamp -> update! N-f > (N + f)/2 måndag 13 maj 13
Either updated timestamp or same value If more than f occurrences of old or new value (authentic) and a quorum, then selectmax ts. Trigger new reads if too few good answers. Wait. Many writes -> no quorum. Read concurrent with infinity many writes, no termination. Finite-write termination. måndag 13 maj 13
BYZANTINE ATOMIC REGISTER - AGAIN (1,N) Could use “Read-Impose Write-Majority” + signatures ... Instead ... introduce listeners . Atomic -> ordering. måndag 13 maj 13
Pages 190 - 191 måndag 13 maj 13
Have to get the same value from other processes. When rewritten, forward value to concurrent read. Have to clean up answers[ts] somehow. måndag 13 maj 13
Pages 191 -192 måndag 13 maj 13
HAPPY ENDING? Multiple writers? Yes, according to the book. Extend Listener-algorithm. How? måndag 13 maj 13
Recommend
More recommend