Time, Clocks, and Ordering of Events

14 flashcardspar Nijelous
Réviser ces flashcardsGratuit · répétition espacée · iPhone, Android, Mac et web

Toutes les cartes

1
Happened Before Relations
Defined by ->

Event A happened before event B:
-If A and B are in the same process, and A comes before B
-If A is sending a message by a process and B is the precipient of the same message by some other process
-If A -> B, and B -> C, then A -> C
2
Concurrency
Defined by || (A || B)

Neither event influences each other, and neither A -> B and B -> A
3
Piggybacking
History of messages sent by different users, including where they're going to and who they're from, sent onwards throughout the chain
4
Logical Clocks
A clock based on a numbering system not related to the passage of time. Clocks are written as Ci(a)
5
Logical Clocks: Correctness Condition
For any event a, b, if a -> b, then C(a) < C(b).

Only satisfied if:
-a and b are events in Pi and a < b (Ci(a) < Ci(b))
-a is sending a message through Pi, and b is the recipient of that message by Pk (Ci(a) < Ck(b))
6
Logical Clocks: Implementation
Each process has a register Ci (Ci(a) holds value contined in Ci during event a)

Each process increments Ci immediately after the occurence of a local event

If a is an event representing the sending of a message m from Pi to Pj, then m contains the timestep Tm = Ci(a)
-On recieving of m by process Pj at b, peek at m and increment Cj if necessary to ensure Cj(b) > Tm
7
Logical Clocks: Total Order
Defined by =>

Removing of concurrency, getting the events in their complete order.

a => b if (ontop of the other rules):
-Ci(a) < Cj(b)
-Ci(a) = Cj(b) AND Pi < Pj
8
Logical Clocks: Total Order anomalies
Events may not happen in an order consistent with the ordering indicated by the clock numbers

This is due to outside events the system cannot account for, such as verbal communication, hence the internal clocks are not incremented
9
Strong Clock Condition
If a => b then C(a) < C(b)

This cannot be attained by a logical clock due to the lack of respect for the real passage of time.
10
Physical Clocks
Clocks that run continuously, ticking with the passage of a standard reference time.

Requires two things:
-For a small known constant k (k<1, typically 10^-6) such that for all times t:
--1-k < Ri or Ri <= 1+k (Ri = rate at which the clock Ci runs relative to real time)
--d - kd <= Ci(t+d) - Ci(t) <= d + kd (d = time interval)

-For all i, j and t:
--Either 0 <= Ci(t) - Cj(t) <= sync error (Ci faster than Cj)
--Or 0 <= Cj(t) - Ci(t) <= sync error (Cj faster than Ci)
11
Physical Clocks: Synchronisation Error
The allowed error between two different clocks in a system.

This needs to be small enough to prevent anomalous behaviours, but big enough to exist as a sync error of 0 is impossible.

We guarentee avoidance of anomalous behaviour if sync error < (1-k)u (u = time elapsed between sending an recieving) (sync error < minimum transmission time)
12
Synchronising Physical Clocks: Hardware
Adjust the running rate directly while the crystal oscillations are being turned into the clock "ticks"
13
Synchronising Physical Clocks: Software
A Synchronised clock = physical clock + adj (adj = register containing necessary adjustment)

This is done gradually as to avoid jumps or rollbacks
14
Synchronising Physical Clocks: Calculating Clock Adjustment
A reference clock periodically transmits its value to all clocks in the system.

Upon recieving the timestamped message, the clocks A and B set their readings to the indicated value.
-Need to adjust this value based on the maximum travel time (u(mx))
-The most the sync error can be is u(mx)-u
Réviser les 14 cartes gratuitement

Plus de flashcards : Histoire et lettres

Englisch-Deutsch Voci 1b136 cartesHistoire et lettres · AnglaisChrisArt History and Appreciation Final Review81 cartesHistoire et lettres · AnglaisColeDís vocab 59 cartesHistoire et lettres · Latingracebrackengeography (brit)47 cartesHistoire et lettres · Anglaisanya€Dates - Cold War39 cartesHistoire et lettres · AnglaisHassanChapter 2: Regulations, maintenance forms, records, and publications 32 cartesHistoire et lettres · AnglaislalaHistory27 cartesHistoire et lettres · AnglaisAOMA22 cartesHistoire et lettres · AnglaisJonENG Literary Terms #318 cartesHistoire et lettres · AnglaissgecksChurch Interview15 cartesHistoire et lettres · AnglaisNoodlesForBrainsL6 Directions12 cartesHistoire et lettres · JaponaisVioMire- Creation&Covenant 8 cartesHistoire et lettres · Anglaiserin

Tous les decks : Histoire et lettres

Révise ces decks dans l’app

Gratuit sur iPhone, Android, Mac et le web. Ajoute n’importe quel deck à ton compte en un tap.

Télécharger dans l’App StoreDisponible sur Google Play
Réviser les 14 cartes gratuitement