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

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Time and Clocks u uses of time in distributed systems: –time-based algorithms (e.g. in security) –distributed make –gathering event traces.
Advertisements

Last Class: Clock Synchronization
P1 P2 P3 x y z (0,0,0) M1 M2 M3 VP1( __, __ ) VP2( __, __ ) VP3( __, __ ) Initially Vector Time is (0,0,0) at all sites Vector at each site is empty. Note.
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
CS261 Data Structures Dynamic Arrays. Pro: only core data structure designed to hold a collection of elements Pro: random access: can quickly get to any.
Software Certification and Attestation Rajat Moona Director General, C-DAC.
Cache Memory Locality of reference: It is observed that when a program refers to memory, the access to memory for data as well as code are confined to.
1 Causality. 2 The “happens before” relation happens before (causes)
CSCI 232© 2005 JW Ryder1 Cache Memory Systems Introduced by M.V. Wilkes (“Slave Store”) Appeared in IBM S360/85 first commercially.
Logical Time Each event is assigned a logical time from a totally ordered set T The logical times for the events must respect any possible dependencies.
Cuckoo Hashing : Hardware Implementations Adam Kirsch Michael Mitzenmacher.
Distributed Systems Spring 2009
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
Ordering and Consistent Cuts Presented By Biswanath Panda.
Herwig++ Particle Data1 Particle Data for Herwig++ Peter Richardson Durham University.
Tirgul 10 Rehearsal about Universal Hashing Solving two problems from theoretical exercises: –T2 q. 1 –T3 q. 2.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
What Went Wrong? Alex Groce Carnegie Mellon University Willem Visser NASA Ames Research Center.
Improving IPC by Kernel Design Jochen Liedtke Shane Matthews Portland State University.
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
Chapter Resynchsonous Stabilizer Chapter 5.1 Resynchsonous Stabilizer Self-Stabilization Shlomi Dolev MIT Press, 2000 Draft of Jan 2004, Shlomi.
Templates. Objectives At the conclusion of this lesson, students should be able to Explain how function templates are used Correctly create a function.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Composition Model and its code. bound:=bound+1.
Models and Clocks. Characteristics of a Distributed System Absence of a shared clock Absence of shared memory Absence of failure detection.
Oakkar Fall The Need for Decision Engine Automate business processes Implement complex business decision logic Separation of rules and process Business.
Chapter 5.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,
CSCE 3110 Data Structures & Algorithm Analysis Binary Search Trees Reading: Chap. 4 (4.3) Weiss.
ICS 145B -- L. Bic1 Project: Page Replacement Algorithms Textbook: pages ICS 145B L. Bic.
Artificial Intelligence in Game Design
Approximate Frequency Counts over Data Streams Loo Kin Kong 4 th Oct., 2002.
Chapter 15: Advanced Topics: Introducing Data Structures and Recursion Visual Basic.NET Programming: From Problem Analysis to Program Design.
BitTorrent Nathan Marz Raylene Yung. BitTorrent BitTorrent consists of two protocols – Tracker HTTP protocol (THP) How an agent joins a swarm How an agent.
1 Wenguang WangRichard B. Bunt Department of Computer Science University of Saskatchewan November 14, 2000 Simulating DB2 Buffer Pool Management.
Chapter 11 Arrays Continued
L. Grewe.  An array ◦ stores several elements of the same type ◦ can be thought of as a list of elements: int a[8]
Random Terrain Generation By Cliff DeKoker. About my project ● Incremental development ● Focus on creating height maps that mimic real terrain ● Allow.
DISTRIBUTED ALGORITHMS By Nancy.A.Lynch Chapter 18 LOGICAL TIME By Sudha Elavarti.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
Programming Logic and Design Using Methods. 2 Objectives Review how to use a simple method with local variables and constants Create a method that requires.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Operating Systems CMPSC 473 Virtual Memory Management (3) November – Lecture 20 Instructor: Bhuvan Urgaonkar.
Power Control in Wireless Ad Hoc Networks Background An ad hoc network is a group of self configuring wireless nodes that lack infrastructure. Motivation—Power.
1 Efficient Dependency Tracking for Relevant Events in Shared Memory Systems Anurag Agarwal Vijay K. Garg
Communicating Real-Time State Machines (CRSM) State machines that communicate synchronously Unique unidirectional channels are used for the communication.
Virtual Memory. Background Virtual memory is a technique that allows execution of processes that may not be completely in the physical memory. Virtual.
Tetris Agent Optimization Using Harmony Search Algorithm
Lamport's Scalar clocks and Singhal-Kshemkalyani’s VC Algorithms
Image Processing A Study in Pixel Averaging Building a Resolution Pyramid With Parallel Computing Denise Runnels and Farnaz Zand.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Ensieea Rizwani An energy-efficient management mechanism for large-scale server clusters By: Zhenghua Xue, Dong, Ma, Fan, Mei 1.
Hwajung Lee. Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Chapter pages1 Distributed Process Management Chapter 14.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
IMPLEMENTATION OF LAMPORT’S SCALAR CLOCKS Surekha Busa.
Parallel and Distributed Simulation Deadlock Detection & Recovery.
Programming Logic and Design Fifth Edition, Comprehensive Chapter 7 Using Methods.
Clock Snooping and its Application in On-the-fly Data Race Detection Koen De Bosschere and Michiel Ronsse University of Ghent, Belgium Taipei, TaiwanDec.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Assignment 5 is posted. Exercise 8 is very similar to what you will be doing with assignment 5. Exam.
Concurrent Graph Exploration with Multiple Robots
Winter 2018 CISC101 12/2/2018 CISC101 Reminders
Operating Systems CMPSC 473
by Manas Hardas for Advanced Operating Systems Nov 27th 2007
Parallel Exact Stochastic Simulation in Biochemical Systems
Presentation transcript:

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

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.

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.

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

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.

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.

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.

THE END