130 likes | 275 Views
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
E N D
Implementation Of Lamport’s Scalar Clocks SurekhaBusa
Contents • Introduction • Implementation Rule • Experimental Setup • Result Analysis • Observation • Future Work
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
IMPLEMENTATION RULE • Outgoing messages tagged with Sender’s clock value • Upon receive of message: myclock = MAX(message, myclock)
e11 e12 e13 e14 e15 P1 (4) (1) (2) (5) e21 e22 e23 P2 (1) (2) (4) 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. (3) Clock is not Updated Clock is Updated
RESULT ANALYSIS: No. Of Updates and Messages Varying No. Of Processes
RESULT ANALYSIS: No. Of Updates and Messages Per Process Varying No. Of Processes
RESULT ANALYSIS: No. Of Messages Versus No. Of Clock Updates
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.
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.
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