alexander dvinsky topics in reliable distributed computing (048961) technion, jan. 2009
TRANSCRIPT
Alexander DvinskyTopics in Reliable Distributed Computing (048961)Technion, Jan. 2009
Why ad-hoc wireless networks?Easily and quickly deployedEasily scaledFlexibleLow dependence on infrastructure
Field for applicationsEnvironmental
Glacier and ocean monitoringWild animal observation
MilitaryTracking military vehiclesSelf-healing mine fieldSniper localization
•K. Römer and F. Mattern, “The design space of wireless sensor networks,” IEEE Wireless Communications, vol. 11, no. 6, pp. 54–61, Dec. 2004.•Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006•http://www.terranet.se/
Applications cont’dAgriculture
Grape monitoringCattle herding
Civilian environmentsP2P cell-phone networkFire fightingSearch and rescue (avalanche victims)
Personal networking?Do you want your microwave oven to pass
messages from your refrigerator to a TV?What about motion sensor to a lamp?
ChallengesLimitations
RangeBattery lifeComputing powerSizePrice
Transmission errors (interference)Routing complexityInstability
Network partitionsRoute changes
Security issues
RoutingThere’re a lot of (Wikipedia claims “more
than 70”) protocols for wireless routingSome of the things to consider when
choosing areLatency requirementsPower restrictionsStorage restrictions
Reactive routingRoute is discovered when connection is
neededPro
Network is silent until connection is to be established
No need to store routing informationCon
Route requests = floodingHigh latency
Pro-active routingRoutes are discovered and stored for future
usePro
Lower latenciesLower control message flooding
ConExtra storage for routing dataMaintenance of the (potentially unneeded)
routing data
Energy considerationsThe model for signal attenuation is whenThus it is often better to make many small
hops than a single large one
1
d 2
InterferencePrimary interference constraint
Simultaneous send and receiveSimultaneous sendsSimultaneous receives
Hidden node problem
A B C
General interference constraintDotted lines show the nodes that can hear each other
Every link is translatedto a node in theinterference graphEvery interfering pair of links from the original graph are represented by an edge
Primary interference constraint
For example when links are not sufficiently far from each other
Legal schedule is represented by an independent set in the interference graph.
Additional interference
Unfortunately calculating the maximum one is an NP hard problem
Ad-hoc networks in 802.11 - IBSSBasic assumption: everybody hears everyone
– no routingEveryone works on the same channel –
secondary interference constraintThe time is divided to periods (default – 120
ms)During each period there’s a chosen leaderEvery period a beacon is sent
If node does not hear some amount of beacons it assumes it’s disconnected
IBSS – cont’dChoosing the leader
At the beginning of each cycle every node tries to send a beacon. Collisions resolved by exp. back off
The one that succeeds is the leaderLeader answers probe requestsTo announce one’s presence in the network one
must become a leaderLeader is not allowed to sleep during the cycle –
nobody wants to be a leader (except for the new guys)
If two different networks with same name are in range nodes will gradually move to the older one (age data is in the beacon)
I received aresponse. Let’stry to connect …
DemoI hear no one -I must be theonly one aroundBeacon! Beacon!Probe! Probe!Response!I’ll back off 2
I’ll back off 1
*Logical only
Our problemModel
Multi-hop networkStochastic packet arrivalPrimary interference constraintSlotted time. Unit packet lengthNo central authority
TargetMaximize throughputStability
ApproachIteratively find the best solution
Similar problem #1Multi-hop networkStochastic packet arrivalPrimary interference constraintEither central authority is present, or each
node has global topology and queue backlog information
•L. Tassiulas and A. Ephremides. - Stability properties of constrained queueing systems and scheduling policies for maximum throughput in multihop radio networks•L. Tassiulas. Linear complexity algorithms for maximum throughput in radio networks and input queued switches
Solution of problem #1One optimal, stable solution for the problem,
proven by Tassiulas and Ephremides, is the maximum weight matching in the connections graph with queue lengths used as edge weights
A problem with naïve approach is high complexity of calculations required for each slot schedule. That was later fixed by Tassiulas
Reminder:Matching: A set of edges such, that no two touch same nodeMaximal matching: Such a matching, that no more edges can be added to itMaximum matching: A matching with maximal possible weight. If weights are positive, maximum is also a maximal matching
An example
Clearly the above solution contributes the most to stability
Solution of problem #1 cont’dThe state of the network is a set of queue
lengths. This state does not change quicklyInstead of finding a maximum weight
matching for each slot, we’ll converge to itAt each step a (random) matching is chosenIn each iteration: if newly chosen random
matching is “better” than the previous one – use new, otherwise keep the old matching
An example
First solution chosen might be far from optimal, but we’ll inevitably converge to it eventually
6 > 1
7 > 6
6 < 7
10 > 7
Similar problem #2Input-queued switchPackets, arriving stochastically at input ports
are to be scheduled to output portsPorts are locked exclusively by a scheduled
matchCentral authority is available
P. Giaccone, B. Prabhakar, D.Shah. - Randomized scheduling algorithms for high-aggregate bandwidth switches
Scheme of an input-queued switch
Solution of problem #2As before, we’re interested in scheduling as
close to a maximum weight matching as possible
At each iterationconsider k alternativesfor the next step andselect the heaviest one
Can be easilyparallelized in HW
How the alternatives are chosen are chosen semi-randomly. It’s a
union of k-1 “Neighbor” matchings and a next step of “Hamiltonian Walk” over the set of all possible matchings
Both the definition of neighborhood and k can be chosen considering the domain of the solution physical limitations of the HW
1 kS S
Solution of problem #2 cont’dAlternative approach
Find a matching with high potential (heavy matching)
Merge two considered matchings into a third one, better then each of the originals
An improvementConsider the recent arrival
data when generating nextrandom schedule
MIX
Merge example
IdentitiesWhy?
If you already broadcast out loud, at least say whom to
Protocols are easier that wayWhy not?
Nodes are produced identicalRandomly generated identities are possible,
but duplicates are to be managed somehow
Example: Initially Partitioned Network
D’s packets for address a routed to A
•Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006
Duplicate address detection (DAD) important To avoid misrouting
Merged Network
•Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006
DecentralizationThe problems presented above are almost
identical to ours, except for the centralization aspect
All we need is a decentralized match and a decentralized mix algorithms
Decentralized match
R
L
R L
LL
R
R
Decentralized match cont’dThe match above works, but how well?Weights are at all not considered when
generating a matchWe could spend multiple iterations before
finding a match, that at least resembles maximum
Alternative decentralized matchNext algorithm approximates maximum
matching by a factor of 2GreedyBuilt for undirected graphs, but can be
extended
Distributed weighted matching protocol by node v
•Jaap-Henk Hoepman - Simple Distributed Weighted Matchings - eprint cs. DC/0410047, October 2004.
Set of nodes that haverequested to connectto our
Our neighborsInform c, that we’d liketo connect to it
If someone has requested toconnect to us – write it down
If someone has requested todisconnect from us – removehim from working neighbor set
If our candidate hasdropped – recalculatethe candidate
If we’ve chosen c andc has chosen usDisconnect from allthe neighbors
We’re left with the heaviest unmatchededge – add it to the matching
Candidate is the nodethat we have the heaviestedge to among all our neighbors
Examplec=null
c=C
c=B
c=F
c=B
c=null
c=FR={C,F}
R={B, G}
R={C}
c=D R={D}
Result12 instead of optimal 15
But hey, it could bemuch worse!
Decentralized mixCombination of two matches forms a set of circles and
paths (as each node can be touched at most by two edges)
Summation mechanismA message is sent by each node (in a match) along the path
or cycle, calculating weight differences between the matchings
D(A)=0
D(A)=3
D(A)=-1
D(A)=4
D(A)=1
D(A)=3
D(A)=-3
Mix by gossipBoth of the gossip algorithms in the paper
were presented last week by Ittay. Only minor details vary
Gosp-Algo 1Instead of subtracting sums, subtract averagesEach node randomly averages values with
randomly chosen neighborAfter enough ( ) iterations, each
node has a good approximation of the path/circle average it resides in
Verify, that every node in the component has the same sign of the result
If yes – act accordinglyif no – retain previous schedule
logO Ln n
Gosp-Algo 2Utilize the property of independent
exponential random variablesIf then Each node draws a value of rate equal to its
weight and sends it to neighborsWhen all values are collected, minimum can
indicate the approximation of the sum of ratesTo raise confidence, k values and not one are
drawn by each node and the average of minimums is used
1 1~ exp ,..., ~ expL Lx r x r 11
,..., ~ expL
L ii
Min x x r
Discussion pointsIdentities - is that really so hard to justify a
gossip-based mix algorithm? Running an complex algorithm to find
optimal schedule. How stable must the network be to make it worth it? When plain exponential back off is not enough?
When does ad-hoc worth the hassle? How hard is it to put some kind of coordinator in the middle?
2O n
References Eytan Modiano, Devavrat Shah, Gil Zussman - Maximizing Throughput in Wireless
Networks via Gossiping. SIG Metrics/Performance 2006.
P. Giaccone, B. Prabhakar, D.Shah. - Randomized scheduling algorithms for high-aggregate bandwidth switches. IEEE J. Sel. Areas Commun.,21(4):546-559, May 2003
L. Tassiulas and A. Ephremides. - Stability properties of constrained queueing systems and scheduling policies for maximum throughput in multihop radio networks. IEEE Trans. Autom. Control, 37(12):1936-1948, December 1992.
L. Tassiulas. Linear complexity algorithms for maximum throughput in radio networks and input queued switches. In Proc. IEEE INFOCOM’98, April 1998.
• Nitin H. Vaidya, “Tutorial on Mobile Ad Hoc Networks: Routing, MAC and Transport Issues” Infocom 2006
• K. Römer and F. Mattern, “The design space of wireless sensor networks,” IEEE Wireless Communications, vol. 11, no. 6, pp. 54–61, Dec. 2004.
• http://www.terranet.se/• Jaap-Henk Hoepman - Simple Distributed Weighted Matchings - eprint cs.
DC/0410047, October 2004.