m ndag 13 maj 13 overview fail recovery precedence 1 n
play

mndag 13 maj 13 OVERVIEW Fail-recovery Precedence (1,N) Logged - PowerPoint PPT Presentation

FAIL-RECOVERY & BYZANTINE REGISTERS mndag 13 maj 13 OVERVIEW Fail-recovery Precedence (1,N) Logged register Byzantine (1,N) Safe (1,N) Regular x2 (1,N) Atomic mndag 13 maj 13 FAIL-RECOVERY Process can fail before completion. o


  1. FAIL-RECOVERY & BYZANTINE REGISTERS måndag 13 maj 13

  2. OVERVIEW Fail-recovery Precedence (1,N) Logged register Byzantine (1,N) Safe (1,N) Regular x2 (1,N) Atomic måndag 13 maj 13

  3. 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

  4. FAIL-RECOVERY Page 171 Correct process = fails & recovers and then “never” fails måndag 13 maj 13

  5. 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

  6. FAIL-RECOVERY - LOGGING Stable storage! Modify “Majority Voting” -> regular logged register. måndag 13 maj 13

  7. Pages 174 -175 måndag 13 maj 13

  8. 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

  9. BYZANTINE SAFE REGISTER One correct writer! Page 176 No concurrency! måndag 13 maj 13

  10. 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

  11. 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

  12. 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

  13. Page 181 faulty may not return latest value måndag 13 maj 13

  14. 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

  15. 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

  16. 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

  17. Pages 184-185 Prewrite with a larger timestamp -> update! N-f > (N + f)/2 måndag 13 maj 13

  18. 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

  19. BYZANTINE ATOMIC REGISTER - AGAIN (1,N) Could use “Read-Impose Write-Majority” + signatures ... Instead ... introduce listeners . Atomic -> ordering. måndag 13 maj 13

  20. Pages 190 - 191 måndag 13 maj 13

  21. 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

  22. Pages 191 -192 måndag 13 maj 13

  23. HAPPY ENDING? Multiple writers? Yes, according to the book. Extend Listener-algorithm. How? måndag 13 maj 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend