Slides for Chapter 11: Time and Global State

Samankaltaiset tiedostot
Capacity Utilization

Bounds on non-surjective cellular automata

The CCR Model and Production Correspondence

RINNAKKAINEN OHJELMOINTI A,

Operatioanalyysi 2011, Harjoitus 2, viikko 38

Distribution issues, global state, clusters, CORBA, etc. Distributed objects

21~--~--~r--1~~--~--~~r--1~

Syitä siirtoon. Hajautettu prosessien hallinta. Stallings, Luku 15. Sisältöä luento 20. Kuka/mikä päättää siirrosta? Esimerkki.

Sisältöä luento 20. Hajautettu prosessien hallinta. Stallings, Luku 15. Prosessin siirto. Syitä siirtoon. Esimerkki. Kuka/mikä päättää siirrosta?

Hajautettu prosessien hallinta. Stallings, Luku 15. Sisältöä luento 20

Transaktiot - kertausta

Security server v6 installation requirements

Portugalin tasavallan aloite neuvoston päätökseksi Schengenin konsultointiverkoston (tekniset eritelmät) osan 1 muuttamisesta

2_1----~--~r--1.~--~--~--,.~~

Security server v6 installation requirements

KMTK lentoestetyöpaja - Osa 2

100 % Kaisu Keskinen Diat

PUBLIC LIMITE FI. Bryssel, 9. marraskuuta 2007 (20.11) (OR. en) EUROOPAN UNIONIN NEUVOSTO 14920/07 LIMITE VISA 342 COMIX 951

C++11 seminaari, kevät Johannes Koskinen

Kvanttilaskenta - 1. tehtävät

Salasanan vaihto uuteen / How to change password

Alternative DEA Models

LYTH-CONS CONSISTENCY TRANSMITTER

16. Allocation Models

Telecommunication Software

7 Sulautettujen järjestelmien suunnittelumallit. OhAr Marko Leppänen

Ajettavat luokat: SM: S1 (25 aika-ajon nopeinta)

FinFamily PostgreSQL installation ( ) FinFamily PostgreSQL

1. SIT. The handler and dog stop with the dog sitting at heel. When the dog is sitting, the handler cues the dog to heel forward.

Kvanttilaskenta - 2. tehtävät

Slides for Chapter 1 Characterization of Distributed Systems

Network to Get Work. Tehtäviä opiskelijoille Assignments for students.

S Sähkön jakelu ja markkinat S Electricity Distribution and Markets

Ohjelmointi 1 C#, kevät 2013, 2. tentti

I. AES Rijndael. Rijndael - Internal Structure

HITSAUKSEN TUOTTAVUUSRATKAISUT

Efficiency change over time

Biojätteen keruu QuattroSelect - monilokerojärjestelmällä Tiila Korhonen SUEZ

Tietorakenteet ja algoritmit

Ohjelmistoarkkitehtuurit Kevät 2016 Johdantoa

FIS IMATRAN KYLPYLÄHIIHDOT Team captains meeting

Kansallinen hankintailmoitus: Mikkelin ammattikorkeakoulu Oy : Palvelimet ja kytkin

Miksi Suomi on Suomi (Finnish Edition)

TIEKE Verkottaja Service Tools for electronic data interchange utilizers. Heikki Laaksamo

SIMULINK S-funktiot. SIMULINK S-funktiot

Ohjelmointikielet ja -paradigmat 5op. Markus Norrena

Other approaches to restrict multipliers

812336A C++ -kielen perusteet,

Information on preparing Presentation

Curriculum. Gym card

Exercise 1. (session: )

Tietoa Joensuun Eliittikisoista

FIS:n timing booklet Jyväskylä Jorma Tuomimäki

1.3 Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

Capacity utilization

Ohjelmoinnin peruskurssien laaja oppimäärä

Työsuojelurahaston Tutkimus tutuksi - PalveluPulssi Peter Michelsson Wallstreet Asset Management Oy

Paikkatiedon semanttinen mallinnus, integrointi ja julkaiseminen Case Suomalainen ajallinen paikkaontologia SAPO

anna minun kertoa let me tell you

Mitä IHMEttä on MIXTURE -mallintaminen?

Laskennallisesti Älykkäät Järjestelmät. Sumean kmeans ja kmeans algoritmien vertailu

Metsälamminkankaan tuulivoimapuiston osayleiskaava

TM ETRS-TM35FIN-ETRS89 WTG

Counting quantities 1-3

Arkkitehtuuritietoisku. eli mitä aina olet halunnut tietää arkkitehtuureista, muttet ole uskaltanut kysyä

HARJOITUS- PAKETTI A

Kellojen synkronointi itsestabiloituvasti

Verkkojen verkko - maailmankylä. Hajautetut järjestelmät yhteistyön ongelmallinen maailma. Hajautettuja järjestelmiä. Hajautusta!. miksi oikeastaan?

Returns to Scale II. S ysteemianalyysin. Laboratorio. Esitelmä 8 Timo Salminen. Teknillinen korkeakoulu

( ( OX2 Perkkiö. Rakennuskanta. Varjostus. 9 x N131 x HH145

Nuku hyvin, pieni susi -????????????,?????????????????. Kaksikielinen satukirja (suomi - venäjä) ( (Finnish Edition)

Microsoft Lync 2010 Attendee

1.3Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

Tynnyrivaara, OX2 Tuulivoimahanke. ( Layout 9 x N131 x HH145. Rakennukset Asuinrakennus Lomarakennus 9 x N131 x HH145 Varjostus 1 h/a 8 h/a 20 h/a

Choose Finland-Helsinki Valitse Finland-Helsinki

SuomiCom-sähköpostiasetukset Microsoft Outlook 2016

Ohjelmoinnin peruskurssien laaja oppimäärä

Travel Getting Around

TM ETRS-TM35FIN-ETRS89 WTG

Automaatiojärjestelmän hankinnassa huomioitavat tietoturva-asiat

TM ETRS-TM35FIN-ETRS89 WTG

Joko tunnet nämän Oracle10g SQL:n piirteet? Kari Aalto Saariston IT

Lab SBS3.FARM_Hyper-V - Navigating a SharePoint site

Teknologia-arkkitehtuurit. Valinta ja mallinnus

Nordea Bank Abp. Nordea Bank Abp

TM ETRS-TM35FIN-ETRS89 WTG

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

T : Max-flow / min-cut -ongelmat

Ohjelmoinnin peruskurssien laaja oppimäärä

A DEA Game II. Juha Saloheimo S ysteemianalyysin. Laboratorio. Teknillinen korkeakoulu

Ohjelmointikielet ja -paradigmat 5op. Markus Norrena

Roadbook

Salausmenetelmät 2015/Harjoitustehtävät

Nordea Bank Abp. Nordea Bank Abp

Pakettisynkronointitestauksen automaatio

EUROOPAN PARLAMENTTI

Group 2 - Dentego PTH Korvake. Peer Testing Report

,0 Yes ,0 120, ,8

VBE2 Työpaketit Jiri Hietanen / TTY

TM ETRS-TM35FIN-ETRS89 WTG

Transkriptio:

Slides for Chapter 11: Time and Global State From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, Pearson Education 2005 Edited and supplemented by Jonne Itkonen,! for TIE427 (2011)! Figure 11.1 Skew between computer clocks in a distributed system Network Kuva yrittää vain kertoa, että hajautetun järjestelmän kellot ovat aina eri ajassa. Nykyään, kun kaikki on nopeaa ja tehokasta, on järjettömän pieneltä tuntuvalla aikaerollakin merkitys. On jopa jouduttu siirtämään etäkoneita lähemmäs palvelimia, jotta bitin kulkuaika piuhassa pienenisi, latenssi vähenisi.

Figure 11.2 Clock synchronization using a time server m! r! m! t! p! Time server,s! Cristian s algorithm:! 1. p requests time in message m r.! 2. S returns time t in message m t.! 3. p records round-trip time T round! 4. p estimates time to change as t+t round /2," accuracy being ± (T round /2-min), where min is the" time between sending m r and inserting time to m t.! Algoritmi on arka palvelimen rikkoutumiselle ja huijaavalle palvelimelle.! Figure 11.3 An example synchronization subnet in an NTP implementation 1! Stratum 1 tietokone kiinni atomikellossa tai vastaavassa ajanlähteessä. 2! 2! 3! 3! 3! Note: Arrows denote synchronization control, numbers denote strata.

Figure 11.4 Messages exchanged between a pair of NTP peers Server B! T! i!-2! T! i-1! Tim m! m'! Server A! T! i!-!3! T! i! Tim NTP laskee näiden perusteella siirtymät (offset) o i ja viipeet d i jokaiselle viestiparille. Näitä suodattamalla, valikoimalla ja tallentamalla saadaan lasketuksi siirtymä o palvelinten kellojen välillä. Figure 11.5 Events occurring at three processes p 1 a b m 1 c d m 2 Physical time p 3 e Tapahtumien a ja e järjestystä ei voida määrittää tapahtui ennen -relaatiolla, joten niiden sanotaan olevan samanaikaisia (concurrent). f

Figure 11.6 Lamport timestamps[1978] for the events shown in Figure 11.5 1 2 p 1 a b m 1 3 4 c d m 2 Physical time p 3 1 e LC1:! L i is incremented before each event is issued at process p i : L i := L i + 1.! LC2:! (a) When a process p i sends a message m, it piggybacks on m the value t = L i.! (b) On receiving (m,t), a process p j computes L j := max(l j,t) and! then applies LC1 before timestamping the event receive(m).! f 5 Lamportin mallin ongelmat ja vektorikellot! Lamport: e! e L(e) < L(e ), mutta ei toisinpäin! Vektorikelloilla hoituu (Mattern [1989], Fidge [1991]): " VC1: Initially, V i [j] = 0, for i,j=1,2,,n. " VC2: Just before p i timestamps an event, it sets V i [i]:=v i [i]+1 " VC3: p i includes the value t=v i in every message it sends. " VC4: Whe pi receives a timestamp t in a message, it sets V i [j]:=max(v i [j],t[j]), for j=1,2,,n. Taking the componentwise maximum of two vector timestamps in this way is known as a merge operator.! V:n koko on huima isoilla prosessimäärillä " Korjaus: muutoksen siirto, Lamport-riittävä

Figure 11.7 Vector timestamps for the events shown in Figure 11.5 (1,0,0) (2,0,0) p 1 a b m 1 (2,1,0) (2,2,0) c d m 2 Physical time p 3 (0,0,1) e f (2,2,2) Figure 11.8 Detecting global properties p 1 a. Garbage collection object reference message garbage object p1 wait-for b. Deadlock wait-for p1 c. Termination passive activate passive

! Seuraavat kalvot käsittelevät tarkemmin globaalin tilan määrittelyä. Ne ovat mukana mielenkiinnon vuoksi, eivätkä kuulu tenttiin. Figure 11.9 Cuts 0! 1! 1! 1! 2! 1! 3! 1! p! 1! p! 2! m! 1! m! 2! 0! 2! 1! 2! 2! 2! Physical! tim Inconsistent cut! Consistent cut! Viestin m 1 :n lähettäminen ei sisälly leikkaukseen, joten leikkaus on epäyhtenäinen. Viestin m 2 :n vastaanotto ei sisälly leikkaukseen, mutta leikkaus on silti yhtenäinen.

Figure 11.10 Chandy and Lamport s snapshot algorithm Marker receiving rule for process p i! On p i s receipt of a marker message over channel c:!!if (p i has not yet recorded its state) it!!records its process state now;!!records the state of c as the empty set;!!turns on recording of messages arriving over other incoming channels;!!else!! p i records the state of c as the set of messages it has received over c!!since it saved its state.!!end if! Marker sending rule for process p i! After p i has recorded its state, for each outgoing channel c:!! p i sends one marker message over c!!(before it sends any other message over c).! Figure 11.11 Two processes and their initial states p c 1 2 c 1 $1000 (none) $50 2000 account widgets account widgets

Figure 11.12 The execution of the processes in Figure 11.11 1. Global state S 0 <$1000, 0> p 1 c 2 (empty) <$50, 2000> c 1 (empty) 2. Global state S 1 <$900, 0> p 1 c 2 (Order 10, $100), M <$50, 2000> c 1 (empty) 3. Global state S 2 <$900, 0> p 1 c 2 (Order 10, $100), M <$50, 1995> c 1 (five widgets) 4. Global state S 3 <$900, 5> p 1 c 2 (Order 10, $100) <$50, 1995> c 1 (empty) (M = marker message) Figure 11.13 Reachability between states in the snapshot algorithm actual execution 0!, 1!,...! S! recording! init! recording! S! final! begins! ends! pre-snap: S! snap! '! 0!,'! 1!,...'! R-1! post-snap: '! R!,'! R+1!,...!

Figure 11.14 Vector timestamps and variable values for the execution of Figure 11.9 p! 1! p! 2! (1,0)! (2,0)! (3,0)! (4,3)! x! 1! = 1! x! 1! = 100! x! 1! = 105! m! 1! m! 2! x! 2! = 100! x! 2! = 95! x! 2! = 90! (2,1)! (2,2)! (2,3)! Cut C! 1! x! 1! = 90! Cut C! 2! Physical! tim Figure 11.15 The lattice of global states for the execution of Figure 11.14 Level 0! 1! 2! 3! 4! 5! 6! 7! S! 00! S! 10! S! 20! S! 30! S! 21! S! 31! S! 22! S! 32! S! 23! S! 33! S! 43! Sij = global state after i events at process 1! and j events at process 2!

Figure 11.16 Algorithms to evaluate possibly! and definitely! Figure 11.17 Evaluating definitely!" Level 0 F 1 F 2 F F = (!(S) = False); T = (!(S) = True) 3 F T 4 F 5?