Registers Shared Memory Fail-crash, fail-silent BJRN A. JOHNSSON - - PowerPoint PPT Presentation

registers shared memory
SMART_READER_LITE
LIVE PREVIEW

Registers Shared Memory Fail-crash, fail-silent BJRN A. JOHNSSON - - PowerPoint PPT Presentation

Registers Shared Memory Fail-crash, fail-silent BJRN A. JOHNSSON Introduction Analogy from multi-CPU computers. Over network: emulation of shared-memory . Benefit: use shared-memory where there really is none. Considered


slide-1
SLIDE 1

Registers – Shared Memory

Fail-crash, fail-silent

BJÖRN A. JOHNSSON

slide-2
SLIDE 2

Introduction

  • Analogy from multi-CPU computers.
  • Over network: emulation of shared-memory.
  • Benefit: use shared-memory where there really is none.
  • Considered easier than message exchanges.
slide-3
SLIDE 3

Register Overview

  • Process starts read operation with ⟨ r, Read ⟩
  • Process starts write operation with ⟨ r, Write | v ⟩
  • Process completes after reply event from register:

– ⟨ r, ReadReturn | v ⟩ – ⟨ r, WriteReturn ⟩

  • Processes access registers in sequential manner
  • Types: (1, 1), (1, N), (N, N)
slide-4
SLIDE 4

Semantics

  • Liveness: Every operation eventually completes.
  • Safety: Every read operation returns the value written by

the last write operation.

slide-5
SLIDE 5

Concurrency

  • Serial (or sequential) exec: one operation after another
  • Concurrent exec: what happens to def. of “last”?
  • Three abstractions: safe, regular, and atomic.
slide-6
SLIDE 6

Algorithm Overview

  • (1, N) Regular Register

– Read-One Write-All – Majority Voting Regular Register

  • (1, N) Atomic Register

– (1, N) Regular ➞ (1, 1) Atomic ➞ (1, N) Atomic Register – Read-Impose Write-All – Read-Impose Write-Majority

  • (N, N) Atomic Register

– (1, N) Atomic➞ (N, N) Atomic Register – Read-Impose Write-Consult-All – Read-Impose Write-Consult-Majority

slide-7
SLIDE 7

Repetition

Distributed-System Models

  • Fail-stop

– crash-stop, perfekt links, perfect failure detector (P)

  • Fail-silent

– crash-stop, perfekt links, no failure detector

slide-8
SLIDE 8

(1, N) Regular Register

!

initially ⊥

slide-9
SLIDE 9

(1, N) Regular Register

“x” also regular

slide-10
SLIDE 10

(1, N) Regular Register

Read-One Write-All

slide-11
SLIDE 11

(1, N) Regular Register

Read-One Write-All

slide-12
SLIDE 12

(1, N) Regular Register

Read-One Write-All

slide-13
SLIDE 13

(1, N) Regular Register

Majority Voting Regular Register

slide-14
SLIDE 14

(1, N) Regular Register

Majority Voting Regular Register

returns pair with greatest time stamp

slide-15
SLIDE 15

(1, N) Atomic Register

!

slide-16
SLIDE 16

(1, N) Atomic Register

slide-17
SLIDE 17

(1, N) Atomic Register

slide-18
SLIDE 18

(1, N) Atomic Register

(1, N) Regular ➞ (1, 1) Atomic Register

slide-19
SLIDE 19

(1, N) Atomic Register

(1, 1) Atomic ➞ (1, N) Atomic Register

slide-20
SLIDE 20

(1, N) Atomic Register

(1, 1) Atomic ➞ (1, N) Atomic Register

slide-21
SLIDE 21

(1, N) Atomic Register

Read-Impose Write-All

same for ⟨ onar, Write ⟩ !

!

slide-22
SLIDE 22

(1, N) Atomic Register

Read-Impose Write-All

same for ⟨ onar, Read ⟩ !

slide-23
SLIDE 23

(1, N) Atomic Register

Read-Impose Write-Majority

slide-24
SLIDE 24

(1, N) Atomic Register

Read-Impose Write-Majority

slide-25
SLIDE 25

(1, N) Atomic Register

Read-Impose Write-Majority

slide-26
SLIDE 26

(N, N) Atomic Register

!

?

slide-27
SLIDE 27

(N, N) Atomic Register

slide-28
SLIDE 28

(N, N) Atomic Register

(1, N) Atomic➞ (N, N) Atomic Register

slide-29
SLIDE 29

(N, N) Atomic Register

(1, N) Atomic➞ (N, N) Atomic Register

slide-30
SLIDE 30

(N, N) Atomic Register

Read-Impose Write-Consult-All

!

slide-31
SLIDE 31

(N, N) Atomic Register

Read-Impose Write-Consult-All

slide-32
SLIDE 32

(N, N) Atomic Register

Read-Impose Write-Consult-Majority

!

slide-33
SLIDE 33

(N, N) Atomic Register

Read-Impose Write-Consult-Majority

factors in rank

slide-34
SLIDE 34

(N, N) Atomic Register

Read-Impose Write-Consult-Majority

slide-35
SLIDE 35