logical clocks and logical time

Post on 06-Dec-2014

3.357 Views

Category:

Education

5 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

1 | Internal use only

Logical Time and ClocksLogical Time and Clocks

2 | Internal use only

The need for logical time

• Unlike conventional sequential programs. the computations performed

by distributed systems

– do not yield a linear sequence of eventsdo not yield a linear sequence of events

– system inherently define a partial orderingsystem inherently define a partial ordering

– genuinely concurrent events have no influence on one genuinely concurrent events have no influence on one

anotheranother.

3 | Internal use only

The relation “happened before,”

• Condition 1: 'Sequential behaviour'. If events ee and f f occur

in the same process instance pp, and ff occurs after ee,

– then e → f ( e happened before f )

• Condition 2: 'Process creation' . If event e and process

instance q occur in process instance p.

– event f occurs in q,

– and q begins after e,

– then e → f

4 | Internal use only

Happened before ...

• Condition 3: Process termination. If event e and process

instance q occur in process instance p.

– event f occurs in q.

– and e occurs after q terminates.

– then f → e

5 | Internal use only

Condition 4

• : Synchronous (un-buffered) message-passing.

– If event e is a synchronous input (output)

– and event f is the corresponding output (input),

– and there is an event g such that

• e → g,

• then f → g.

– If there is an event h such that h → e, then

• h → f

6 | Internal use only

Condition 5

• Asynchronous (buffered) message-passing.

– If event e is an asynchronous send and event f is the

corresponding receive,

• then e → f

7 | Internal use only

Condition 6

• Transitivity :

– e → f

– f → g

– Then e → g

8 | Internal use only

Concurrent Events

• a -/-> e , e -/-> a since they occur at different processes

• Such events are called concurrent

• Therefore a || e

9 | Internal use only

10 | Internal use only

Lamport Logical Clocks

11 | Internal use only

Vector time

12 | Internal use only

May be Continued ...

So any

13 | Internal use only

Thank You !!

top related