Triggering on Area: A Systems Approach - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Triggering on Area: A Systems Approach

Description:

A dataset cut from space/time is determined to contain a target phenomenon, ... solved greedily; optimal graph does not necessarily contain optimal substructure ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 31
Provided by: bengree2
Category:

less

Transcript and Presenter's Notes

Title: Triggering on Area: A Systems Approach


1
Triggering on Area A Systems Approach
  • Benjamin Greenstein
  • David Culler
  • Deborah Estrin
  • Eddie Kohler
  • 11/8/03

2
What are we talking about?
  • Detection, Evaluation, Action
  • A dataset cut from space/time is determined to
    contain a target phenomenon, so do something

3
Example
  • A fire is localized to one square meter in a
    meadow. It is probably a campfire, so do nothing.

4
Example (continued)
  • A fire has grown larger locate any sprinklers
    nearby and turn them on. If there are no
    sprinklers, alert a human.

5
Elements of the example
  • Homogenous region detection
  • Defined by contiguity among nodes in a
    communication graph
  • Distributed area calculation
  • Actuation (flooded activation, service discovery,
    etc.)

6
Goals
  • Compute area of homogenous region, so triggering
    can occur if region satisfies some requirements
  • Devise a flexible system, so that components can
    be swapped out to achieve an alternate
    functionality
  • Provide user-level configurability via wiring and
    parameterization

7
Architecture
Sink
Sampler

CombineCache
CombineStamp

MinRate

SpanningCache
SpanningStamp
InverseNeighbhood

SourceCache
SourceStamp
AM
uses BufferPool
8
Spanning Tree
  • Optimal amounts to all pairs shortest paths which
    is O(N3)
  • Cannot be solved greedily optimal graph does not
    necessarily contain optimal substructure
  • In terms of depth, random is no worse than 2X
    optimal.
  • Approximations might help
  • Convex hull and center of mass for root
  • Best of k random trees
  • Implemented a greedy formation algorithm
  • If in region, set region id to local address,
    parent to NULL, and hop count to zero, and
    advertise
  • If I receive a message with a lower region id or
    same id, but lower hop count than my parent, then
    switch parent pointer to source.
  • Version number incremented when parent dies or
    changes to a new region to prevent
    count-to-infinity loops

9
Area Calculation
  • Delaunay Triangulation
  • Inverse Neighborhood
  • Inverse Neighborhood w/ Location
  • Voronoi Tesselation

10
Delaunay Triangulation
  • If the circle circumscribed about three vertices
    contains no other vertices in the graph, then it
    is part of the Delaunay Triangulation
  • Requires Location Information

Sink
Sampler
CombineCache
CombineStamp

MinRate

SpanningCache
SpanningStamp

DelaunayCache
DelaunayStamp
LocationStamp
LocationCache
SourceCache
SourceStamp

AM
11
Triangulation (cont.)
  • Area computation
  • Assign each triangle to the vertex with the
    lowest ID
  • Build a count aggregation tree and weight count
    by the area of the triangles
  • Consistent for any ?ABC in the triangulation when
    AB, BC, and AC are either
  • Communication links
  • Present in the neighborhood of each vertex.

12
Accuracy vs. Hop Count
13
Inverse Neighborhood
  • Guess what a communication area is likely to be
  • Weight count operation by that area divided by
    the communication neighbors of a node
  • Advantages
  • Requires no location information
  • Issues
  • Communication area guess has a huge impact on the
    result (unless only comparing relative sizes)

r
Q
14
Comparison
  • Delaunay triangulation tends to underestimate
    area because it yields the tightest polygon
    enclosing the region (even though edge nodes
    might very well represent space beyond that
    polygon)
  • Inverse neighborhood can overestimate area,
    because nodes near edge of network have fewer
    neighbors

15
Node Involvement Outside Region
16
Accuracy vs. Degree of Connectivity
17
Ceiling Data
18
Systems Contributions
  • Minimum Rate Component
  • Tag/Value Packet Format
  • Memory Layer

19
Minimum Rate
  • Generate NULL Packets at a minimum rate.
  • Check over period to see if any packets came
    through
  • If not, generate one.
  • Drives soft state mechanisms of the various
    layers
  • Think Elevator
  • Advantages
  • Fewer timers
  • Fewer header bytes sent
  • Reduced duplication of attributes
  • Issues
  • Soft state can drown a network, particularly in
    TOSSIM
  • Eventual consistency isnt always timely

MinRate
Sink
Sampler
CombineCache
CombineStamp

MinRate

SpanningCache
SpanningStamp

DelaunayCache
DelaunayStamp

LocationStamp
LocationCache
SourceCache
SourceStamp

AM
20
Stamping Attributes
  • Tag/Value packet format
  • Add as many attributes as needed or as can fit in
    data portion of TOS_Msg struct
  • Limited to 8 different types of attributes in
    system
  • Constant time inserts, tests for inclusion,
    linear reads
  • putAttr() and getAttr() provided as inline for
    write and read
  • Byte 0 of data portion contains bit field for
    test
  • 1c bytes of overhead for c attributes

TOS_Msg msg-gtdata
Tag Field byte
Tag (3 bits)
Length (5 bits)
Value (length as specified)
Tag (3 bits)
Length (5 bits)
21
Adding an attribute
  • command SendMsgAbove.send(uint16_t address,
    uint8_t length, TOS_MsgPtr msg, uint8_t
    virtual_time)
  • if (waitedLongEnough(virtual_time))
  • if (putAttr(msg,
  • (uint8_t )loc, / pointer
    to the attribute /
  • sizeof(loc_attr_t), / size of
    the attribute /
  • length, / the
    current length of msg /
  • LOCATION_TYPE, / one of
    8 attribute types /
  • sizeof(source_attr_t)) / only
    put if also room for this /
  • )
  • / There was room for this attribute /
  • else
  • / There was not room for this attribute /
  • return (call SendMsgBelow.send(address,length,msg
    ,virtual_time))

22
Reading an attribute
  • event ReceiveMsgBelow.receive(TOS_MsgPtr msg)
  • uint8_t sz
  • if (!updatePending)
  • if (pmsg-gtdata0 LOCATION_FLAG)
  • sz sizeof(location_attr_t)
  • if (getAttr(msg, (uint8_t )newLoc, sz,
    LOCATION_TYPE) SUCCESS)
  • post updateCache()
  • signal ReceiveMsgAbove.receive(msg)
  • return msg

23
Impact of Aggregation (degree8)
24
More on Impact
25
Memory Layer
  • Sits directly above AM layer
  • Buffer Pool
  • Buffer allocation and guards handled in memory
    layer instead of in every component
  • alloc(), free(), copyAlloc()
  • Implicit Deallocation
  • When SendMsg.send () fails and immediately after
    upcalls to SendMsg.sendDone() and
    ReceiveMsg.receive()
  • Queued Send absorbs bursts (thanks, Phil B.)

Sink
Sampler
CombineCache
CombineStamp

MinRate

SpanningCache
SpanningStamp

DelaunayCache
DelaunayStamp

LocationStamp
LocationCache
SourceCache
SourceStamp

AM
26
Allocation
  • event result_t Timer.fired()
  • virtualTime
  • if (!msgReceivedFromAbove)
  • if ((msg call BufferPool.alloc()) ! NULL)
  • msg-gtdata0 NO_ATTRIBUTES
  • return (call SendMsgBelow.send(
  • TOS_BCAST_ADDR, 1, msg,
  • virtualTime)

27
Memory Layer (cont.)
  • Advantages
  • Dynamic memory allocation (potential for less
    memory usage)
  • Sharing of RAM across components without the
    hassles of
  • Buffer guards
  • Pointer swaps
  • Calling free() everywhere
  • Issues
  • Memory exhaustion
  • Memory leaks
  • Centralized thing to break (if memory layer
    breaks, then everything breaks)
  • Might want greater flexibility than what our
    implicit deallocation provides (e.g., sticky
    alloc())

28
Spanning Trees
29
Delaunay Regions
30
The End
Write a Comment
User Comments (0)
About PowerShow.com