13
IMPLEMENTATION OF LAMPORT’S SCALAR CLOCKS Surekha Busa

Implementation Of Lamport’s Scalar Clocks

Embed Size (px)

DESCRIPTION

Implementation Of Lamport’s Scalar Clocks. Surekha Busa. Contents. Introduction Implementation Rule Experimental Setup Result Analysis Observation Future Work. INTRODUCTION. To show casualty in distributed system Each process P i has a logical clock C i assigned with an integer - PowerPoint PPT Presentation

Citation preview

Page 1: Implementation Of  Lamport’s  Scalar Clocks

IMPLEMENTATION OF LAMPORT’S SCALAR CLOCKS

Surekha Busa

Page 2: Implementation Of  Lamport’s  Scalar Clocks

Contents

Introduction Implementation Rule Experimental Setup Result Analysis Observation Future Work

Page 3: Implementation Of  Lamport’s  Scalar Clocks

INTRODUCTION

To show casualty in distributed system Each process Pi has a logical clock Ci assigned with

an integer the assigned value is the timestamp of this event,

denoted C(a) The timestamps are monotonically increasing consistency condition

consistency: if ab, then C(a) C(b) if event a happens before event b, then the clock value

(timestamp) of a should be less than the clock value of b strong consistency: if C(a)C(b) then ab

scalar clocks are not strongly consistent

Page 4: Implementation Of  Lamport’s  Scalar Clocks

IMPLEMENTATION RULE

Outgoing messages tagged with Sender’s clock value

Upon receive of message: myclock = MAX(message, myclock)

Page 5: Implementation Of  Lamport’s  Scalar Clocks

EXPERIMENTAL SETUP

Base Algorithm : Random Flood. Whenever the clock of the receiver take the value

of the clock of the message we say the clock is updated.

Total No. of updates per process(number of updates/no of processes) is calculated by increasing the number of processes from 10-100.

P1e11

(1)

e12

(2)

e13 e14

(4)

e15

(5)

P2e21

(1)

e22

(2)

e23

(4)

(3)

Clock is Updated

Clock is not Updated

Page 6: Implementation Of  Lamport’s  Scalar Clocks

RESULT ANALYSIS: No. Of Updates and Messages Varying No. Of Processes

Page 7: Implementation Of  Lamport’s  Scalar Clocks

RESULT ANALYSIS: No. Of Updates and Messages Per Process Varying No. Of Processes

Page 8: Implementation Of  Lamport’s  Scalar Clocks

RESULT ANALYSIS: No. Of Messages Versus No. Of Clock Updates

Page 9: Implementation Of  Lamport’s  Scalar Clocks

No. Of Processes

No. Of Updates

No. Of Messages

Updates Per Process

Messages Per Process

10 13 46 1.3 4

20 41 197 2.05 9

30 65 442 2.17 14

40 95 829 2.37 20

50 131 1230 2.62 24

60 169 1724 2.81 28

70 206 2509 2.94 35

80 240 3238 3 40

90 278 4081 3.08 45

100 319 4938 3.19 49

Page 10: Implementation Of  Lamport’s  Scalar Clocks

OBSERVATION

No. Updates and messages per process increases with increase in No. of Processes.

No. of clock updates increase with increase in No. of Messages.

Page 11: Implementation Of  Lamport’s  Scalar Clocks

FUTURE WORK

To observe its performance over various topologies.

To test my program with much larger no. of processes.

Test my program on a real distributed network.

Page 12: Implementation Of  Lamport’s  Scalar Clocks

REFERENCE

[1] Leslie Lamport (1978). ”Time, clocks, and the ordering of events in a distributed system”. Communications of the ACM 2 (7): 558-565.

[2] Mukesh Singhal,Niranjan G. Shivaratri.“Advanced Topics in Operating Systems”. McGRAW-Hill international edition:Chapter 5.

Code Defence

Page 13: Implementation Of  Lamport’s  Scalar Clocks

THANK YOU..!!