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

m ndag 13 maj 13 overview fail recovery precedence 1 n
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

FAIL-RECOVERY & BYZANTINE REGISTERS

måndag 13 maj 13

slide-2
SLIDE 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

slide-3
SLIDE 3

FAIL-RECOVERY

Process can fail before completion.

  • 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

slide-4
SLIDE 4

FAIL-RECOVERY

Correct process = fails & recovers and then “never” fails Page 171

måndag 13 maj 13

slide-5
SLIDE 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

slide-6
SLIDE 6

Stable storage! Modify “Majority Voting” -> regular logged register.

FAIL-RECOVERY - LOGGING

måndag 13 maj 13

slide-7
SLIDE 7

Pages 174 -175

måndag 13 maj 13

slide-8
SLIDE 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

slide-9
SLIDE 9

BYZANTINE SAFE REGISTER

No concurrency! One correct writer! Page 176

måndag 13 maj 13

slide-10
SLIDE 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

slide-11
SLIDE 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

slide-12
SLIDE 12

BYZANTINE REGULAR REGISTER

Same properties as before: regular means either current

  • r previous value.

One writer w. Digital signatures! N < 3f

måndag 13 maj 13

slide-13
SLIDE 13

Page 181 faulty may not return latest value

måndag 13 maj 13

slide-14
SLIDE 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

slide-15
SLIDE 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

slide-16
SLIDE 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

slide-17
SLIDE 17

Pages 184-185 Prewrite with a larger timestamp -> update! N-f > (N + f)/2

måndag 13 maj 13

slide-18
SLIDE 18

Trigger new reads if too few good answers. Wait. Many writes -> no quorum. Read concurrent with infinity many writes, no

  • termination. Finite-write termination.

Either updated timestamp or same value If more than f occurrences of old

  • r new value (authentic) and a

quorum, then selectmax ts.

måndag 13 maj 13

slide-19
SLIDE 19

BYZANTINE ATOMIC REGISTER - AGAIN

(1,N) Could use “Read-Impose Write-Majority” + signatures ... Instead ... introduce listeners. Atomic -> ordering.

måndag 13 maj 13

slide-20
SLIDE 20

Pages 190 - 191

måndag 13 maj 13

slide-21
SLIDE 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

slide-22
SLIDE 22

Pages 191 -192

måndag 13 maj 13

slide-23
SLIDE 23

HAPPY ENDING?

Multiple writers? Yes, according to the book. Extend Listener-algorithm. How?

måndag 13 maj 13