distributed computing principles n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Distributed Computing Principles PowerPoint Presentation
Download Presentation
Distributed Computing Principles

Loading in 2 Seconds...

play fullscreen
1 / 39

Distributed Computing Principles - PowerPoint PPT Presentation


  • 54 Views
  • Uploaded on

Distributed Computing Principles. Keith Marzullo. It’s all about distributed systems now…. What do they have in common?. Independent processors that communicate via a narrow interface. Contrast with shared memory. True concurrency. Contrast with multitasking. Partial failures

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

Distributed Computing Principles


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
what do they have in common
What do they have in common?
  • Independent processors that communicate via a narrow interface.
    • Contrast with shared memory.
  • True concurrency.
    • Contrast with multitasking.
  • Partial failures
    • Things get messy when only parts of the system stop working.
    • Things can get really messy when parts of the system can try to do bad things.
partial failures and availability
Partial failures and availability

A distributed system is one in which the failure of a computer you didn’t even know existed can render your own computer unusable.

Leslie Lamport at DEC SRC in 1980s

partial failures
Partial failures

Assume five computers crash and recover independently, and each crashed about 4 minutes a month (probability up = 0.9999).

  • Probability all up?
  • Probability one up?
partial failures1
Partial failures

Assume five computers crash and recover independently, and each crashed about 4 minutes a month (probability up = 0.9999).

  • Probability 5 up?

0.9995 (down 20 min/month)

  • Probability ≥ 1 up?

1 - 1020 (down 20 femtosec/month)

fundamental problems
Fundamental problems…
  • Reasoning about the state of a distributed system.
  • Methods and protocols for making systems mask or detect and recover from failures.
  • Protocols for agreeing on state, message delivery, process failures and recovery, etc.

... in the context of different assumptions about the environment (communication, clocks, failures...)

a simple distributed coordination problem
A simple distributed coordination problem

Two armies are camped on separate hills surrounding a valley in which the enemy army is encamped.

The enemy can vanquish each army separately, but

if both armies attack at the same time, they can vanquish the enemy.

two general s problem
Two General's Problem

Attack at dawn!

due to Jim Gray

two general s problem1
Two General's Problem

due to Jim Gray

two general s problem2
Two General's Problem

I know to attack at dawn...

due to Jim Gray

two general s problem3
Two General's Problem

I don't know that he knows to attack at dawn...

due to Jim Gray

two general s problem4
Two General's Problem

due to Jim Gray

two general s problem5
Two General's Problem

I know he knows to attack at dawn...

due to Jim Gray

two general s problem6
Two General's Problem

I don’t know he knows I know to attack at dawn...

due to Jim Gray

two general s problem7
Two General's Problem

I know he knows that I know to attack at dawn...

due to Jim Gray

two general s problem8
Two General's Problem

umm...

umm...

Zzz...

due to Jim Gray

no finite protocol proof
No finite protocol: proof

Assume a protocol exists, and consider the shortest run that leads to coordinated attack.

attack!

...

attack!

no finite protocol proof1
No finite protocol: proof

attack!

...

attack!

no finite protocol proof2
No finite protocol: proof

attack!

...

attack!

two generals in practice
Two Generals in practice

Deduct $300

Issue $300

Question: what do banks do?

muddy children
Muddy children
  • Seven school children are playing outside after it rained.
    • These are smart children- they’ve been studyinglogic and all reasonflawlessly.
  • At one point theirteacher says to them“at least one of you has a muddy forehead”.
muddy children1
Muddy children
  • The teacher asks them “raise your hand if you know you have mud on your forehead”
    • There were no mirrors, the students didn’t feel their foreheads, and no one pointed at anyone; a student could only determine it by thinking.
  • When no one raised their hand, the teacher asked again.
  • When no one raised their hand, the teacher asked again. Some students raised their hands.
    • How many did so?
    • How did they know?
more generals
More generals

Commander

(Meng Tian)

Lieutenant

(Julius Caesar)

Lieutenant

(George Patton)

more generals2
More generals

Attack!

Attack!

Attack!

more generals3
More generals

Attack!

Attack!

Retreat!

more generals4
More Generals
  • Three generals: a commander and two lieutenants.
    • Communications is guaranteed.
    • One general could be a traitor, or all three could be loyal.
  • The commander will tell each lieutenant a command: attack or retreat.
    • If the commander is loyal, then the loyal lieutenants need to obey the commander.
    • If the commander is a traitor, then the lieutenants need to follow the same command (it doesn’t matter which).
not solvable either

attack

attack

attack

retreat

Not solvable either…

attack

not solvable either1

retreat

retreat

attack

retreat

Not solvable either…

retreat

not solvable either2

attack

retreat

attack

retreat

Not solvable either…

retreat

attack

replicated sensors
Replicated sensors

up to one faulty sensor

up to two faulty sensors

all sensors correct

4 - 9

1 - 6

2 - 7

1 - 9

4 - 6

2 - 7

Mfn(S): smallest interval that intersects at least n - f input values.

some problems to think about
Some problems to think about
  • How would you solve agreement with one commander and three lieutenants?
  • How would you solve agreement with one commander and two lieutenants, where a general is either loyal or dead?
principles of distributed systems
Principles of distributed systems
  • These kinds of problems come up all the time but in different circumstances.
  • The details are vital - can make a problem go from being easy to impossible.
  • Good distributed systems design requires good engineering on top of sound principles.