Immediate Detection of Predicates in Pervasive Environments

Similar documents
Causal Consistency for Geo-Replicated Cloud Storage under Partial Replication

Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. CS 249 Project Fall 2005 Wing Wong

On the Growth of the Prime Numbers Based Encoded Vector Clock

Clocks in Asynchronous Systems

Exam Spring Embedded Systems. Prof. L. Thiele

Agreement. Today. l Coordination and agreement in group communication. l Consensus

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour

TTA and PALS: Formally Verified Design Patterns for Distributed Cyber-Physical

Time in Distributed Systems: Clocks and Ordering of Events

Absence of Global Clock

Failure detectors Introduction CHAPTER

Distributed Algorithms Time, clocks and the ordering of events

Today. Vector Clocks and Distributed Snapshots. Motivation: Distributed discussion board. Distributed discussion board. 1. Logical Time: Vector clocks

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering

Time. To do. q Physical clocks q Logical clocks

Causality & Concurrency. Time-Stamping Systems. Plausibility. Example TSS: Lamport Clocks. Example TSS: Vector Clocks

CS505: Distributed Systems

Time is an important issue in DS

Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i

EXPERIMENT Traffic Light Controller

Design of a Sliding Window over Asynchronous Event Streams

Chapter 11 Time and Global States

Distributed Optimization over Networks Gossip-Based Algorithms

CptS 464/564 Fall Prof. Dave Bakken. Cpt. S 464/564 Lecture January 26, 2014

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Cuts. Cuts. Consistent cuts and consistent global states. Global states and cuts. A cut C is a subset of the global history of H

Shared Memory vs Message Passing

Slides for Chapter 14: Time and Global States

Time. Lakshmi Ganesh. (slides borrowed from Maya Haridasan, Michael George)

ROBUST & SPECULATIVE BYZANTINE RANDOMIZED CONSENSUS WITH CONSTANT TIME COMPLEXITY IN NORMAL CONDITIONS

A subtle problem. An obvious problem. An obvious problem. An obvious problem. No!

Distributed Computing. Synchronization. Dr. Yingwu Zhu

CS505: Distributed Systems

Abstract. The paper considers the problem of implementing \Virtually. system. Virtually Synchronous Communication was rst introduced

Snapshots. Chandy-Lamport Algorithm for the determination of consistent global states <$1000, 0> <$50, 2000> mark. (order 10, $100) mark

Scheduling Periodic Real-Time Tasks on Uniprocessor Systems. LS 12, TU Dortmund

Collaborative Target Detection in Wireless Sensor Networks with Reactive Mobility

CS 347 Parallel and Distributed Data Processing

Communication constraints and latency in Networked Control Systems

Time. Today. l Physical clocks l Logical clocks

CS505: Distributed Systems

A Multi-Periodic Synchronous Data-Flow Language

Finite State Machines. CS 447 Wireless Embedded Systems

Distributed Systems Principles and Paradigms

Simulation & Modeling Event-Oriented Simulations

EE382 Processor Design Winter 1999 Chapter 2 Lectures Clocking and Pipelining

Time Synchronization

Modelling Real-Time Systems. Henrik Ejersbo Jensen Aalborg University

Finally the Weakest Failure Detector for Non-Blocking Atomic Commit

Approximate Synchrony: An Abstraction for Distributed Time-Synchronized Systems

Deterministic Consensus Algorithm with Linear Per-Bit Complexity

Interplay of security and clock synchronization"

Asynchronous Models For Consensus

6.852: Distributed Algorithms Fall, Class 10

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016

Energy-Efficient Broadcast Scheduling. Speed-Controlled Transmission Channels

Chandy-Lamport Snapshotting

1 Introduction During the execution of a distributed computation, processes exchange information via messages. The message exchange establishes causal

An introduction to Uppaal and Timed Automata MVP5 1

Gradient Clock Synchronization

A Formal Model of Clock Domain Crossing and Automated Verification of Time-Triggered Hardware

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences

Overview: Synchronous Computations

Radio Network Clustering from Scratch

AN INFORMATION THEORY APPROACH TO WIRELESS SENSOR NETWORK DESIGN

Detecting Wormhole Attacks in Wireless Networks Using Local Neighborhood Information

Task Models and Scheduling

Time, Clocks, and the Ordering of Events in a Distributed System

Quantum Wireless Sensor Networks

DISTRIBUTED COMPUTER SYSTEMS

Embedded Systems 14. Overview of embedded systems design

Syntax: form ::= A: lin j E: lin ::= 3 lin j lin ^ lin j :lin j bool lin lin is a temporal formula dened over a global sequence. bool is true in g if

Embedded Systems Design: Optimization Challenges. Paul Pop Embedded Systems Lab (ESLAB) Linköping University, Sweden

Rollback-Recovery. Uncoordinated Checkpointing. p!! Easy to understand No synchronization overhead. Flexible. To recover from a crash:

Decentralized Detection In Wireless Sensor Networks

Multiple Bits Distributed Moving Horizon State Estimation for Wireless Sensor Networks. Ji an Luo

Propositional Logic: Models and Proofs

Robustness Analysis of Networked Systems

Real-Time Course. Clock synchronization. June Peter van der TU/e Computer Science, System Architecture and Networking

Optimal clock synchronization revisited: Upper and lower bounds in real-time systems

Data Gathering and Personalized Broadcasting in Radio Grids with Interferences

IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 5, MAY

Figure 10.1 Skew between computer clocks in a distributed system

A model-based approach to control over packet-switching networks, with application to Industrial Ethernet

Recap. CS514: Intermediate Course in Operating Systems. What time is it? This week. Reminder: Lamport s approach. But what does time mean?

Distributed Systems 8L for Part IB

Distributed Algorithms

Distributed Systems Fundamentals

Interval Temporal Logics over Strongly Discrete Linear Orders: the Complete Picture

Design of Control Modules for Use in a Globally Asynchronous, Locally Synchronous Design Methodology

1 Introduction During the execution of a distributed computation, processes exchange information via messages. The message exchange establishes causal

Analysis of Bounds on Hybrid Vector Clocks

Causality and physical time

Clock Synchronization with Bounded Global and Local Skew

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Oct. 5, 2017 Lecture 12: Time and Ordering All slides IG

Chapter 5 A Modified Scheduling Algorithm for The FIP Fieldbus System

Fault-Tolerant Consensus

Barrier. Overview: Synchronous Computations. Barriers. Counter-based or Linear Barriers

5958 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 12, DECEMBER 2010

Transcription:

Immediate Detection of redicates in ervasive Environments Ajay Kshemkalyani University of Illinois at Chicago November 30, 2010 A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 1 / 7

Outline of Talk Sensing the physical world for pervasive apps. Immediate redicate Detection: Motivation System and Execution Model redicates detected conjunctive and relational Approximate Snapshot Algorithms for immediate predicate detection Simple Clock-Free algorithm Interval Vector algorithm Consensus algorithm Characterization of accuracy of above algorithms erformance overhead comparison Discussion A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 2 / 7

redicate Detection by Sensing for ervasive Apps. Distributed sensed values assembled to determine context and adapt behavior or actuate /interact with environment redicates local predicate φi : on variables sensed locally by sensor i Conjunctive: φ = i N φ i, e.g., location = 915SEO temp < 20C Relational: φ = f i N (φ i ), e.g., x i + y j > 10 Do not assume physically synchronized clocks resource-constrained sensornets/ remote environments periodic clock synchronization may not be affordable skew ɛ (µ-secs to ms): imprecision in detecting predicates layer independance Explore use of lightweight middleware approaches A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 3 / 7

Immediate redicate Detection Detect global predicate φ that held at some instant in distributed observation of distributed asynchronous message-passing system Existing literature assumes instantaneous snapshots possible with synchronized physical clocks costs incurred by lower layer skew ɛ when overlap of intervals in which φ is true 2ɛ, false negatives resource-constrained sensornets, remote environments: unavailable or costly In MidSens 10, used lightweight middleware clocks to detect predicates Drawback: predicate gets detected after each sensor has sensed one more event, its next, locally (to also report completion time of interval) Immediate detection: for real-time on-line actuation and raising alarms ropose 3 clock-free algorithms A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 4 / 7

: Bound to Characterize Accuracy of Clock-Free redicate Detection Algorithms : bound on asynchronous message transmission delay for system-wide broadcast queuing in buffers, process scheduling, context switching retransmission (for reliability) Algorithms do not use ; accuracy determined by actual ( ) in a race difficult to estimate; characterizes degree of imprecision under races Contrast: physical clocks skew (ns for HW solns or µs-ms for SW solns) : 100ms - secs in WSNS in closed environments, e.g., smart homes Adequate when n is low and/or event rate is low, e.g., home. office, habitat, nature, structure monitoring << speed of human and object movements wild, remote terrain, nature monitoring: events rare w.r.t. hysical clocks: precision not needed (in the urban or wild), nor affordable (in the wild) A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 5 / 7

Sensor Network Model World plane vs. network plane Sensors/actuators modeled as processes (n) p: bound on number of sensed events at any sensor Network plane: asynchronous, FIFO channels Network plane cannot capture world plane causality: covert channels Interval: duration between two consecutively sensed events at a sensor roblem: Detect conjunctive or relational predicate over sensed values A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 6 / 7

roblem Definition Definition Given a conjunctive or relational φ on sensed values of the world plane, detect each occurrence of φ, holding at the same instant, without using physically synchronized clocks, in the network plane. Each detection should occur on-line at the earliest possible instant. Characterization of accuracy: same for relational and conjunctive predicates Level of accuracy lower for relational predicates A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 7 / 7

Time Models for SensorNets World plane causality over covert channels : cannot be tracked by network plane Hence, p n possible consistent states in state lattice World plane events to be observed: non-deterministic; single run only (Contrast: distributed programs: partial order induced by in-network deterministic sends/ receives) A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 8 / 7

Approximations in Simulating hysical Time World plane execution: one path of the many paths in state lattice Goal: identify the pn states and evaluate φ in them Control messages of our algorithms induce an artificial (non-semantic) lattice of consistent global states eliminate many of the O(p n ) states of state lattice Algorithms make approximations to the actual path traced by world plane execution, without constructing the lattice A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 9 / 7

Simulating hysical Time using Strobes Let I = {I 1,... I n } be a set of intervals, one per process. I.t s and I.t f denote the start and finish logical clock values of interval I. Definition All I i I overlap in physical time, i.e., Instantaneously I, iff Definition overlap(i) = min i (I i.t f ) max i (I i.t s ) max(i i.t s ) < min(i i.t f ) (1) i i overlap and used to characterize accuracy of 3 proposed algorithms. A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 10 / 7

Overview of roposed Algorithms Simple Value Vector at sink (or at all) node(s); Clock-Free send to sink (or broadcast) event notification; Algorithm evaluate φ whenever Value Vector changes Interval Value Vector, Interval Vector at all nodes + Vector broadcast Value Vector, Interval Vector + Algorithm evaluate φ by all nodes whenever Interval Vector changes Consensus Interval Vector Algorithm + Algorithm transmit (or broadcast) Consensus Message + consensus evaluated at sink (or by all) node(s) A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 11 / 7

Examples of otential False Negatives 4 X 5 i 7 Y 8 j Z k 1 2 Figure: Overlap: a potential false negative. i j k 1 Z 4 X 5 7 Y 8 Figure: Overlap: an inevitable false negative. 2 4 X 5 i 7 Y 8 j Z k 1 2 Figure: Overlap: a potential false negative. 4 X 5 i 7 Y 8 j Z k 1 2 Figure: Overlap: a potential false negative. A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 12 / 7

Examples of otential False ositives i 4 X 5 j Z k 1 2 7 Y 8 Figure: No overlap: a potential false positive. i j Z k 1 2 4 X 5 7 Y 8 Figure: No overlap: false positive not possible. i j Z k 1 2 4 X 5 7 Y 8 Figure: No overlap: a potential false positive. A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 13 / 7

Results: Simple Clock-Free and Interval Vector Algorithms Theorem For a single observer in a system without any synchronized clocks, for the Simple Clock-Free and Interval Vector algorithms: 1 overlap = φ is correctly detected 2 0 overlap < = any outcome is possible 3 0 overlap > = any outcome is possible 4 overlap = φ is correctly detected as not holding Corollary For a single observer in a system without any synchronized clocks, for the Simple Clock-Free and Interval Vector algorithms: 1 ositive detection = overlap > 2 Negative detection = overlap < A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 14 / 7

Approximations by Algorithms Two levels of approximations to the np actual states 1 each of the n observers sees its best approximation to the actual global states at each of the np events 2 the np approximations of the actual global states observed by any observer are seen in a permutation that is the best approximation to the actual order Interval Vector algorithm makes better approximations than Simple Clock-Free algorithm. Yet, 1 a positive detection may be false (w/ overlap [, 0]) 2 a negative detection may be false (w/ overlap [0, ]) Consensus algorithm eliminates the first drawback, and reduces the number of instances that suffer from the second drawback. A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 15 / 7

Consensus Algorithm: Idea Cosensus algorithm runs consensus among observers approximations. Besides a positive and a negative bin, it creates a third bin: borderline. 1 ositives are all true with overlap (0, ); 2 borderline cases satisfy overlap (, ); 3 negatives are true or a few inevitable false cases with overlap (0, ). The application can classify the borderline cases in either direction. W.r.t Simple Clock-Free and Interval Vector algorithms, the number of false negatives is decreased, and the number of false positives is decreased A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 16 / 7

Consensus Algorithm: Idea Definition φ over an interval vector IV is: 1 confirmed by all iff count(iv ) = n 2 confirmed by only some iff n > count(iv ) > 0 3 confirmed by none iff count(iv ) = 0 A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 17 / 7

Consensus Algorithm: Results Theorem For n observers in a system without any synchronized clocks, for the Consensus algorithm, we have for any IV : 1 overlap = φ is confirmed by all 2 0 overlap < = φ is confirmed by all, only some, or none 3 0 overlap > = φ is confirmed by only some, or none 4 overlap = φ is confirmed by none Corollary For n observers in a system without any synchronized clocks, for the Consensus algorithm, we have for any IV : 1 Confirmed by all positive bin = true positive = overlap 0 2 Confirmed by only some borderline bin = > overlap > 3 Confirmed by none negative bin = (true negative (= overlap < 0) false negative having 0 < overlap < ) A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 18 / 7

On-the-fly Lattice Approximation Implicitly build on-the-fly the sub-lattice of those (up to n 2 p) states that the nodes do actually observe collectively, based on the np events. Also performs the corroborations among the n 2 p observations on-the-fly. 3 IV= 6 0 i 4 4 6 0 4 7 0 4 7 1 j IV= 3 6 0 7 3 7 0 4 7 0 4 7 1 8 4 8 1 k IV= 3 6 0 1 3 6 1 3 7 1 7 local interval number execution of Evaluate_State local sensed event broadcast of event notification broadcast of Consensus_Message 4 7 1 A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 19 / 7 2 4 7 2

Comparison of Algorithms for redicate Detection Baseline: Even with synchronized physical clocks, some false negatives/positives when race window < 2ɛ Ω(np) wireless broadcasts of 1 integer to sink to report each sensed event. np evals of φ at sink Algorithm Strobe Vector Strobe Scalar Simple Clock-Free Interval Vector Consensus roperties [MidSens 10] [MidSens 10] Message 1 BC of size O(n) 1 BC of size O(1) 1 msg of size O(1) 1 BC of size O(n) 1 BC of size O(n)/event complexity /event /event to sink /event /event + d messages ( or BCs), (can BC instead) where d [0, n 2 p] rocessing O(n 2 p)/node + O(np)/node + O(p)/node + O(n 2 p)/node + O(n 2 p)/node + [O(n 3 p) + (O(np) [O(n 2 p) + (O(np) O(np) eval of φ at O(np) eval of φ O(np) eval of φ/node + eval of φ)] at sink eval of φ)] at sink sink (if BC, at all) at sink or at all O(d) at sink (or at all) Detection after intervals after intervals 2 latency complete complete Observer Yes Yes No No Yes independence Detection by no extra msg cost no extra msg cost use BC instead of no extra msg cost no extra msg cost all observers msg to sink overlap true positive true positive true positive true positive true positive overlap some true positive; some true positive; some true positive; some true positive; some true positive; (0, ) some false negative some false negative some false negative some false negative some false negative; (better than SCF) some in borderline overlap true negative some true negative; some true negative; some true negative; some true negative; (, 0) some false positive some false positive some false positive some in borderline (better than SCF) overlap true negative true negative true negative true negative true negative A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 20 / 7

Conclusions roblem: Algorithms to immediately detect conjunctive or relational predicate over sensed values Do not assume physically synchronized clocks resource-constrained sensornets/ remote environments, e.g. wild periodic clock synchronization may not be affordable or necessary skew ɛ (µ-secs to ms): imprecision in detecting predicates precision not needed (urban or wild), nor affordable (wild) layer independance roposed predicate detection algorithms; attractive in small WSNs, e.g. smart homes, when: message cost over reporting sensed events to sink is low n is low and/or sensed event rate <<, typical of human and object movements A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 21 / 7

Discussion Analyze impact of assuming total order and causal order in WSNs: Can naturally occur in small WSNS, shared media networks Can also be provided by middleware at low cost No long-term effect of commuication failures on predicate detection distributed and symmetric algorithms at low cost Explore how more failures and mobility can be tolerated Refine the borderline bin, e.g., based on # witnesses A. Kshemkalyani (U Illinois at Chicago) Immediate Detection of redicates...... Nov 30, 2010 22 / 7