Naive Vector Clocks and Singhal - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Naive Vector Clocks and Singhal

Description:

Title: Lamport's Scalar Clocks and Singhal & Kshemkalyani's Vector Clocks Author: ABED Last modified by: ABED Created Date: 11/30/2006 9:07:25 AM – PowerPoint PPT presentation

Number of Views:106
Avg rating:3.0/5.0
Slides: 14
Provided by: ABED150
Category:
Tags: clocks | naive | singhal | vector

less

Transcript and Presenter's Notes

Title: Naive Vector Clocks and Singhal


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

2
Briefly Naive Vector Clocks vs. SKs 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. SKs Vector
Clocks cont.
  • SKs 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 gt P(MAX_NODES))
  • /P is a probability function with a high chance
    return a number larger than choice/
  • clockLOCAL_ADDRESS
  • else
  • target Random(MAX_NODES)
  • /Random is a function the returns a random
    number between 0 - MAX_NODES/
  • sendMessageTo(target)
  • event receiveMessage( mptr )
  • clockLOCAL_ADDRESS
  • MessagesCounter
  • for ( i 0 i lt MAX_NODES i)

6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
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 Im 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
Write a Comment
User Comments (0)
About PowerShow.com