Download presentation

Presentation is loading. Please wait.

Published byByron Willis Modified over 2 years ago

1
Naive Vector Clocks and Singhal & Kshemkalyani's Vector Clocks Presented by: :: Abdulkareem Alali ::

2
Briefly : Naive Vector Clocks vs. SK’s Vector Clocks Naïve Vector Clocks : :: Vector clock of a system of N processes is an array of N logical clocks, 1 per process, a local copy of which is kept in each process with the following rules for clock updates: :: Initially all clocks are 0. For an internal event, increments its own logical clock in the vector by 1. Before send a message, it increments its own logical clock in the vector by 1. Each time a process receives a message, it increments its own logical clock in the vector by 1 and updates each element in its vector by taking the maximum of the value in its own vector clock and the value in the vector in the received message (for every element).

3
Briefly : Naive Vector Clocks vs. SK’s Vector Clocks [cont.] SK’s Vector Clocks :: Based on the observation that between successive message sends to the same process, only a few entries of the vector clock at the sender process are likely to change. :: On average the size of the time stamp on a message will be less than N.

4
Approach :: All processes start by calling the task Processing(). :: Processing() with some probability depending on the MAX_NODES will update the logical clock by 1, else will send a message randomly to other process. :: In case the message received at any process, updates hold and Processing() will be called. :: For failed message sending, A delay event will be invoked for IMER_ONE_SHOT 1024 and then Processing() will be called.

5
Code Architecture task Processing() { if ( choice > P(MAX_NODES)) /*P is a probability function with a high chance return a number larger than choice*/ { clock[LOCAL_ADDRESS]++; } else { target = Random(MAX_NODES); /*Random is a function the returns a random number between 0 - MAX_NODES*/ sendMessageTo(target); } event receiveMessage( mptr ) { clock[LOCAL_ADDRESS]++; MessagesCounter++; for ( i = 0; i < MAX_NODES; i++) { if ( mptr->clock[i] > 0 && mptr->clock[i] != clock[i] ) ChangesCounter++; }

10
Conclusion :: As mentioned before we conclude that SK vector clocks algorithm - as in the targeted approach – would maintain lower cost than the Naive vector clock implementation and that would appear clearly in huge systems.

11
Future Work :: In general, with a much better approach we could have more precise results that really simulate the real wireless systems because Randomness is not what the real world behaves. :: In special, for my approach, Function P could be studied in more depth to have a choice more balanced every time. The one I’m using right now is too simple.

12
Problems :: Time shortage (my problem). :: Very hard to trace the code. :: Memory limitations. :: I faced a major problem with Random generating function. Till at the end I coded something on my own.

13
THE END

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on ovarian cycle Ppt on distance-time graph and velocity time graph Ppt on ram and rom function Ppt on disk formatting in windows Ppt on indian culture and heritage Ppt on changing role of teachers Ppt on time management tips Ppt on carbon and its compounds Ppt on e-sales order processing system Ppt on phonetic transcription