1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Tài liệu Sổ tay của các mạng không dây và điện toán di động P10 doc

24 324 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Leader election protocols for radio networks
Tác giả Koji Nakano, Stephan Olariu
Người hướng dẫn Ivan Stojmenović, Editor
Trường học Japan Advanced Institute for Science and Technology; Old Dominion University
Chuyên ngành Computer Science
Thể loại Chapter
Năm xuất bản 2002
Định dạng
Số trang 24
Dung lượng 165,57 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

In the RN with collisiondetection, the status of a radio channel in a time slot is: NULL if no station transmitted in the current time slot SINGLE if exactly one station transmitted in t

Trang 1

CHAPTER 10

Leader Election Protocols

for Radio Networks

A radio network (RN, for short) is a distributed system with no central arbiter, consisting of

n radio transceivers, henceforth referred to as stations In a single-channel RN, the stations

communicate over a unique radio frequency channel known to all the stations A RN is said

to be single-hop when all the stations are within transmission range of each other In thischapter, we focus on single-channel, single-hop radio networks Single-hop radio networksare the basic ingredients from which larger, multi-hop radio networks are built [3, 22]

As customary, time is assumed to be slotted and all transmissions are edge-triggered,that is, they take place at time slot boundaries [3, 5] In a time slot, a station can transmitand/or listen to the channel We assume that the stations have a local clock that keeps syn-chronous time, perhaps by interfacing with a global positioning system (GPS, for short)[6, 8, 18, 20] It is worth noting that, under current technology, the commercially availableGPS systems provide location information accurate to within 22 meters as well as time in-formation accurate to within 100 nanoseconds [6] It is well documented that GPS sys-tems using military codes achieve a level of accuracy that is orders of magnitude betterthan their commercial counterparts [6, 8] In particular, this allows the stations to detecttime slot boundaries and, thus, to synchronize

Radio transmission is isotropic, that is, when a station is transmitting, all the stations inits communication range receive the packet We note here that this is in sharp contrastwith the basic point-to-point assumption in wireline networks in which a station can spec-ify a unique destination station We employ the commonly accepted assumption that whentwo or more stations are transmitting on a channel in the same time slot, the correspondingpackets collide and are garbled beyond recognition It is customary to distinguish amongradio networks in terms of their collision detection capabilities In the RN with collisiondetection, the status of a radio channel in a time slot is:

NULL if no station transmitted in the current time slot

SINGLE if exactly one station transmitted in the current time slot

219

Handbook of Wireless Networks and Mobile Computing, Edited by Ivan Stojmenovic´

Copyright © 2002 John Wiley & Sons, Inc ISBNs: 0-471-41902-8 (Paper); 0-471-22456-1 (Electronic)

Trang 2

COLLISION if two or more stations transmitted the channel in the current time slotThe problem that we survey in this chapter is the classical leader election problem,which asks the network to designate one of its stations as leader In other words, after exe-cuting the leader election protocol, exactly one station learns that it was elected leader,whereas the remaining stations learn the identity of the leader Historically, the leaderelection problem has been addressed in wireline networks [1, 2, 9, 10, 21], in which eachstation can specify a destination station.

The leader election problem can be studied in the following three scenarios:

Scenario 1: The number n of stations is known in advance

Scenario 2: The number n of stations is unknown, but an upper bound u on n is known

in advance

Scenario 3: Neither the number of stations nor an upper bound on this number isknown in advance

It is intuitively clear that the task of leader election is the easiest in Scenario 1 and hardest

in Scenario 3, with Scenario 2 being in between the two

Randomized leader election protocols designed for single-channel, single-hop radionetworks work as follows In each time slot, the stations transmit on the channel withsome probability As we will discuss shortly, this probability may or may not be the samefor individual stations If the status of the channel is SINGLE, the unique station that hastransmitted is declared the leader If the status is not SINGLE, the above is repeated until,

eventually, a leader is elected Suppose that a leader election protocol runs for t time slots and a leader has still not been elected at that time The history of a station up to time slot t

is captured by

The status of the channel—The status of the channel in each of the t time slots, that is,

a sequence of {NULL,COLLISION} of length t.

Transmit/not-transmit—The transmission activity of the station in each of the t time slots, that is, a sequence of {transmit,not-transmit} of length t

It should be clear that its history contains all the information that a station can obtain in t

time slots From the perspective of how much of the history information is used, we tify three types of leader election protocols for single-channel, single-hop radio networks:

iden-1 Oblivious In time slot i, (1  i), every station transmits with probability p i The

probability p iis fixed beforehand and does not depend on the history

2 Uniform In time slot i (1  i), all the stations transmit with the same probability p i

Here p iis a function of the history of the status of channel in time slots 1, 2, ,

i – 1.

3 Non-uniform:In each time slot, every station determines its transmission

probabili-ty, depending on its own history

An oblivious leader election protocol is uniquely determined by a sequence P = 具 p,

Trang 3

p2, 典 of probabilities In time slot i (1  i), every station transmits with probability pi Aleader is elected if the status of the channel is SINGLE Clearly, oblivious leader electionprotocols also work for radio networks with no collision detection, in which the stationscannot distinguish between NULL and COLLISION.

A uniform leader election protocol is uniquely determined by a binary tree T of bilities T has nodes p i, j(1  i; 1  j  2i–1), each corresponding to a probability Node

proba-p i, j has left child p i+1,2 j–1 and right child p j+1,2 j The leader election protocol traverses T from the root as follows Initially, the protocol is positioned at the root p1,1 If in time slot i the protocol is positioned at node p i, j, then every station transmits on the channel with

probability p i, j If the status of the channel is SINGLE, the unique station that has mitted becomes the leader and the protocol terminates If the status of channel is NULL,

trans-the protocol moves to trans-the left child p i+1,2 j–1; if the status is COLLISION, the protocol

moves to the right child p i+1,2 j

Similarly, a nonuniform leader election protocol is captured by a ternary tree T with nodes p i, j(1  i; 1  j  3i–1), each corresponding to a probability The children of node

p i, j are, in left to right order, p i+1,3j–2 , p i+1,3j–1 , and p i+1,3j Each station traverses T from the root as follows Initially, all the stations are positioned at the root p1,1 If in time slot i a station is positioned at node p i, j then it transmits with probability p i, j If the status of thechannel is SINGLE, the unique station that has transmitted becomes the leader and the

protocol terminates If the status of the channel is NULL, the station moves to p i+1,3j–2 If

the status of channel is COLLISION, then the station moves to p i+1,3j–1 or p i+1,3jdepending

on whether or not is has transmitted in time slot i Figure 10.1 illustrates the three types of

leader election protocols

Several randomized protocols for single-channel, single-hop networks have been sented in the literature Metcalfe and Boggs [12] presented an oblivious leader election

pre-protocol for Scenario 1 that is guaranteed to terminate in O(1) expected time slots Their

protocol is very simple: every station keeps transmitting on the channel with probability

1/n When the status of channel becomes SINGLE, the unique station that has transmitted

is declared the leader Recently, Nakano and Olariu [14] presented two nonuniform leader

election protocols for Scenario 3 The first one terminates, with probability 1 – 1/n in

O(log n) time slots (In this chapter, log and ln are used to denote the logarithms to the

base 2 and e, respectively.) The second one terminates with probability 1 – 1/log n in

O(log log n) time slots The main drawback of these protocols is that the “high

probabili-10.1 INTRODUCTION 221

Figure 10.1 Oblivious, uniform, and nonuniform protocols

Trang 4

ty” expressed by either 1 – 1/n or 1 – 1/log n becomes meaningless for small values of n For example, the O(log log n) time protocol may take a very large number of time slots to terminate True, this only happens with probability at most 1/log n However, when n is

small, this probability is nonnegligible To address this shortcoming, Nakano and Olariu

[15] improved this protocol to terminate, with probability exceeding 1 – 1/f in log log n + 2.78 log f + o(log log n + log f ) time slots Nakano and Olariu [16] also presented an

oblivious leader election protocol for Scenario 3 terminating with probability at least 1 –

1/f in O{min[(log n)2+ (log f )2, f3/5log n]} time slots.

In a landmark paper, Willard [22] presented a uniform leader election protocol for the

conditions of Scenario 2 terminating in log log u + O(1) expected time slots Willard’s tocol involves two stages: the first stage, using binary search, guesses in log log u time slots a number i (0  i  log u), satisfying 2 i  n < 2 i+1 Once this approximation for n is available, the second stage elects a leader in O(1) expected time slots using the protocol of [12] Thus, the protocol elects a leader in log log u + O(1) expected time slots Willard

pro-\citeWIL86 went on to improve this protocol to run under the conditions of Scenario 3 in

log log n + o(log log n) expected time slots The first stage of the improved protocol uses the technique presented in Bentley and Yao [4], which finds an integer i satisfying 2 i  n <

2i+1 , bypassing the need for a known upper bound u on n More recently, Nakano and Olariu with probability exceeding 1 – 1/f, in log log n + o(log log n) + O(log f) time slots.

Our uniform leader election features the same performance as the nonuniform leader tion protocol of [15] even though all the stations transmit with the same probability ineach time slot

elec-In this chapter, we survey known leader election protocols See Table 10.1 for the acteristics of these protocols

char-10.2 A BRIEF REFRESHER OF PROBABILITY THEORY

The main goal of this section is to review elementary probability theory results that areuseful for analyzing the performance of our protocols For a more detailed discussion ofbackground material we refer the reader to [13]

For a random variable X, E[X] denotes the expected value of X Let X be a random variable denoting the number of successes in n independent Bernoulli trials with para-

TABLE 10.1 A summary of known leader election protocols

Protocol Scenario Time slots with probability 1 – 1/f Time slots, average

Oblivious 3 O{min[(log n)2+ (log f )2, flog n]} O(log n)

Uniform 3 log log n + o(log log n) + O(log f ) log log n + o(log log n)

Nonuniform 3 log log n + 2.78 log f + o(log log n + log f ) log log n + o(log log n)

Trang 5

meter p It is well known that X has a binomial distribution and that for every integer r

Let X be a random variable assuming only nonnegative values The following

inequali-ty, known as the Markov inequaliinequali-ty, will also be used:

To evaluate the expected value of a random variable, we state the following lemma

Lemma 2.1 Let X be a random variable taking a value smaller than or equal to T(F) with probability at least F (0  F  1), where T is a nondecreasing function Then, E[X]  兰0

For later reference, we state the following corollary

Corollary 2.2 Let X be a random variable taking a value no more than ln f with bility at least 1 – 1/f Then, E[X]  1

10.2 A BRIEF REFRESHER OF PROBABILITY THEORY 223

Trang 6

Proof: Let F = 1 – 1/f and apply Lemma 2.1 We have

E[X] 冕1

0

ln dF = [F – F ln F ]0= 1

10.3 OBLIVIOUS LEADER ELECTION PROTOCOLS

The main goal of this section is to discuss oblivious leader election protocols for radionetworks for Scenarios 1, 2, and 3

10.3.1 Oblivious Leader Election for Scenario 1

Let P = 具 p1, p2, p3, 典 be an arbitrary sequence of probabilities and suppose that in time

slot i each of the n stations of the RN is transmitting on the channel with probability p i Ifthe status of the channel is SINGLE, the unique station that has transmitted becomes the

leader Otherwise, in time slot i + 1 every station transmits with probability p i+1 This is

repeated until either the sequence P is exhausted or the status of the channel is, eventually,

SINGLE The details are spelled out in the following protocol

Protocol Election(P)

for i 씯 1 to |P| do

each station transmits with probability p iand all stations monitor the channel;

if the status of the channel is SINGLE then

the station that has transmitted becomes the leader and the protocol terminates

endfor

Clearly, since every station transmits with the same probability p i in time slot i,

Elec-tion(P) is oblivious for any sequence P of probabilities Since correctness is easy to see,

we now turn to the task of evaluating the number of time slots it takes protocol tion(P) to terminate Let X be the random variable denoting the number of stations that

Elec-transmit in the i-th time slot Then, the status of the channel is SINGLE with probability

Pr[X = 1] = 冢 冣p i (1 – p i)n–1

Simple calculations show that if we choose p i = 1/n, the probability Pr[X = 1] is

maxi-mized In this case,

Pr[X = 1] = 冢1 – 冣n–1

>

Therefore, we choose P = 具1/n, 1/n, 1/n, 典 Now, each iteration of the for loop in col Election(P = 具1/n, 1/n, 1/n, 典) succeeds in electing a leader with probability ex- ceeding 1/e Hence, t trials fails to elect a leader with probability

Trang 7

冢1 – 冣t

< e –(t/e)

Let f be a parameter satisfying 1/f = e –(t/e) Then, we have t = e ln f Therefore, we have the

following lemma:

Lemma 3.1 An oblivious protocol Election (具1/n, 1/n, 1/n, 典) elects a leader in e

ln f time slots with probability at least 1 – 1/f for any f 1

Note that the value of n must be known to every station in order to perform Election

(具1/n, 1/n, 1/n, 典)

10.3.2 Oblivious Leader Election for Scenario 2

The main purpose of this subsection is to discuss a randomized leader election protocol

for an n-station RN under the assumption that an upper bound u of the number n of tions is known beforehand However, the actual value of n itself is not known.

sta-Let D i(1  1) be the sequence of probabilities of length i defined as

D i= 具 , , , 典

We propose to investigate the behavior of protocol Election when run with the

se-quence D i Can we expect Election(D i) to terminate with the election of a leader? Theanswer is given by the following result

Lemma 3.2 For every n, protocol Election(D i) succeeds in electing a leader with

probability at least 1–2 whenever i  log n

Proof: The proof for n = 2, 3, 4 is easy For example, if n = 3, Election(D2) fails toelect a leader with probability

185

512

1

4

1

4

31

1

2

1

2

31

Trang 8

Similarly, we can prove that Election(具1/2j–1典) and Election(具1/2j典) succeed inelecting a leader with probability at least 1e–1/2and 2e–2, respectively Therefore, Elec-tion(Di) fails to elect a leader with probability at most

冢1 – e–1/4冣冢1 – e–1/2冣(1 – 2e–2) <

Let Di = D i · D i · D i· · · be an infinite sequence, where “·” denotes the concatenation

of sequences For example, D2 = 具1, 1, 1, 1, 1, 1, 典 Suppose that every station knows the

upper bound u of the number n of the station Since Election(Dlog u) elects a leaderwith probability at least 1from Lemma 3.2, t times iteration of Election(Dlog u) fails

to elect a leader with probability 1/2t Also, the t times iteration runs in t log u time slots.

Therefore, we have:

Lemma 3.3 An oblivious protocol Election(Dlog u ) elects a leader in log f log u time slots with probability at least 1 – 1/f for any f 1

10.3.3 Oblivious Leader Election for Scenario 3

Let V = 具v(1), v(2), 典 be a nondecreasing sequence of positive integers such that 1  v1

 v2 · · · holds For such sequence V, let P(V) = D v(1) · D v(2) · D v(3)· · · be the infinite

se-quence of probabilities For example, if V = 具1, 2, 3, 典, then P(V) = D1· D2· D3· · · =

For a sequence V = 具v(1), v(2), 典, let l(V) denote the minimum integer satisfying

v[l(V)]  log n In other words

1  v(1)  v(2)  · · · < v[l(V)]  log n  v[l(V) + 1]  v[l(V) + 2]  · · ·

holds Notice that, from Lemma 3.2, each call of Election(D v[l(V)]), Election

(D v[l(V)+1]), , elects a leader with probability at least 1 Thus, l(V) + t – 1 calls

Elec-tion(Dv(1) ), Election(D v(2) ), , Election(D v[l(V)+t]) elect a leader with

probabili-ty at least 1/2t Further, the l(V) + t – 1 calls run in v(1) + v(2) · · · + v[l(V) + t – 1] time

slots Consequently, Election(P(V)) runs in v(1) + v(2) · · · + v[l(V) + log f – 1] time

slots with probability 1 – 1/f

We conclude the following important lemma:

Lemma 3.4 For any sequence V = 具v(1), v(2), 典, Election[P(V)] elects a leader, with probability at least 1 – 1/f for any f  1 in v(1) + v(2) · · · + v[l(V) + log f – 1] time

slots

Let V1= 具1, 2, 3, 典 be a sequence of integers We are going to evaluate the

perfor-mance of Election[P(V)] using Lemma 3.4 Recall that

1

2

1

2

1

4

Trang 9

P(V1) = D1· D2· D3· · · = 具1

, 1, 1, 1, 1, 1, 典

Since l(V1) = log n, Election(P(V1)) elects a leader with probability 1 – 1/f in O(1 +

2 + · · · + [log n + log f – 1)] = O[(log n)2+ (log f )2] time slots Thus, we have the ing lemma

follow-Lemma 3.5 Protocol Election[P(V1)] elects a leader in O[(log n)2 + (log f)2] time

slots with probability at least 1 – 1/f for any f 1

For any fixed real number c (1 < c < 2) let V c= 具c0, c1, c2, 典 be a sequence of

integers Clearly, l(V c)  log log n/log c Thus, from Lemma 3.4, Election[P(V c)]

elects a leader with probability 1 – 1/f in

O(c0+ c1+ · · · + c log log n/log c + log f ) = O( f log c log n)

time slots Thus we have:

Lemma 3.6 Oblivious protocol Election[P(V c )] (1 < c < 2) elects a leader in O( f log c log n) time slots with probability at least 1 – 1/f for any f 1

For any two sequences P = 具 p1, p2, 典 and P = 具 p1, p2, 典, let P 䊝 P = 具 p1, p1, p2,

p2, 典 denote the combined sequence of P and P We are going to evaluate the mance of Election[P(V1) 䊝 P(Vc)]

perfor-Let Z be a sequence of probabilities such that Z = 具0, 0, 0, 典 Clearly, tion[P(V1) 䊝 Z] and Election[Z 䊝 P(Vc )] run, with probability at least 1 – 1/f , in

Elec-O[(log n)2+ (log f )2] and O( f log c log n) time slots, respectively, from Lemmas 3.5 and 3.6 Thus, Election[P(V1) 䊝 P(Vc )] runs in O{min[(log n)2+ (log f )2, f log c log n]} time

slots Therefore, we have:

Theorem 3.7 An oblivious leader election protocol Election[P(V1) 䊝 P(V c)] elects a

leader in O{min[(log n)2+ (log f )2, f log c log n]} time slots with probability at least 1 – 1/f for any f 1

Note that for a fixed c such that 1 < c < 2, we have 0 < log c < 1 Thus, by choosing small

= log c, we have,

Corollary 3.8 With probability at least 1 – 1/f for any f 1, oblivious protocol tion[P(V1) 䊝 P(Vc )] elects a leader in O{min[(log n)2+ (log f )2, flog n]} for any fixed

Elec-small > 0

10.4 UNIFORM LEADER ELECTION PROTOCOLS

The main purpose of this section is to discuss a uniform leader election protocol that

ter-minates, with probability exceeding 1 – 1/f for every f  1, in log log n + o(log log n) +

O(log f ) time slots We begin by presenting a very simple protocol that is the workhorse of

all subsequent leader election protocols

10.4 UNIFORM LEADER ELECTION PROTOCOLS 227

Trang 10

Protocol Broadcast ( p)

every station transmits on the channel with probability 1/2p;

if the status of the channel is SINGLE then

the unique station that has transmitted becomes the leader and

all stations exit the (main) protocol

10.4.1 A Uniform Leader Election Protocol Terminating in 2 log log n

Time Slots

In outline, our leader election protocol proceeds in three phases In Phase 1 the callsBroadcast(20), Broadcast(21), Broadcast(22), , Broadcast(2t) are per-formed until, for the first time, the status of the channel is NULL in Broadcast(2t) Atthis point Phase 2 begins Phase 2 executes a variant of binary search on the interval [0, 2t]using the protocol Broadcast as follows:

앫 First, Broadcast(2t/2) is executed If the status of the channel is SINGLE thenthe unique station that has transmitted becomes the leader

앫 If the status of channel is NULL then binary search is performed on the interval [0,(2t/2)], that is, Broadcast(2t/4) is executed

앫 If the status of channel is COLLISION then binary search is performed on the val [(2t/2), 2t], that is, Broadcast(3· 2t) is executed

This procedure is repeated until, at some point, binary search cannot further split an

inter-val Let u be the integer such that the last call of Phase 2 is Broadcast(u) Phase 3 peats the call Broadcast(u) until, eventually, the status of the channel is SINGLE, at which point a leader has been elected It is important to note that the value of u is continu-

re-ously adjusted in Phase 3 as follows: if the status of the channel is NULL, then it is likelythat 2u is larger than n Thus, u is decreased by one By the same reasoning, if the status of the channel is COLLISION, u is increased by one.

With this preamble out of the way, we are now in a position to spell out the details ofour uniform leader election protocol

Trang 11

if the status of channel is NULL then

We now turn to the task of evaluating the number of time slots it takes the protocol

to terminate In Phase 1, once the status of the channel is NULL the protocol exits therepeat-untilloop Thus, there exist an integer t such that the status of the channel is:

앫 SINGLE or COLLISION in the calls Broadcast(20), Broadcast(21), cast(22), , Broadcast(2t– 1), and

Equation (7) implies that with probability exceeding 1 – 1/4f , the status of the channel at

the end of the call Broadcast(2s) is NULL confirming that

Trang 12

Thus, with probability exceeding 1 – 1/4f , Phase 1 terminates in

t + 1  s + 1 = log log(4nf ) + 1 = log log n + O(log log f )

time slots Since Phase 2 terminates in at most s + 1 = log log n + O(log log f ) time slots,

we have proved the following result

Lemma 4.1 With probability exceeding 1 – 1/4f , Phase 1 and Phase 2 combined take at most 2 log log n + O(log log f ) time slots

Our next goal is to evaluate the value of u at the end of Phase 2 For this purpose, we say that the call Broadcast(m) executed in Phase 2 fails

앫 if n  2 m /4(s + 1)f and yet the status of the channel is COLLISION, or

앫 if n  2 m · ln[4(s + 1)f ] and yet the status of the channel is NULL.

We are interested in evaluating the probability that Broadcast(m) fails Let Y be the random variable denoting the number of stations transmitting in the call Broadcast(m) First, if n 2m /4(s + 1)f, then E[Y] = n/2 m  1/4(s + 1)f holds By using the Markov in-

equality (4), we have

Pr[Y > 1]  Pr[Y > 4(s + 1)f · E[Y]] <

It follows that the status of the channel is COLLISION with probability at most 1/4(s + 1) f Next, suppose that n 2m · ln[4(s + 1) f ] holds The status of the channel is NULL with

1 – 1/4f On the other hand, recall that the probability that Broadcast is called at most s + 1 times exceeds 1 – 1/4f Now a simple argument shows that the probability that Phase 2 involves at most s + 1 calls to Broadcast and that none of these calls fail exceeds 1 – 1/2f Thus, we have proved the following result

Lemma 4.2 With probability exceeding 1 – 1/2f , when Phase 2 terminates u satisfies the double inequality {n/ln[4(s + 1) f ]}  2 u  4(s + 1) fn

Ngày đăng: 24/12/2013, 13:16

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w