1 / 13

Naive Vector Clocks and Singhal & Kshemkalyani's Vector Clocks

Naive Vector Clocks and Singhal & Kshemkalyani's Vector Clocks. Presented by: :: Abdulkareem Alali ::. Briefly : Naive Vector Clocks vs. SK’s Vector Clocks. Naïve Vector Clocks :

muhammed
Download Presentation

Naive Vector Clocks and Singhal & Kshemkalyani's Vector Clocks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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++; } }

  6. 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.

  7. 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.

  8. 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.

  9. THE END

More Related