The wakeup problem

download The wakeup problem

of 11

Transcript of The wakeup problem

  • 8/15/2019 The wakeup problem

    1/11

    M i c h a e l J . F i s c h e r *

    T h e W a k e u p P r o b l e m( E X T E N D E D A B S T R A C T )

    S h l o m o M o r a n t S t e v e n R u d i c h t G a d i T a u b e n f e l d *

    A b s t r a c tW e s t u d y a n e w p r o b l e m , t h e wakeup problem, t h a ts e e m s to b e v e r y fu n d a m e n t a l i n d i s tr i b u t e d c o m p u t -i n g . W e p r e s e n t e f f ic i e nt s o l u t i o n s t o t h e p r o b l e m a n ds h o w h o w t h e s e s o l u t i o n s c a n b e u s e d t o s o l ve t h e c o n -s e n s u s p r o b l e m , t h e l e a d e r e l e c t i o n p r o b l e m , a n d o t h e rr e l a t e d p r o b l e m s . T h e m a i n q u e s t i o n w e t r y t o a n s w e ri s, h o w m u c h m e m o r y i s n e e d e d t o s o l v e t h e w a k e u pp r o b l e m ? W e a s s u m e a m o d e l t h a t c a p t u r e s i m p o r t a n tp r o p e r t i e s o f re a l s y s t e m s t h a t h a v e b e e n l a r g e l y ig n o r e db y p r e v i o u s w o r k o n c o o p e r a t i v e p r o b le m s .

    1 I n t r o d u c t i o n1 . 1 T h e W a k e u p P r o b l e mT h e wakeup problem i s a d e c e p t i v e l y s i m p l e n e w p r o b -l e m t h a t s e em s t o b e v e r y f u n d a m e n t a l t o d i s t ri b u t e dc o m p u t i n g . T h e g o a l is t o d e s i g n a t - r e si l ie n t p r o t o -c o l f o r n a s y n c h r o n o u s p r o c e s s e s in a s h a r e d m e m o r ye n v i r o n m e n t s u c h t h a t a t l e a s t p p r o c e s s e s e v e n t u a l l yl e a r n t h a t a t l e a s t 7- p r o c e s s e s h a v e w a k e d u p a n d b e -g u n p a r t i c i p a t i n g i n th e p r o t o c o l . P u t a n o t h e r w a y , t h ew a k e u p p r o b l e m w i t h p a r a m e t e r s n , t , ~- a n d p i s to f i n da p r o t o c o l s u c h t h a t i n a n y f a i r r u n o f n p r o c e s s e s w i t ha t m o s t t f a i l u r e s , a t l e a s t p p r o c e s s e s e v e n t u a l l y knowt h a t a t l e a s t r p r o c e s s e s h a v e t a k e n a t l e as t o n e st e p i nt h e p a s t . T h e o n l y k i n d o f f a i lu r e s w e c o n s i d e r a r e c r a s h

    * C o m p u t e r S c i e n c e D e p a r t m e n t , Y a l e U n i v e r s it y , N e w H a v e n ,C T 0 6 5 2 0 .l C o m p u t e r S c i e n c e D e p a r t m e n t , T e c h n i o n , H a i f a 3 2 0 00 , Is r a e l.t C o m p u t e r S c i en c e D e p a r t m e n t C a r n e g i e M e l l o n U n i v e rs i ty ,P i t t s b u r g h , P A 1 5 21 3 .T h i s w o r k w a s s u p p o r t e d i n p a r t b y O N R c o n t r a c t N 0 0 01 4 -8 9 - J- 1 9 80 , b y t h e N a t i o n a l S c i e n ce F o u n d a t i o n u n d e r g r a n t C C R -8 4 0 5 4 7 8, b y t h e H e b r e w T e c h n i c a l I n s t i t u t e s c h o l a r s h i p , b y t h eT e c h n i o n V . P . R . F u n d s - W e l l n e r R e s e a r c h F u n d , a n d b y t h eF o u n d a t i o n f o r R e s e a rc h i n E l e c t ro n i c s , C o m p u t e r s a n d C o m m u -

    n i c a t io n s , a d m i n i s t r a t e d b y t h e I s r a e l A c a d e m y o f S c ie n c e s a n dH u m a n i t i e s .

    Perm iss ion to copy with out fee a l l or par t of th is mater t ia l is granted pro-vided that the copies are not made or d is tr ibuted for d irect commerciala d va n t a ge , t h e A C M co p y r ig h t n o ti ce an d th e t i t l e o f th e p u b l i ca tio n an dits date appear , and no t ice is g iven that copying is by permiss ion of theAssociation for Computing Machinery. To copy otherwise, o r to republish,requires a fee and/or specif ic permiss ion .

    f a i lu r e s , i n w h i c h a p r o c e s s m a y b e c o m e f a u l t y a t a n yt i m e d u r i n g i t s e x e c u t i o n , a n d w h e n i t f a i l s , i t s i m p l ys t o p s p a r t i c i p a t i n g i n t h e p r o t o c o l .

    I n t h e w a k e u p p r o b l e m , i t is k n o w n a p r i o r i b y a ll p r o -c e a se s t h a t a t l e a s t n - t p r o c e s s e s w i l l e v e n t u a l l y w a k eu p . T h e g o a l is s i m p l y t o h a v e a p o i n t i n t i m e a t w h i c ht h e f a c t t h a t a t l e a s t r p r o c e s s e s h a v e a l r e a d y w a k e du p i s known t o p p r o c e s s e s . I t i s n o t r e q u i r e d t h a t t h i st i m e b e t h e e a r l i e st p o s s i b le , a n d f a u l t y p r o c e s se s a r ei n c l u d e d i n t h e c o u n t s o f p r o c e s s e s t h a t h a v e w a k e d u pa n d t h a t k n o w a b o u t t h a t f a c t . N o t e t h a t i n a so l u t io nt o t h e w a k e u p p r o b l e m , a t l e a s t p - t c o r r e c t p r o c e s se se v e n t u a l l y le a r n t h a t a t l e a s t r - t c o r r e c t p r o c e s s e s a r ea w a k e a n d p a r t i c i p a t i n g i n t h e p r o t o c o l .

    T h e s i g n i f ic a n c e o f t h i s p r o b l e m i s t w o - f o ld . F i r s t , i ts e e m s g e n e r a l l y u se f u l t o h a v e a p r o t o c o l s u c h t h a t a f t e ra c r a sh o f t h e n e t w o r k o r a f t e r a m a l i c i o u s a t ta c k , t h er e m a i n i n g c o r r e c t p r o c e s s e s c a n f i g u r e o u t i f s u f fi c ie n t lym a n y o t h e r p r o c e s s e s r e m a i n a c t i v e t o c a r r y o u t a g i v e nt a s k . S e c o n d , a s o l u t i o n to t h i s p r o b l e m i s a u se f u lb u i l d i n g b l o c k f o r s o l v i n g o t h e r i m p o r t a n t p r o b l e m s ( c f.s e c t i o n 6 ) .1 . 2 A N e w M o d e lM u c h w o r k t o d a t e o n f a u l t - t o l e r a n t p a r a l l e l a n d d i s -t r i b u t e d s y s t e m s h a s b e e n g e n e r o u s o f t h e c l a ss o f f a u l t sc o n s i d e r e d b u t r a t h e r s t r i c t i n t h e r e q u i r e m e n t s o n t h es y s t e m i t s el f. P r o b l e m s a r e u s u a l l y s tu d i e d i n a n u n -d e r l y i n g m o d e l t h a t i s f u l l y s y n c h r o n o u s , p r o v i d e s e a c hp r o c e s s w i t h a u n i q u e n a m e t h a t i s k n o w n t o a l l o t h e rp r o c e ss e s , a n d i s i n i t ia l i z e d t o a k n o w n s t a t e a t t i m ez e r o . W e a r g u e t h a t n o n e o f t h e s e a s s u m p t i o n s i s r e a l-i s ti c i n t o d a y ' s c o m p u t e r n e t w o r k s , a n d a c h i e v i n g t h e me v e n w i t h i n a s i n g l e p a r a l l e l c o m p u t e r i s b e c o m i n g i n -c r e a s in g l y d i ff i c u lt a n d c o s t ly . L a r g e s y s t e m s d o n o t r u no f f o f a si n g le c l o c k a n d h e n c e a r e n o t s y n c h r o n o u s . P r o -v i d i n g p r o c e s s e s w i t h u n i q u e i d ' s i s c o s t ly a n d d i f fi c u lta n d g r e a t l y c o m p l i c a t e s re c o n f i g u r i n g t h e s y s t e m . F i -n a l l y , s i m u l t a n e o u s l y r e s e t t i n g a l l o f t h e c o m p u t e r s a n dc o m m u n i c a t i o n c h a n n e l s i n a l a r g e n e t w o r k t o a k n o w ni n i t i a l s t a t e i s v i r t u a l l y i m p o s s i b l e a n d w o u l d r a r e l y b ed o n e e v e n i f i t w e r e p o s s i b l e b e c a u s e o f t h e l a r g e d e -s t r u c t i v e e f f e c ts i t w o u l d h a v e o n o n g o i n g a c t i v i t i e s .

    O u r n e w m o d e l o f c o m p u t a t i o n m a k e s n o n e o f t h e se

    1 9 9 0 A C M 0 8 9 7 9 1 - 3 6 1 - 2 / 9 0 / 0 0 0 5 / 0 1 0 6 $ 1 . 5 0 1 0 6

  • 8/15/2019 The wakeup problem

    2/11

    a s s u m p t i o n s . I t c o n s i s ts o f a f u l l y a s y n c h r o n o u s c o l l e c -t i on o f n i d e n t ic a l a n o n y m o u s d e t e r m i n i s t i c p r o c e s se st h a t c o m m u n i c a t e v ia a s i n g l e f i n i t e s i z e d s h a r e d r e g -i s t e r w h i c h i s i n i t i a l l y i n a n a r b i t r a r y u n k n o w n s t a t e .A c c e s s t o t h e s h a r e d r e g i s t e r is v i a a t o m i c " t e s t - a n d -s e t " i n s t r u c t i o n s w h i c h , i n a s i n g l e i n d i v i s i b l e s t e p , r e a dt h e v a l u e i n t h e r e g i s t e r a n d t h e n w r i t e a n e w v a l u e t h a tc a n d e p e n d o n t h e v a l u e j u s t r e a d .

    A s s u m i n g a n a r b i t r a r y u n k n o w n i n i t i a l s t a t e r e l a t e st o t h e n o t i o n o f s e l f - s t a b l i z i n g s y s t e m s d e f i n e d b y D i -j k s t r a [8 ]. H o w e v e r , D i j k s t r a c o n s i d e r s o n l y n o n -t e r m i n a t i n g c o n t r o l p r o b l e m s s u c h a s t h e m u t u a l e x -c l u s i o n p r o b l e m , w h e r e a s w e s h o w h o w t o s o l v e d e c i s i o np r o b l e m s s u c h a s t h e w a k e u p , c o n s e n s u s a n d l e a d e r e l ec -t i o n p r o b l e m s , i n w h i c h a p r o c e s s m a k e s a n i r r e v o c a b l ed e c i si o n a f t e r a f i n i t e n u m b e r o f s t e p s .

    B e f o r e p r o c e e d i n g , w e s h o u l d a d d r e s s t w o p o s s i b l ec r i ti c is m s o f s h a r e d m e m o r y m o d e l s i n g e n e r a l a n d o u rm o d e l in p a r t i c u l a r . F i r s t, m o s t c o m p u t e r s i m p l e m e n to n l y r e a d s a n d w r i t es t o m e m o r y , s o w h y d o w e c o n s id e ra t o m i c t e s t - a n d - s e t i n s tr u c t i o n s ? O n e a n s w e r i s t h a tl a rg e p a r a ll e l s y s t e m s a c c es s s h a r e d m e m o r y t h r o u g ha c o m m u n i c a t i o n n e t w o r k w h i c h m a y w e l l p o s s e s s i n -d e p e n d e n t p r o c e s s in g p o w e r t h a t e n a b l e s i t t o i m p l e -m e n t m o r e p o w e r f u l p r i m i t i v e s t h a n j u s t s i m p l e re a d sa n d w r i t e s . I n d e e d , s u c h m a c h i n e s h a v e b e e n s e r i o u s l yp r o p o s e d [ 2 3, 4 4 ]. A n o t h e r a n s w e r i s t h a t p a r t o f o u ri n te r e s t i s i n ex p l o r i n g th e b o u n d a r y b e t w e e n w h a t c a na n d c a n n o t b e d o n e , a n d a p r o o f o f i m p o s s i b i l i ty fo ra m a c h i n e w i t h t e s t - a n d - s e t a c c e ss t o m e m o r y s h o w s af o r t i o r i t h e c o r r e s p o n d i n g i m p o s s i b i l i t y f o r th e w e a k e rr e a d / w r i t e m o d e l .

    A s e c o n d p o s s i b l e c r i t i c i s m i s t h a t r e a l d i s t r i b u t e ds y s t e m s a r e b u i lt a r o u n d t h e m e s s a g e - p a s s i n g p a r a d i g ma n d t h a t s h a r e d m e m o r y m o d e l s a r e u n re a l is t ic f o r la r g es y s t e m s . A g a i n w e h a v e s e v e r a l p o s s i b l e a n s w e r s . F i r s t ,t h e p r e m i s e m a y n o t b e c o r r e ct . E x p e r i e n c e i s s h o w i n gt h a t m e s s a g e - p a s s i n g s y s t e m s a r e d i ff ic u lt t o p r o g r a m ,s o i n c r e a s i n g a t t e n t i o n i s b e i n g p a i d t o i m p l e m e n t i n gs h a r e d m e m o r y m o d e l s , e i t h e r in h a r d w a r e ( e. g . t h e F l u -e n t m a c h i n e [ 4 5 ] ) o r i n s o f t w a r e ( e . g . t h e L i n d a s y s t e m[5 ]) . S e c o n d , m e s s a g e - p a s s i n g s y s t e m s a r e t h e m s e l v e sa n a b s t r a c t i o n t h a t m a y n o t a c c u r a t e l y r e fl e c t t h e r e a li -t ie s o f t h e u n d e r l y i n g h a r d w a r e . F o r e x a m p l e , m e s s a g e -p a s s i n g s y s t e m s t y p i c a l l y a s s u m e i n f i n i t e b u f f e r s f o r i n -c o m i n g m e s s a g e s , y e t n o t h i n g i s i n f i n it e i n a r e a l s y s t e m ,a n d i n d e e d o v e r f l o w o f t h e m e s s a g e b u f f e r i s o n e k i n d o ff a u l t t o w h i c h r e a l s y s t e m s a r e s u b j e c t . I t i s d i f fi c u lt t os e e h o w t o s t u d y a k i n d o f f a u l t w h i c h i s a s s u m e d a w a yb y th e m o d e l . F i n a l l y , a t t h e lo w e s t l e v e l, c o m m u n i -c a t io n h a r d w a r e l o o k s v e r y m u c h l ik e s h a r e d m e m o r y .F o r e x a m p l e , a w i r e f r o m o n e p r o c e ss t o a n o t h e r c a nb e t h o u g h t o f a s a b i n a r y s h a r e d r e g i s t e r w h i c h t h e f i r s t

    p r o c e s s c a n w r i t e ( b y i n j e c t i n g a v o l t a g e ) a n d t h e s e c o n dp r o c e s s c a n r e a d ( b y s e n s i n g t h e v o l t a g e ) .

    1 . 3 S p a c e C o m p l e x i t y R e s u l t sT h e m a i n q u e s t io n w e tr y t o a n s w e r i s, h o w m a n y v a l u e sv f o r t h e s h a r e d r e g i s t e r a r e n e c e s s a r y a n d s u f f i c i e n t t os o l ve t h e w a k e u p p r o b l e m ? T h e a n s w e r b o t h g i v es am e a s u r e o f t h e c o m m u n i c a t i o n - s p a c e c o m p l e x i t y o f t h ep r o b l e m a n d a l s o p r o v i d e s a w a y o f a ss e s s i n g th e c o s to f a c h i e v i n g r e l ia b i l i ty . W e g i v e a b r i e f o v e r v i e w o f o u rr e s u l t s b e l o w .1 .3 .1 F a u l t - F r e e S o l u t i o n sF i r s t w e e x a m i n e w h a t c a n b e d o n e i n t h e a b s e n c e o ff a u l t s ( i .e . , t = 0 ) . W e p r e s e n t a s o l u t i o n t o t h e w a k e u pp r o b l e m i n w h i c h o n e p r o c e ss l e a r n s t h a t a l l o t h e r p r o -c e s s e s a r e a w a k e ( i . e ., p = 1 a n d r = n ) , a n d i t u s e s as i n g le 4 - v a l u e d r e g i s te r ( i . e ., v - - 4 ) . T h e p r o t o c o l f o ra c h i e v i n g t h i s i s q u i t e s u b t l e a n d s u r p r i s i n g . I t c a n a l s ob e m o d i f i e d t o s o l v e t h e l e a d e r e l e c t io n p r o b l e m . B a s e do n t h i s p r o t o c o l , w e c o n s t r u c t a f a u l t - f r e e p r o t o c o l t h a tr e a c h e s c o n s e n s u s o n o n e o u t o f k p o s s i b l e v a l u e s u s i n ga 5 - v a l u e d r e g i s t e r. F i n a l l y , w e s h o w t h a t t h e r e i s n of a u l t- f r ee so l u t io n t o t h e w a k e u p p r o b l e m w i t h o n l y t w ova lu es ( i . e . , o ne b i t ) wh en 7" _> 3 .1 .3 .2 F a u l t - T o l e r a n t S o l u t i o n s : U p p e r B o u n d sW e s t a r t b y s h o w i n g t h a t t h e f a u l t- f r e e s o lu t i o n w h i c hu s e s a s i n g l e 4 - v a l u e d r e g i s t e r , m e n t i o n e d i n t h e p r e -v i o u s s e c ti o n , c a n a c t u a l l y t o l e r a t e t f a il u r e s fo r a n yr _< ( ( 2 n - 2 ) / ( 2 t + 1 ) + 1 ) / 2 . U s i n g m a n y c o p i e s o f t h i sp r o t o c o l , w e c o n s t r u c t a p r o t o c o l w i t h v = 8 t + l t h a tt o l e r a t e s t f a u l t s wh e n I " _< n - t . T h u s , i f t is a c o n -s t a n t , t h e n a c o n s t a n t s i z e d s h a r e d m e m o r y is s u f fi c ie n t ,i n d e p e n d e n t o f n . H o w e v e r , th e c o n s t a n t g r o w s e x p o -n e n t i a l l y w i t h t. A n e a s y p r o t o c o l e x i s t s w i t h v = n t h a tw o r k s f o r a n y t a n d r < n - t . T h i s m e a n s t h a t t h e a b o v ee x p o n e n t i a l r e s u l t i s o n l y o f i n t e r e s t f o r t

  • 8/15/2019 The wakeup problem

    3/11

    1 . 4 R e l a t i o n t o O t h e r P r o b l e m sW e e s t a b li s h c o n n e c t i o n s b e t w e e n t h e w a k e u p p r o b -l e m a n d t w o f u n d a m e n t a l p r o b l e m s i n d i st r ib u t e d c o m -p u t i n g : t h e c o n s e n s u s p r o b l e m a n d t h e l e a d e r e l ec -t i o n p r o b l e m . T h e s e t w o p r o b l e m s li e a t t h e c o re o fm a n y p r o b l e m s f o r f a u l t - t o l e r a n t d i s t r i b u t e d a p p l i c a -t ions [1, 7, 10, 13, 16, 20, 21, 32, 34, 43, 42, 48] .

    W e s h o w t h a t : ( 1) a n y p r o t o c o l t h a t u s e s v v a l u e sa n d s o l v e s t h e w a k e u p p r o b l e m f o r t < n / 2 , 7" > n / 2a n d p = 1 c a n b e t r a n s f o r m e d i n t o i - r e s il i e n t c o n s e n s u sa n d l e a d e r e l e c t i o n p r o t o c o l s w h i c h u s e 8 v v a l u e s ; a n d( 2 ) a n y l - r e s i l ie n t c o n s e n s u s a n d l e a d e r e le c t i o n p r o t o c o lt h a t u s e s v v a l u e s c a n b e t r a n s f o r m e d i n t o a i - r e s i l i e n tp r o t o c o l w h i c h u s e s 4 v v a l u e s a n d s o l v e s t h e w a k e u pp r o b l e m f o r a n y 7 " < [ n / 2 J + 1 a n d p = 1 .

    U s i n g t h e f i r s t r e s u l t a b o v e , w e c a n c o n s t r u c t e f f i -c i e n t s o l u t i o n s t o b o t h t h e c o n s e n s u s a n d l e a d e r e l e c t i o np r o b l e m s f r o m s o l u ti o n s fo r t h e w a k e u p p r o b l e m . T h es e c o n d r e s u l t i m p l i es t h a t t h e l o w e r b o u n d p r o v e d f ort h e w a k e u p p r o b l e m h o l d s f o r t h e s e o t h e r t w o p r o b l e m s .A s a c o n s e q u e n c e , t h e c o n s e n s u s a n d t h e l e a d e r e l e c t i o np r o b l e m s a re sp a c e - e q u i v a l e n t i n o u r m o d e l . T h i s i sp a r t i c u l a r l y s u r p r i s in g s i n c e t h e t w o p r o b l e m s s e e m s od i f f e re n t . T h e d i f f ic u l t y i n le a d e r e l e c t i o n i s b r e a k i n gs y m m e t r y , w h e r e a s c o n s e ns u s i s i n h e r e n t ly s y m m e t r i c .

    2 D e f i n i t i o n s a n d N o t a t i o n s2 . 1 P r o t o c o l s a n d K n o w l e d g eA n n - p r o c e s s p r ot o c o l P = ( C , N , R ) c o n s i s t s o f an o n e m p t y se t C o f r u n s , a n n - t u p l e N = ( q l . . . . , q n )o f p r o c e s s i d ' s ( o r p r o c e s s , f o r s h o r t ) , a n d a n n - t u p l eR = ( R 1 , . . . , R n ) o f s e ts o f r e g i s t e r s . I n f o r m a l l y , R ii n c l u d e s a l l t h e r e g i s t e r t h a t p r o c e s s qi c a n a c c es s . W ea s s u m e t h r o u g h o u t t h i s p a p e r th a t n > 2.

    A r u n i s a p a i r o f t h e f o r m ( f , S ) w h e r e f i s af u n c t i o n w h i c h a s s i g n s i n i t i a l v a l u e s t o t h e r e g i s t e r s i nR1 t .J . . . t .J R n a n d S i s a f i n i t e o r i n f i n i t e s e q u e n c e o fe v e n t s . ( W h e n S i s f i n it e , w e a l s o s a y t h a t t h e r u n i sf i n i t e . ) An e v e n t e = ( q l , v , r , v ~ ) m e a n s t h a t p r o c e s s q i ,i n o n e a t o m i c s t e p , f i r s t r e a d s a v a l u e v f r o m r e g i s t e rr a n d t h e n w r i t e s a v a l u e v ~ i n t o r e g i s t e r r . W e s a yt h a t t h e e v e n t e i n v o l v e s p r o c e s s q i a n d t h a t p r o c e s s qlp e r f o r m s a t e s t - a n d - s e t o p e r a t i o n o n r e g i s t e r r .

    T h e s e t o f r u n s i s a s s u m e d t o s a t i s f y s e v e r a l p r o p e r -t i e s ; f o r e x a m p l e , i t s h o u l d b e p r e f i x c l o s e d . B e c a u s e o fl a c k o f s p a c e , w e d o n o t g i v e a c o m p l e t e l i s t h e r e b u tp o i n t o u t t h a t t h e s e p r o p e r t i e s c a p t u r e t h e f a c t t h a tw e a r e a s s u m i n g t h a t t h e p r o c e s s e s a r e a n o n y m o u s a n di d e n ti c a ll y p r o g r a m m e d , a r e n o t s y n c h r o n iz e d , a n d t h a tn o t h i n g c a n b e a s s u m e d a b o u t t h e i n i ti a l s t a te o f th es h a r e d m e m o r y .

    T h e v a l u e o f a r e g i s t e r a t a f i n i t e r u n i s t h e l a s t v a l u et h a t w a s w r i t t e n i n t o t h a t r e g i s t e r , o r i t s i n i t i a l v a l u e i f

    n o p r o c e s s w r o t e i n t o t h e r e g i s t e r. A r e g i s t e r r i s s a i dt o b e l o c a l i f t h e r e e x i s t s a n i su c h t h a t r E R / a n df o r a n y j ~ i , r ~ R j . A r e g i s t e r i s s h a r e d i f i t i s n o tl o c a l . I n th i s p a p e r w e r e s t r i c t a t t e n t i o n t o p r o t o c o l sw h i c h h a v e e x a c t l y o n e r e g i s t e r w h i c h i s s h a r e d b y a llt h e p r o c e s s e s ( i. e ., I R 1 n . . . n R , I = 1 ) a n d a l l o t h e rr e g i s t e r s a r e l o c a l . I f S ' i s a p r e f i x o f S t h e n t h e r u n( f , S ' ) i s a p r e f i z o f ( f , S ) , a n d ( f , S ) i s a n e x t e n s i o n o f( f , S I ) . F o r a n y s e q u e n c e S , l e t S i b e t h e s u b s e q u e n c eo f S c o n t a i n i n g a l l e v e n t s i n S w h i c h i n v o l v e q i .D e f i n i t i o n : C o m p u t a t i o n s ( f , S ) a n d ( f ' , S ' ) a re e q u i v -a l e n t w i t h r e s p e c t t o q i , d e n o t e d b y ( f , S ) / ( f ' , S ' ), i ffs i =W e a r e n o w r e a d y t o d e f in e t h e n o t i o n o f k n o w l e d g e i na sh a r e d m e m o r y e n v i r o n m e n t . I n t h e fo l lo w i n g , w e u s ep r e d i c a t e t o m e a n a s e t o f r u n s .D e f i n i t i o n : F o r a p r o ce s s q i , p r e d i c a t e b a n d f i n i t e r u n

    ip , p r o c e s s q i k n o w s b a t p i f f f o r a l l p ' s u c h t h a t p .~ p ' ,i t i s t h e c a s e t h a t p ' E b .F o r s im p l i c i t y , w e a s s u m e t h a t a p r o c e s s a l w a y s t a k e sa s t e p w h e n e v e r i t i s s c h e d u l e d . A p r o c e s s t h a t t a k e s

    i n f i n i te l y m a n y s t e p s i n a r u n i s s a i d t o b e c o r r e c t int h a t r u n ; o t h e r w i s e i t i s f a u l t y . W e s a y t h a t a n i n f i n i t er u n i s l - f a i r i f f a t l e a s t I p r o c e s s e s a r e c o r r e c t i n i t .2 . 2 W a k e u p , C o n s e n s u s a n d L e a d e r

    E l e c t i o n P r o t o c o l sI n t h i s s u b s e c t i o n w e f o r m a l l y d e f in e t h e n o t i o n s o f t -r e s i l i e n t w a k e u p , c o n s e n s u s a n d l e a d e r e l e c t i o n p r o t o c o l sC < t < n ) . W e sa y t h a t a p r o c e s s q i i s a w a k e in ar u n i f t h e r u n c o n t a i n s a n e v e n t t h a t i n v o l v e s qi . T h ep r e d i c a t e " a t l e a s t 7 - p r o c e s s e s a r e a w a k e i n r u n p " i s thes e t o f al l r u n s f o r w h i c h t h e r e e x i s t v d i f f e r e n t p r o c e s s e sw h i c h a r e a w a k e i n t h e r u n . N o t e t h a t a p r o c e s s t h a tf a i ls a f t e r t a k i n g a s t e p i s n e v e r t h e l e s s c o n s i d e r e d t o b ea w a k e i n t h e r u n .

    A w a k e u p p r o t o c o l w i t h p a r a m e t e r s n , t , 7" a n d p i sa p r o t o c o l f o r n p r o c e s s e s s u c h t h a t , f o r a n y ( n - t ) -f a i r r u n p , t h e r e e x i s t s a f i n i te p r e f i x o f p i n wh i c ha t l e a s t p p r o c e s s e s k n o w t h a t a t l e a s t 7" p r o c e s s e sa r e a w a k e i n p .I t i s e a s y t o s e e t h a t a w a k e u p p r o t o c o l e x i s t s o n l yi f m a x ( p , 7") < n - t , a n d h e n c e , f r o m n o w o n , w ea s s u m e t h a t t h i s is a l w a y s tl le c a s e. W e a l s o a s s u m et h a t m i n ( p , 7") > 1 .I n t h e f o ll o w i n g , w h e n e v e r w e s p e a k a b o u t a s o lu -t i o n to th e w a k e u p p r o b l e m w i t h o u t m e n t i o n i n g p ,w e a r e a s s u m i n g t h a t p = 1 .

    A t - r e s i l i e n t k - c o n s e n s u s p r o t o c ol i s a p r o t o c o l f o rn p r o c e s s e s , w h e r e e a c h p r o c e s s h a s a l o c a l r e a d -o n l y i n p u t r e g i s t e r a n d a l o c a l w r i t e - o n c e o u t p u t

    10 8

  • 8/15/2019 The wakeup problem

    4/11

    r e g i s t e r. F o r a n y ( n - t ) - f a i r r u n t h e r e e x i s t s a fi -n i t e p r e f i x i n w h i c h a l l t h e c o r r e c t p r o c e s s e s d e c i d eo n s o m e v a l u e f r o m a s e t o f si z e k ( i .e . , e a c h c o r -r e c t p r o c e s s w r i t e s a decis ion value i n t o i t s l o c a lo u t p u t r e g i s t e r ) , t h e d e c i s i o n v a l u e s w r i t t e n b y a l lp r o c e s s e s a r e t h e s a m e , a n d t h e d e c i s i o n v a l u e i se q u a l t o t h e i n p u t v a l u e o f s o m e p r o c e s s .I n t h e f o l l o w i n g , w h e n e v e r w e s a y " c o n s e n s u s "( w i t h o u t m e n t i o n i n g s p ec i fi c k ) w e m e a n " b i n a r yc o n s e n s u s " , w h e r e t h e p o s s i b l e d e c i si o n v a l u e s a r e0 a n d 1 .

    A t -resi lient leader elect ion protocol i s a p r o t o -c o l f o r n p r o c e s s e s , wh e r e e a c h p r o c e s s h a s a l o c a lw r i t e - o n c e o u t p u t r e g i s te r . F o r a n y ( n - t ) - f a i r r u nt h e r e e x i s t s a f i n i t e p r e f i x i n wh i c h a l l t h e c o r r e c tp r o c e s s e s d e c i d e o n s o m e v a l u e i n { 0 , 1 }, a n d e x -a c t l y o n e ( c o r r e c t o r f a u l t y ) p r o c e s s d e c i d e s o n 1 .T h a t p r o c e s s i s c a l l e d t h e leader.

    3 F a u l t - f r e e s o l u t i o n sIn t h i s s e c t i o n , we d e v e l o p t i l e See-Saw protocol , w h i c hs o l v e s t h e f a u l t - f r e e w a k e u p p r o b l e m u s i n g a s i n g l e 4 -v a l u e d s h a r e d r e g i s t e r . T h e n w e s h o w h o w t h e S e e - S a wp r o t o c o l c a n b e u s e d t o s o l v e t h e k - v a l u e d c o n s e n s u sp r o b l e m . F i n a l l y , w e c l a i m t h a t i t i s i m p o s s i b l e t o s o l v et h e w a k e u p p r o b l e m u s i n g o n l y o n e s h a r e d b i t .

    T o u n d e r s t a n d t h e S e e -S a w p r o to c o l , t h e r e a d ers h o u l d i m a g i n e a p l a y g r o u n d w i t h a S e e - S a w in it . T h ep r o c e s s e s w i l l p l a y t h e p r o t o c o l o n t h e S e e - S a w , a d h e r -i n g t o s tr i c t r u l e s. W h e n e a c h p r o c e s s e n t e r s t h e p l a y -g r o u n d ( w a k e s u p ) , i t s i t s o n t h e u p - s i d e o f t h e S e e - S a wc a u s i n g i t t o s w i n g t o t h e g r o u n d . O n l y a p r o c e s s o n t h eg r o u n d ( o r d o w n - s i d e ) c a n g e t o f f a n d w h e n i t d o e s th eS e e -S a w m u s t s w i n g t o t h e o p p o s i t e o r ie n t a t i o n . T h e s er u l e s e n f o r c e a b a l a n c e i n v a r i a n t w h i c h s a y s t h a t t h en u m b e r o f p r o c e s s e s o n e a c h s i d e o f t h e S e e - S a w d i f fe r sb y a t m o s t o n e ( t h e h e a v i e r s id e a l w a y s b e i n g d o w n ) .

    E a c h p r o c e s s e n t e r s t h e p l a y g r o u n d w i t h t w o t o k e n s .T h e p r o t o c o l w i l l f o r c e t h e p r o c e s s e s o n t h e b o t t o m o ft h e S e e - S a w t o g i v e a w a y t o k e n s t o t h e p r o c e s s e s o nt h e t o p o f t h e S e e - S a w . T h u s , t o k e n f lo w w i ll c h a n g ed i r e c t i o n d e p e n d i n g o n t h e o r i e n t a t i o n o f t h e S e e - S a w .T o k e n s c a n b e n e i t h e r c r e a t e d n o r d e s t r o y e d . T h e i d e ao f t h e p r o t o c o l i s t o c a u s e t o k e n s t o c o n c e n t r a t e i n t h eh a n d s o f a s in g l e p r o c e s s. A p r o c e s s s e e i n g 2 k t o k e n sk n o w s t h a t a t l e a s t k p r o c e s s e s a r e a w a k e . H e n c e , i f i ti s g u a r a n t e e d t h a t e v e n t u a l l y s o m e p r o c e s s w il l s e e a tl e a s t 27 - t o k e n s , t h e p r o t o c o l i s b y d e f i n i t i o n a wa k e u pp r o t o c o l w i t h p a r a m e t e r 7 -, e v e n i f t h e p r o c e s s d o e s n o tk n o w t h e v a l u e o f 7- a n d h e n c e d o e s n o t k n o w w h e n t h eg o a l h a s b e e n a c h i e v e d .

    F o l l o w i n g is th e c o m p l e t e d e s c r i p t i o n o f t h e S e e - S a wp r o t o c o l . T h e 4 - v a l u e d s h a r e d r e g i s t e r i s e a s i l y i n t e r -

    p r e t e d a s t w o b i t s w h i c h w e ca l l t h e " t o k e n b i t " a n d t h e" S e e - S a w " b i t . T h e t w o s t a t e s o f t h e t o k e n b i t a r e c a ll e d" t o k e n p r e s e n t " a n d " n o t o k e n p r e s e n t " . W e t h i n k o fa p u b l i c t oken s lo t w h i c h e i t h e r c o n t a i n s a t o k e n o r i se m p t y , a c c o r d in g t o t h e v a l u e o f t h e t o k e n b i t. T h e t w os t a t e s o f t h e S e e - S a w b i t a r e c a l l e d " l e ft s i d e d o w n " a n d" r i g h t s i d e d o w n " . T h e " S e e - S a w " b i t d e s c r i b e s a v i r -t u a l S e e - S a w w h i c h h a s a l e f t a n d a r i g h t s i d e . T h e b i ti n d i c a te s w h i c h s i d e is d o w n ( i m p l y i n g t h a t t h e o p p o s i t es i d e i s u p ) .

    E a c h p r o c e ss r e m e m b e r s in p r i v a te m e m o r y t h e n u m -b e r o f t o k e n s i t c u r r e n t l y p o s s e s s a n d w h i c h o f f o u rs t a t e s i t i s c u r r e n t l y i n w i t h r e s p e c t t o t h e S e e - S a w :" n e v e r b e e n o n . . . . o n l e f t s id e " , " o n r i g h t s i d e " , a n d " g o to f f " . A p r o c e s s i s s a i d t o b e o n t h e u p - s i d e o f t h e S e e -S a w i f i t is c u r r e n t l y " o n l e f t s i d e " a n d t h e S e e - S a w b i ti s i n s t a t e " r i g h t s id e d o w n " , o r i t i s c u r r e n t l y " o n r i g h ts i d e " a n d t h e S e e - S a w b i t i s i n s t a t e " l e f t s i d e d o w n " .A p r o c e s s i n i t i a l l y p o s s e s s e s t w o t o k e n s a n d i s i n s t a t e"never been on".

    W e d e f i n e t h e p r o t o c o l b y a l is t o f ru l e s . W h e n a p r o -c e ss is s c h e d u l e d , i t l o o k s a t t h e s h a r e d r e g i s t e r a n d a ti t s o w n i n t e r n a l s t a t e a n d c a r r i e s o u t t h e f i rs t a p p l i c a -b l e r u l e , i f a n y . I f n o r u l e i s a p p l i c a b l e , i t t a k e s a n u l ls t e p w h i c h l e a v e s i t s i n t e r n a l s t a t e a n d t h e v a l u e i n t h es h a r e d r e g i s t e r u n c h a n g e d .R u l e 1 : (S tar t o f protocol) A p p l i c a b l e i f t il e s c h e d u l e d

    p r o c e s s is i n s t a t e " n e v e r b e e n o n " . T h e p r o c e s sg e t s o n t h e u p - s i d e o f th e S e e - S a w a n d t h e n f l ip s t h eS e e - S aw b i t. B y " g e t o n " , w e m e a n t h a t t h e p ro c e s sc h a n g e s i t s s t a t e t o " o n l e f t s i d e " o r " o n r i g h t s id e "a c c o r d i n g t o w h i c h e v e r s i d e i s u p . S i n c e f l i p p in gt h e S e e - S a w b i t c a u s e s t h a t s i d e t o g o d o w n , t h ep r o c e s s e n d s u p o n t h e d o w n - s i d e o f t h e S e e - S a w .

    R u l e 2 : ( E m i t t e r ) A p p l i c a b l e i f t h e s c h e d u l e d p r o c e s si s o n t h e d o w n - s i d e o f t h e S e e - S a w , h a s o n e o rm o r e t o k e n s, a n d t h e t o k e n s l ot is e m p t y . T h ep r o c e s s f li p s t h e t o k e n b i t ( t o i n d i c a t e t h a t a t o -k e n is p r e s e n t ) a n d d e c r e m e n t s b y o n e t h e c o u n to f t o k e n s i t p o s s es s e s . I f i t s to k e n c o u n t t h e r e b yb e c o m e s z e r o , t h e p r o c e s s f l i p s t h e S e e - S a w b i t a n dg e t s o f f t h e S e e - S a w b y s e t t i n g i t s s t a t e t o " g o t o f f " .

    R u l e 3 : ( A b s o r b er ) A p p l i c a b l e i f t h e s c h e d u l e d p r o c e s si s o n t h e u p - s i d e o f th e S e e - S a w a n d a t o k e n i sp r e s e n t i n th e t o k e n s l o t. T h e p r o c e s s f li p s t h et o k e n b i t ( t o i n d i c a t e t h a t a t o k e n i s n o l o n g e rp r e s e n t) a n d i n c r e m e n t s b y o n e t h e c o u n t o f t o k e n si t p o s s e s s e s .

    N o t e t h a t i f a s c h e d u l e d p r o c e s s i s o n t h e d o w n - s i d e ,h a s 2 k - 1 t o k e n s , a n d a t o k e n i s p r e s e n t i n t h e t o k e ns l o t, t h e n , a l t h o u g h n o r u l e is a p p l i c a b l e , t h e p r o c e s sn e v e r t h e l e s s s e es a t o t a l o f 2 k t o k e n s a n d h e n c e k n o w st h a t k p r o c e s s e s h a v e w a k e d u p .

    10 9

  • 8/15/2019 The wakeup problem

    5/11

    The two main ideas behind the protocol can be statedas invariants.TOKE N INVAR IANT: The number of tokens in thesystem is either 2n or 2n + 1 and does not change atany time during the protocol. (The num ber of tokens inthe system is the total number of tokens possessed byall of the processes, plus 1 if a token is present in thetoken bit slot.)BAL ANCE I NVARI ANT: The number of processes onthe left and r ight sides of the See-Saw is either perfec tlybalanced or favors the down-side of the See-Saw by oneprocess.Theo rem 3 .1 : L e t t = O . T h e S e e - S a w p r o to c o l u s e sa 4 - v a l u e d s h a r e d r e g i s t e r a n d i s a w a k e u p p r o t o c o l f o rn , t , 7" ( a n d p = 1 ) , w h e r e n a n d r a r e a r b i t r a r y a n d t =O . ( N o t e t h a t t h e r u l e s f o r t h e p r o t o c o l d o n o t m e n t i o nn o r 7 . . )

    In applications of wakeup protocols, it is often desir-able for the processes to know the value of v so thata process learning that r processes are awake can stopparticipating in the wakeup protocol and take some ac-tion based on that knowledge. The See-Saw protocolcan be easily modified to have this property by addinga termination rule immediately after Rule 1:Ru le l a : ( E n d o f p ro t o c ol ) Applicable if the scheduled

    process is on the See-Saw and sees at least 2r to-kens, where the number of tokens the process seesis the number it possesses, plus one if a token ispresent in the token slot. The process thus knowsth at 7. processes have waked up. It gets off the See-Saw (i.e., terminates) by setting its state to "gotOff ~ ,

    The See-Saw protocol can also be used to solve theleader election problem by electing the first process thatsees 2n tokens. By adding a 5 t h value, everyone can beinformed that the leader was elected, and the leadercan know that everyone knows. Now, the leader cantransmit an arbitrary message, for example a consensusvalue, to all the other processes without using any morenew values thro ugh a kind of serial protocol. This leadsto our next theorem.Theo rem 3 .2 : I n t h e a b s e n c e o f f a u l t s , i t i s p o s s i b l et o r ea c h c o n s e n s u s o n o n e o f k v a l u es u s i n g a s i n g l e5 - v a l u e d s h a r e d r e g i s t e r .

    Finally, we claim that the See-Saw protocol cann ot beimproved to use only a single binary register. A slightlyweaker result than Theorem 3.3 was also proved by Joetlalpern [27]. The question whether 3 values suffice isstill open.Theo rem 3 .3 : T h e r e d o e s n o t e x i s t a s o l u t i o n t o t h ew a k e u p p r o b l e m w h i c h u s e s o n l y a s i n g l e b i n a r y r e g i s t e rw h e n r > 3 .

    4 F a u l t - t o l e r a n t s o l u t i o n sIn this section, we explore solutions to the wakeup prob-lem which can tolerate t > 0 process failures.

    The See-Saw protocol, presented in the previous sec-tion, cannot tolerate even a single crash failure for anyr > n / 3 . The reason is that the faulty process mayfail after accumulating 2 n / 3 tokens, trapping two otherprocesses on one side o f the See-Saw, each with 2 n / 3tokens . Wh en 7" < n / 3 , the See-Saw protocol can toler-ate at least one failure. As the par am et er 7" decreases,the numbe r of failures tha t the protoc ol can tolerateincreases. This fact is captured in our first theorem.T h e o r e m 4.1: T h e S e e - S a w p r o t o c o l i s a w a k e u p p r o -t o c o l f o r n , t , r , w h e r e r < _ ((2n - 1)/ (2t + 1) + 1)/2 .

    We note that the See-Saw protocol can tolerate up ton / 2 - 1 i n i t i a l f a i l u r e s [21, 49]. In the rest of this sec-tion, we present three t-resilient solutions to the wakeupproblem. Notice tha t when the numbe r of failures t isa constant, it is possible using a constant number ofvalues for one process to learn th at n - t processes areawake.Theo rem 4 .2 : F o r a n y t < n / 6 , t h e r e i s a w a k e u p p r o -t o c o l w h i c h u s e s a s i n g l e 8 t + l - v a l u e d r e g i s t e r a n d w o r k sf o r any 7- < n - t .Theorem 4 .3 : F o r a n y t < n , t h e r e i s a w a k e u p p r o t o -c o l w h i c h u s e s a s i n g l e n - v a l u e d r e g i s t e r a n d w o r k s f o rany r < n - t .Theorem 4 .4 : F o r a n y t < n / 2 , t h e r e i s a w a k e u p p r o -t o co l w h i c h u s e s a s i n g l e O ( t ) - v a l u e d r e g i s t e r a nd w o r k sfor any 7. _< [n/2J + 1.

    5 A L o w e r B o u n dIn this section, we establish a lower bound on the num-ber of shared mem ory values needed to solve the wakeupproblem, where o n l y o n e process is required to learnthat r processes are awake, assum ing t processes maycrash fail (thus p = 1). To simplify the presentation,we assume that 9 < t < 2 n / 3 and 7- > n / 3 . Also, recallthat we already assumed that r < n - t. For the rest ofthis section, let

    tx/ t - t t 2 - 1W - - - U -- - - (1)n - t ' 4 ( n - t ) '

    ( 2 )n-t 3.5)"lg2 ( t - ~ -k-Note that W < U since t > 9.Theo rem 5 .1 : L e t P b e a w a k e u p p r o t o c o l w i t h p a r a m -e t e r s n , t a n d r . L e t V b e t h e s e t o f s h a r e d m e m o r yv a l u es u s e d b y P . T h e n IVI > w ~.

    1 1 0

  • 8/15/2019 The wakeup problem

    6/11

    W h e n w e t a k e t t o b e a c o n s t a n t f r a c t i o n o f n w e g e tt h e f o ll o w i n g i m m e d i a t e c o r o ll a ry .C o r o l l a r y 5 . 1 : Le t P b e a wa k e u p p ro t o co l w i t h p a -ra m e t e r s n , t a n d v , whe re t - -- n / c . Le t V b e t hes e t o f s h a r e d m e m o r y v a l u e s u s e d b y P a n d l et 7 =1 / ( 2 1 o g 2 ( c + 2 . 5 ) ) . The n , } V] = f t (n 'Y ) .

    T h e o r e m 5 .1 i s i m m e d i a t e i f V i s i n f in i t e , s o w e a s -s u m e t h r o u g h o u t t h i s s e c t io n t h a t V is f in i te . T h e p r o o fc o n s i s t s o f s e v e r a l p a r t s . F i r s t w e d e fi n e a s e q u e n c e o fd i r e ct e d g r a p h s w h o s e n o d e s a r e s h a r e d m e m o r y v a lu e si n V . E a c h c o m p o n e n t C o f e a c h g r a p h i n t h e s eq u e n c eh a s a c a r d i n a l i t y k a n d a w e i g h t w ~ . W e e s ta b l i s h b yi n d u c t i o n t h a t k _> r a i n ( w e , W ) a . F i n a l l y , w e a r g u et h a t i n th e l a s t g r a p h i n t h e s e q ue n c e , e v e r y c o m p o n e n tC h a s we i g h t w~ > W . H e n c e , IV [ > k ~ > W a .5 . 1 R e a c h a b i l i t y G r a p h s a n d T e r m i n a l

    G r a p h sL e t V b e t h e a l p h a b e t o f t h e s h a r e d r e g i s t e r . W e s a yt h a t a v a l u e a E V a p p e a r s m t i m e s i n a g i v e n r u n i ft h e r e a r e ( a t l e a s t ) m d i f f e re n t p r e f ix e s o f t h a t r u n w h e r et h e v a l u e o f t h e s h a r e d r e g i s t e r i s a .

    ita , b d e n o t e s t h a t t h e r e e x i s t s a r u n i n w h i c h atm o s t u p r o c e s s e s p a r t i c i p a t e , t h e i n i t i a l v a l u e o ft h e s h a r e d r e g i s t e r is a , a n d t h e v a l u e b a p p e a r s a tl e a s t o n c e .

    a : : ~ b d e n o t e s t h a t t h e r e e x i s t s a r u n i n w h i c h e xa c t l yu p r o c e s s e s p a r t i c i p a t e , e a c h p r o c e s s t h a t p a r t i c i -p a t e s t a k e s i n f i n i t e l y m a n y s t e p s , t h e i n i t i a l v a l u eo f t h e s h a r e d r e g i s t e r i s a , a n d t h e v a l u e b a p p e a r si n f in i te l y m a n y t i m e s .

    C l e a r l y , a : = ~ b i m p l i e s a r , b b u t n o t v ic e v e r s a . A l s o ,f o r e v e r y a , t h e r e e x i s t s b s u c h t h a t a : = ~ b .

    W e u s e t h e f o l lo w i n g g r a p h - t h e o r e t i c n o t i o n s . A d i-r e c te d m u l t i g r a p h 1 G i s we a k ly co n n e c t e d i f t h e u n d e r -l y in g u n d i r e c te d m u l t i g r a p h o f G i s c o n n e c t e d . A m u l t i -g r a p h G ' ( V ' , E ' ) is a su b g ra p h o f G ( V , E ) i f W _C E an dV I _ V . A m u l t i g r a p h G t i s a c o m p o n e n t o f a m u l t i -g r a p h G i f i t i s a w e a k l y c o n n e c t e d s u b g r a p h o f G a n df o r a n y e d g e ( a , b ) i n G , e i t h e r b o t h a a n d b a r e n o d e so f G ' o r b o t h a a n d b a r e n o t i n G ' . A n o d e i s a rool,3 f a m u l t i g r a p h i f t h e r e i s a d i r e c t e d p a t h f r o m e v e r yo t h e r n o d e i n t h e m u l t i g r a p h t o t h a t n o d e . A ro o t e d.Traph ( r o o t e d c o m p o n e n t ) i s a g r a p h ( c o m p o n e n t ) w i t ha t l e a s t o n e r o o t . A labeled m u l t i g r a p h i s a m u l t i g r a p ht o g e t h e r w i t h a l a b e l f u n c t i o n t h a t a s s i g n s a w e i g h t in Nt o ea c h e d g e o f G . T h e w e i g h t o f a l a b e l ed m u l t i g r a p hi s t h e s u m o f t h e w e i g h t s o f i t s e d g e s.

    W e n o w d e f i n e t h e n o t i o n o f a re a c h a b i li t y , g r a p h o f ag i v e n p r o t o c o l P .l A m u l t i g r a p h c a n h a v e s e v e r a l e d g e s f r o m a t o b .

    D e f i n i t i o n : L e t V b e th e s et o f s h a r ed m e m o r y v al u eso f p r o t o c o l P . T h e t e a c h a b i l i t y g r a p h G o f p r o t o c o l P ist h e l a b e l e d d i r e c t e d m u l t i g r a p h w i t h n o d e s e t V w h i c hh a s a n e d g e f r o m n o d e a t o n o d e b l a b e l e d w i t h r i f fa ~ b h o l d s . ( N o t e t h a t t h e r e m a y b e s e v e r a l e d g e sw i t h d i f f e re n t l a b e l s b e t w e e n t h e s a m e t w o n o d e s . N o t ea l s o t h a t G i s f i n i t e s i n c e a : : ~ b i mp l i e s t h a t r _< [ V I . )D e f i n i t i o n : A g r a p h C is c lo se d a t n o de a w . r . t . G i f ai s i n C a n d f o r e v e r y n o d e b i n G , i f ( a , b ) is a n e d g e o fG t h e n b i s i n C .D e f i n i t i o n : A m u l t i g r a p h T is t e r m i n a l w . r . t . G i f T i sa s u b g r a p h o f G , a l l o f T ' s c o m p o n e n t s a r e r o o t e d , a n dT h a s a c o m p o n e n t C w i t h r o o t a a m o n g i ts m i n i m a lw e i g h t c o m p o n e n t s t h a t i s c lo s ed a t n o d e a w . r . t . G .I n t h e r e s t o f t h e s e c t i o n w e s h o w t h a t t h e r e a c h a -b i l it y g r a p h G o f a n y w a k e u p p r o t o c o l w i t h p a r a m e t e r sn , t , r h a s s i ze _> W % W e d o t h a t b y c o n s t r u c t i n g am u l t i g r a p h T w h i c h i s t e r m i n a l w . r . t . G a n d h a s s i z e> W a . T h e o r e m 5 .1 fo l l o w s f r o m t h e s e f a c t s .

    5 . 2 R e a c h a b i l i t y G r a p h sT h e t e a c h a b i l i t y g r a p h s a r e d e f i n e d f o r a l l p r o t o c o l s .N o w w e c o n c e n t r a t e o n s u c h g r a p h s c o n s t r u c t e d f r o mw a k e u p p r o t o c o l s on l y. W e s h ow t h a t w h e n t h e w e i g h to f a r o o t e d c o m p o n e n t , s a y C , i s s u f f ic i e n t ly s m a l l , a ne d g e e x i s t s w i t h a l a b e l q f r o m a r o o t o f C t o a n o d en o t i n C , a n d w e c a n b o u n d t h e s iz e o f q .

    F o r l a t e r r e f e r e n c e w e c a l l t h e f o l l o w i n g t h r e e i n e q u a l -i t i e s ,

    ( i) p q + ( p - 1 ) w < n ,(iX) p q > n - t ,( ii i) m a x ( q , w ) < v

    t h e z i g za g i n e qu a l i t i e s . T h e s e i n e q u a l i t i e s p l a y a n i m -p o r t a n t r o le i n o u r e x p o s i ti o n .L e m m a 5 . 1 : G i v e n t e a c h a b i l i t y g r a ph G o f a w a k e u pp ro t o co l P w i t h p a ra m e t e r s n , t , 7" a n d a ro o t e d su b g ra p hC o f G w i t h r o o t a a n d w e i g h t w , i f t h er e e x i s t p o s i t i v ei n t e g e r s p a n d q t h a t s a t i s f y t h e z i g z a g i n e q u a l it i e s , t h e nf o r a n y n o de b o f G , i ra ~ b i s a n edg e o f G t h e n b i sn o t i n C .P r o o f : W e a s s u m e to t h e c o n t r a r y t h a t t h e r e e x i st s pa n d q t h a t s a t i s f y t h e z i g z a g i n e q u a l it i e s , a n d t h e r e i sa n e d g e a ~ b s u c h t h a t b b e l o n g s t o C . L e t p b e aq - f a i r r u n s t a r t i n g f r o m a i n w h i c h e x a c t l y q p r o c e s s e sp a r t i c i p a t e a n d b i s w r i t t e n i n f i n i te l y o f t e n . S i n c e b i si n C , t h e r e i s a p a t h f r o m b t o a s u c h t h a t t h e s u m o fa l l t h e l a b e l s o f e d g e s i n t h a t p a t h i s a t m o s t w a n dh e n c e b t o , a . T h i s a ll o w s u s to c o n s t r u c t a r u n w i t hp q n o n - f a u l t y p r o c e s s e s s t a r t i n g w i t h a a s fo l lo w s :

    R u n q p r o c e s s e s a c c o r d i n g t o p u n t i l b i s w r i t -t e n . R u n w p r o c e s s e s u n t il a i s w r i t t e n . ( T h i s

    11 1

  • 8/15/2019 The wakeup problem

    7/11

    m u s t b e p o s s i b l e s i n c e b ~ a . ) L e t t h e s e wp r o c e s s e s f a il . R u n a s e c o n d g r o u p o f q p r o -c e ss e s a c c o r d i n g t o p u n t il b i s w r i t t e n . R u na s e c o n d g r o u p o f w p r o c e s s e s u n t i l a i s w r i t -t e n , a n d l e t t h e m f a il . R e p e a t t h e a b o v e u n t i lt h e p t h group o f q p r o c e s s e s h a v e j u s t b e e n r u na n d b h a s a g a i n b e e n w r i t te n . A t t h i s p o i n t ,pq p r o c e s s e s b e l o n g t o s t i l l - a c t i v e g r o u p s , a n d( p - 1 ) w p r o c e s s e s h a v e d i e d . I f a n y p r o c e s s e sr e m a i n , l e t t h e m d i e n o w w i t h o u t t a k i n g a n ys t e p s . N o w , a n i n f i n i t e ru n p~ o n t h e a c t i v e p r o -c e s s e s c a n b e c o n s t r u c t e d b y c o n t i n u i n g t o r u nt h e f i rs t g r o u p a c c o r d i n g t o p u n t i l b i s w r i t -t e n a g a i n , t h e n d o i n g t h e s a m e f o r t h e s e c o n dt h r o u g h p th g r o u p s , a n d r e p e a t i n g t h i s c y c l ef o r e v e r .

    T h e r e s u l t i s a p q - f a i r ru n . M o r e o v e r , n o r e l i a b le p r o c e s sc a n d i s t i n g u i s h t h i s r u n f r o m p , a n d h e n c e n o r e li a b l ep r o c e s s e v e r k n o w s ( i n p ~ ) t h a t m o r e t h a n q p r o c e s s e sa r e a w a k e . A l s o , o b v i o u s l y , n o f a u l t y p r o c e s s k n o w s t h a tm o r e t h a n w p r o c e s s e s a r e a w a k e . S i n c e m a x ( q , w ) < 7"b u t a t l e a s t pq >_ n - t >_ r p ro cess es a re a w ake in p~,t h i s l e a d s t o a c o n t r a d i c t i o n t o t h e a s s u m p t i o n t h a t Pi s a w a k e u p p r o t o c o l . [ ]L e m m a 5 . 2 : A s s u m e w 1 . S incet h e v a l u e o f t h e d i s c r i m i n a n t i s l e ss t h a n t 2 i t f o l lo w st h a t t h e r o o t s a re p o s i t i v e . M o r e o v e r , t h e d if f e re n c eo f t h e t w o r o o t s i s a t l e a s t 1 ; h e n c e t h e r e i s a p o s i t i v ei n t e ger x s a t i s f y i n g ( 3 ) , a n d q i s t h e l e a s t s u c h i n t e g e r .Mo r e o v e r , s i n c e t i s a n i n t e g e r , t / 2 i s e i t h e r a n i n t e g e r o rl i e s e x a c t l y h a l f w a y b e t w e e n t w o i n t e g e r s , s o i n e q u a l i t y( 4 ) h o l d s .

    N e x t w e s h o w t h a t t h e r e e x i s t s a p o s i t i v e i n t e g e r ps u c h t h a t p a n d q s a t i s f y t h e i n e q u a l i t i e s ( i ) a n d ( i t ) .L e t p = [ ( n - t ) / q ] . T h e c h o i c e o f p c l e a r l y s a t i s fi e s( i t ) . A l s o f r o m ( 3 ) i t f o l l o w s t h a t

    p = < ~ + 1 < ~- - q - - q + w

    w h i c h i m p l i e s ( i ) .F i n a l l y , w e s h o w t h a t i n e q u a l i t y ( i i i ) i s s a t i s f i e d . Re -c a l l t h a t w e a s s u m e t h a t t n / 3 . I tf o ll o w s f r o m t h es e a s s u m p t i o n s t h a t r > t / 2 . S i n c eq < t / 2 , o b v i o u s l y q < r . A l s o , s i n c e w _< U a n dt U .P r o o f : A s s u m e t o th e c o n t r ar y t h a t T h a s a m i n i m a l -w e i g ht c o m p o n e n t C o f w e i g ht w < U . T h e n , b y L e m m a5 . 2 , t h e r e e x i s t p o s i t i v e i n t e g e r s q a n d p t h a t s a t i s f y t h ez i g z a g i n e q u a l i t ie s . F r o m L e m m a 5 .1 , t h e r e is a n o d e b

    11 2

  • 8/15/2019 The wakeup problem

    8/11

    n o t i n C a n d a n e d g e a ~ b i n G . T h e r e f o r e , T i s n o ta t e r m i n a l w . r . t . G , a c o n t r a d i c t i o n . 1:3L e m m a 5 . 5 : Le t G b e t he t e a cha b i l i t y g ra p h o f aw a k e u p p r o t o co l w i t h p a r a m e t e r s n , t , 7". T h e r e e x i s t s ag r a p h T w h i c h i s t e r m i n a l w . r . t . G , a l l o f w h o s e ro o t edco m p o n e n t s ha v e s i z e >_ W ~ .P r o o f : T h e f o l lo w i n g p r o c e d u r e c o n s tr u c t s T b y a d d i n ge d g e s o n e a t a t i m e t o a n i n i t i a l s u b g r a p h T o o f G u n -t i l s t ep 2 f a i l s . T he i n i t i a l s u b g r a p h T o c o n s is t s o f a l lt h e n o d e s o f G . F o r e a c h n o d e a t h e r e i s e x a c t l y o n eo u t g o i n g e d g e a ~ b i n T o . W e n o t e t w o f a c t s a b o u tT o : ( 1 ) f o r ev e r y edge a ~ b , a # b , an d ( 2 ) eve r yc o m p o n e n t o f To h a s a t l e a s t o n e r o o t . F a c t ( 1 ) f o ll o w sf r o m L e m m a 5 . 1 , c h o o s i n g q = 1 a n d p = n - t ( w = 0 );w h i le ( 2 ) f o ll o w s f r o m t h e f a c t t h a t t h e o u t d e g r e e o f a n yn o d e i s e x a c t l y o n e . A l s o , i t f o l lo w s f r o m ( 1 ) t h a t t h ew e i g h t a n d s iz e o f a n y c o m p o n e n t o f To is a t l e a s t 2 .

    A t a n y s t a g e o f t h e c o n s t r u c t i o n , e v e r y c o m p o n e n to f t h e g r a p h b u i l t s o f a r w il l h a v e a t l e a s t o n e r o o t .A d d e d e d g e s a l w a y s s t a r t a t a r o o t a n d e n d a t a n o d eo f a d i ff e r e n t c o m p o n e n t . A f t e r a d d i n g a n e d g e ( a , b ) ,t h e c o m p o n e n t s o f a a n d b a r e j o i n e d t o g e t h e r i n t o as i ng l e c o m p o n e n t w h o s e r o o t i s t h e r o o t o f b' s c o m p o -n e n t , a n d t h e w e i g h t o f t h e n e w c o m p o n e n t i s t h e s u mo f t h e w e i g h ts o f th e t w o o r i g in a l c o m p o n e n t s p l u s t h el a b e l o f t h e e d g e f r o m a t o b .P r o c e d u r e f o r a d d i n g a n e w e d g e t o T :S t e p 1 : S e l e c t a n a r b i t r ar y c o m p o n e n t C o f m i n i m a l

    w e i g h t a n d a n a r b i t r a r y r o ot a o f C .S t e p 2 : F i n d t h e s m a l l e s t i n t e g e r q f o r w h i c h t h e r e i s

    a n ed g e a ~ b i n G s u c h t h a t b i s n o t i n C . T h i ss t e p f a i ls i f n o s u c h e dg e e x i s t s .

    S t e p 3 : Pla ce t he edg e a ~ b i n t o T .L e t T i b e a g r a p h t h a t i s c o n s t r u c t e d a f t e r i a p p l i c a t i o n so f t h e a b o v e p r o c e d u r e , w h e r e T o i s a n i n i t i a l g r a p h a sd e f in e d a b o v e . C l e a r ly , a n y s u ch s e q u e n c e { T 0 , T 1 , . . . }i s f i n i t e a n d t h e l a s t e l e m e n t i s t e r m i n a l w . r . t . G .

    W e p r o v e b y i n d u c t i o n o n i , th e n u m b e r o f a p p li c a -t io n s o f t h e p r o c e d u r e , t h a t f o r a n y g r a p h T / , al l o f th ec o m p o n e n t s o f T / a re r o o t e d , a n d f o r a n y r o o t e d c o m -po ne n t C i t i s t he ca se t ha t k _> r a i n ( w , W ) ~ , k _> 2and w > _ 2 , w he r e k i s t he s i ze o f C a nd w i s it s w e i gh t .T h i s t o g e t h e r w i th L e m m a 5 .4 a n d t h e f a c t t h a t W < Uc o m p l e t e s t h e p r o o f .

    L e t / 3 = 1 / a . A s d is c u s se d b e f o re , e a c h c o m p o n e n t Co f T 0 h a s a r o o t a n d h a s s iz e k a t l e a st 2 . T h e c o m p o n e n tC c o n s i s t s o f e x a c t l y k e d g e s w i t h l a b e l 1 , s o i t s w e i g h ti s a l s o k . H e n c e , t h e b a s e c a s e h o l d s s i n c e / 3 > 1 .S i n c e To is a s u b g r a p h o f ~ w h i c h a l s o in c l u d e s a l ln o d e s o f T / , i t fo l l o w s t h a t t h e s i z e a n d w e i g h t o f a n y

    r o o t e d c o m p o n e n t o f T / a re b o t h a t l e a s t 2 . N o w , s u p -p o s e t h e p r o c e d u r e a d d s a n e d g e o f l a b e l q f r o m c o m p o -n e n t C 1 o f s i z e k l a n d w e i g h t w x t o c o m p o n e n t C 2 o f s iz ek 2 a n d w e i g h t w 2 . B y s t e p 1 , t h e n e w e d g e e m a n a t e sf r o m a m i n i m a l w e i g h t c o m p o n e n t , s o w l _< w 2 . T h ew e i g h t w o f th e n e w l y f o r m e d c o m p o n e n t is W l + w 2 + q ,a n d t h e n u m b e r o f n o d e s k i s k l + k s . W e s h o w n o wt h a t k >_ m i n ( w , W ) ~ .

    C l e a rl y , i f w ~ > W t h e n m i n ( w 2 , W ) ~ = m i n ( w , W ) ~a n d k 2 < k , s o b y th e i n d u c t i o n h y p o t h e s i s w e a r e d o n e .H e n c e , w e a s s u m e t h a t w ~ < W , s o a l s o W l < W . S i n c eW l < W i t f o ll o w s f r o m L e m m a 5 .3 t h a t t h e r e e x i stp o s i t i v e i n t e g e r s p ~ a n d q~ t h a t s a t i s f y t h e z i g z a g i n -e q u a l i ti e s a n d q ' < ( w l ( n - - t ) ) / ( t + 2 ) + 3 ; he nce b yL e m m a 5 .1 t h e r e is a n e d g e o f l a b e l q~ f r o m a n y r o o t o fC 1 t o s o m e n o d e n o t i n C 1. T h u s , b y t h e m i n i m a l i t yo f q ( t h e w e i g h t o f t h e e d g e i n s t e p 2 ) , i t fo l l o w s t h a tq < q ' w h i c h i m p l i e s t h a t q < ( w l ( n - t ) ) / ( t + 2) + 3 ;h e n c e ,

    w = w l + w 2 + q_< ( ~ - ~ - ~ + 1 w x + w 2 + 3

    n - t )_ < ( ~ - - ~ - ~ + 2 . 5 w l + w 2 .

    (8 )(9 )

    (10)I I I t I~L et k x = W l = , a n d k 2 = w 2 = . Th e n k l < k 2 ' w 1 = k l ,,Oa n d w 2 = k 2 . W e c la im t h a t

    n t + 2 . 5 ) w x + w ~n - t + 2 . 5 k 1 + k ~ ( 11 )

    _ < (k; + k;? .I t is n o t d i f f i c u lt t o se e t h a t s i n c e ( n - t ) / ( t + 2 ) + 3 . 5 =

    , ~ , I I I , .2 , e q u a h t y h o l d s f o r k x = k 2 . A s k 2 I s i n c r e a s e d t o b eIl a r g er t h a n k l , t h e r i g h t s i d e i n cr e a se s m o r e r a p i d l y t h a n

    t h e l e f t s id e s i n c e /3 > 1 ; h e n c e , t h e i n e q u a l i t y h o l d s .IF i n a l l y , b y t h e i n d u c t i o n h y p o t h e s i s , k l > w x ~ = k lIand k~ > w 2 a = k 2 . H ence ,

    (k ' + k '2)z < (kl + k2) ~ = k # . (13)P u t t i n g e q u a t i o n s ( 8 ) - ( 1 3 ) t o g e t h e r g i v es w _ < k ~ , s ok > w ~ > m i n ( w , W ) ~ . CI

    T h e o r e m 5 .1 f o ll ow s im m e d i a t e l y f r o m L e m m a 5 . 5.

    6 R e l a t i o n t o O t h e r P r o b l e m sI n t h i s s e c t i o n w e s h o w t h a t t h e r e a r e e f f ic i e n t r e d u c -t i o n s b e t w e e n t h e w a k e u p p r o b l e m f o r r = [ n / 2 J + 1a n d t h e c o n s e n s u s a n d l e a d e r e l e c ti o n p r o b l e m s . H e n c e ,t h e w a k e u p p r o b l e m c a n b e v i e w e d a s a f u n d a m e n t a l

    113

  • 8/15/2019 The wakeup problem

    9/11

    p r o b l e m t h a t c a p t u r e s t h e i n h e r e n t d i f fi c u lt y o f t h e s et w o p r o b l e m s . T h e f o l lo w i n g L e m m a s h o w s t h a t i n o r-d e r t o d e c i d e o n s o m e v a l u e i n a t - r e s i l i e n t c o n s e n s u sp r o t o c o l , i t i s a l w a y s n e c e s s a r y ( a n d i n s o m e c a s e s a l s os u f f i ci e n t ) t o l e a r n f i r s t t h a t a t l e a s t t + 1 p r o c e s s e s h a v ew a k e d u p , a n d s i m i l a r l y i n o r d e r t o b e e l e c t e d i n a t -r e s i l i e n t l e a d e r e l e c t i o n p r o t o c o l , i t i s a l w a y s n e c e s s a r yt o l e a r n t h a t a t l e a s t t + 1 p r o c e s s e s h a v e w a k e d u p . A ni m m e d i a t e c o n s e q u e n ce o f th e l e m m a is t h a t t h e r e i s n oc o n s e n s u s o r l e a d e r e le c t i o n p r o t o c o l t h a t c a n t o l e r a t e[ n / 2 ~ f a i l u r e s .L e m m a 6 . 1: ( I ) A n y t - r e s i l i e n t c o n s e n s u s ( l e ad e r el ec -t i o n ) p r o t o c o l i s a t - r e s i l i e n t w a k e u p p r o t o c o l f o r a n y7" < t + l a n d p = n - t ( p = l ) ; ( 2 ) F o r a n y t < n / 3 ,t h e r e e x i s t s t - r e s i l i e n t c o n s e n s u s a n d l e a d e r e l ec t i o n p ro -t o c ol s w h i c h a re n o t t - r e s i l i e n t w a k e u p p r o t oc o l s f o r a n yr > t + 2 .T h e o r e m 6 . 1 : A n y p r o t o c o l t h a t s o l v e s t h e w a k e u pp r o b le m f o r a n y t < n / 2 , r > n / 2 a n d p = 1 , u s i n g as i n g l e v - v a l u e d s h a r e d r eg i s t e r , c a n be t r a n s f o r m e d i n t oa t - r e s i l i e n t c o n s e n s u s ( l e a d e r el e c t i o n ) p r o t oc o l w h i c hu s e s a s i n g l e 8 v - v a l u e d ( 4 v - v a l u e d ) s h a r e d r e g i s t e r .F r o m T h e o r e m s 6 . 1 a n d 4 . 4 , i t fo l lo w s t h a t f o r a n yt < n / 2 , t h e r e i s a t - r e s i l i e n t c o n s e n s u s ( l e a d e r e l e c -t i o n ) p r o t o c o l t h a t u s e s a n O ( t ) - v a l u e d s h a r e d r e g is -t e r . N e x t w e s h o w t h a t t h e c o n v e r s e o f T h e o r e m 6 .1a l s o h o l d s . T h a t i s , th e e x i s t e n c e o f a t -r e s i l i e n t c o n -s e n s u s o r l e a d e r e l e c t i o n p r o t o c o l w h i c h u s e s a s i n g l ev - v a l u e d s h a r e d r e g i s t e r i m p l i e s t h e e x i s t e n c e o f a t-r e s i l ie n t w a k e u p p r o t o c o l f o r a n y r < I n / 2 ] + 1 w h i c hu s e s a s i n g l e O ( v ) - v a l u e d s h a r e d r e g i s t e r .T h e o r e m 6 . 2 : A n y t - r e s i l i e n t p r o t o c o l t h a t s o l v e s t h ec o n s e n s u s o r le a d e r e le c t i o n p r o b le m u s i n g a s i ng l ev - v a l u e d s h a r e d r e g i s t e r c a n be t r a n s f o r m e d i n t o a t -r e s i l i e n t p r o t oc o l t h a t s o l v e s t h e w a k e u p p r o b l e m f o r a n y7- _< [n /2 J + 1 w h i c h u s e s a s i n g l e 4 v . v a l u e d s h a r e d r e g -i s t e r .I t f o ll o w s f r o m T h e o r e m 6 . 2 t h a t t h e l o w e r b o u n dw e p r o v e d i n S e c t i o n 5 f o r t h e w a k e u p p r o b l e m w h e nr = [ n / 2 J + 1 a l s o a p p l i e s t o t h e c o n s e n s u s a n d l e a d e re l e c t io n p r o b l e m s . F i n a l ly , a n i m m e d i a t e c o r o l l a r y o fT h e o r e m 6 . 1 a n d T h e o r e m 6 . 2 i s t h a t t h e c o n s e n s u sa n d l e a d e r e le c t i o n p r o b l e m s a r e sp a c e - e q u i v a l e n t . T h a ti s , t h e r e i s a t - r e s i l i e n t c o n s e n s u s p r o t o c o l t h a t u s e s a nO ( t ) - v a l u e d s h a r e d r e g i s t e r i f[" h e r e i s a t - r e s i li e n t l e a d e re l e c ti o n p r o t o c o l t h a t u s e s a n O ( t ) - v a l u e d s h a r e d r eg i s-t e r .

    7 C o n c l u s i o n sW e s t u d y t h e f u n d a m e n t a l n e w w a k e u p p r o b l e m i n an e w m o d e l w h e r e a l l p r o c e s s e s a r e p r o g r a m m e d a l i k e ,t h e r e i s n o g l o b a l s y n c h r o n i z a t i o n , a n d i t i s n o t p o s s i -

    b l e t o s i m u l t a n e o u s l y r e s e t a l l p a r t s o f t h e s y s t e m t o ak n o w n i n i t i a l s t a t e .O u r r e s u l t s a r e i n t e r e s t i n g f o r s e v e r a l r e a s o n s :

    T h e y g i v e a q u a n t i t a t i v e m e a s u r e o f t h e c o s t o ff a u l t - t o l e r a n c e i n s h a r e d m e m o r y p a r a l le l m a c h i n e si n te r m s o f c o m m u n i c a t i o n b a n d w i d t h .

    T h e y a p p l y t o a m o d e l w h i c h m o r e a c c u r a t e l y r e -f l ec t s r ea l i t y .

    T h e y r e l a t e r e c e n t r e s u l ts f r o m t h r e e d i f fe r e n t a c -t i v e r e s e a r ch a r e a s i n p a r a ll e l a n d d i s t r i b u t e d c o m -p u t i n g , n a m e l y :

    - R e s u l t s i n s h a r e d m e m o r y s y s t e m s [2 , 1 1 , 19 ,31, 36 , 38 , 39 , 46 , 50 , 51] .

    - T h e t h e o r y o f k n o w l e d g e i n d i s t r i b u t e d s y s -tems [6 , 14 , 15 , 17, 18 , 22 , 28 , 25 , 29 , 30 , 26 ,33 , 37, 40 , 41] .

    - Se l f s t ab i l i z i ng p r o t o co l s [ 3 , 4 , 8 , 9 , 12, 2 4 , 3 5 ,47] .

    T h e y g i v e a n e w p o i n t o f v i e w a n d e n a b l e a d e e p e ru n d e r s t a n d i n g o f s o m e c l a s si c al p r o b l e m s a n d r e -s u l t s i n c o o p e r a t i v e c o m p u t i n g .

    T h e y a r e p r o v e d u s in g t e c h n i q u e s t h a t w i ll l ik e l yh a v e a p p l i c a t i o n t o o t h e r p r o b l e m s i n d i s t r i b u t e dc o m p u t i n g .

    A c k n o w l e d g e m e n tW e t h a n k J o e H a l p e r n f o r h e lp f u l d i sc u s s io n s .

    R e f e r e n c e s[1 ] K . A b r a h a m s o n . O n a c h i e v i n g c o n s e n s u s u s i n g

    s h a r e d m e m o r y . In P r o c . 7 t h A C M S y r u p. o n P r i n -c i pl es o f D i s t r i b ut e d C o m p u t i n g , p a g e s 2 9 1 - 3 0 2 ,19 8 8 .

    [2 ] B . B l o o m . C o n s t r u c t i n g t w o - w r i t e r a t o m i c re g is -t e r s . I n P r o c. 6 t h A C M S y ru p . o n P r i n c i p le s o fD i s t r i b u t e d C o m p u t i n g , p a g e s 2 4 9 - 2 5 9 , 1 9 8 7 .

    [ 3 ] G . M . B r o w n , M . G . G o u d a , a n d C . - L . W u . T o k e ns y s t e m s t h a t s e l f - s t a b i l i z e . 1 E E E T r a n s . o n C o m -p u t e r s , 3 8 ( 6 ) : 8 4 5 - 8 5 2 , J u n e 1 9 8 9.

    [4 ] J . E . B u r n s a n d J . P a c h l . U n i f o r m s e l f - s ta b l i l i z in gr i n g s . A C M T r an s . o n P r o g r a m m i n g L a n g u a g es a n dS y s t e m s , 1 1 ( 2 ) : 3 3 0 - 3 4 4 , 1 9 8 9 .

    [5 ] N . C a r r i e r o a n d D . G e l e r n t e r . L i n d a i n c o n t e x t .C o m m u n i c a t i o n s o f t he A C M , 3 2 ( 4 ) : 4 4 4 - 4 5 8 , A p r i l1 9 8 9 .

    114

  • 8/15/2019 The wakeup problem

    10/11

    [6] M. Chandy and J. Misra. How processes learn.J o u r n a l o f D i s t r i b u t e d C o m p u t i n g , 1:40-52, 1986.[7] E. Chang and R. Roberts. An improved algorithmfor decentralized extrema-finding in circular config-

    ura tion of processes. C o m m u n i c a t i o n s o f t h e A C M ,22(5):281-283, 1979.[8] E. W. Dijkstra . Self-stablizing systems in spite of

    distributed control. C o m m u n i c a t i o n s o f th e A C M ,17:643-644, 1974.[9] E. W. Dijkstra. A belated proof of self-

    stabilization. J o u r n a l o f D i s t r i b u t e d C o m p u t i n g ,1:5-6, 1986.[10] D. Dolev, C. Dwork, and L. Stockmeyer. On theminimal synchronism needed for distributed con-

    sensus. J o u r n a l o f t he A C M , 34(1):77-97, 1987.[11] D. Dolev, E. Gafifi, and N. Shavit. Toward a non-

    atomic era: /-exclusion as a test case. In Proc. 20 thA C M S y r up . o n T h e o r y o f C o m p u t i n g , pages 78-92,1988.[12] S. Dolev, A. Israeli, and S. Moran. Self stabiliza-tion of dynamic systems assuming only read writeatomicity, submitted for publication, 1989.[13] C. Dwork, N. Lynch, and L. Stockmeyer. Consen-sus in the presence of partial synchrony. J o u r n a l o ft h e A C M , 35(2):288-323, 1988.[14] C. Dwork and Y. Moses. Knowledge and common

    knowledge in a Byzantine environment i: Crashfailures. In T h e o r et i c a l A s p e c t s o f R e a s o n i n g a bo utKnowledg e : Proceed ing s o f t he 1986 Con fe rence ,pages 149-169. Morgan Kaufmann, 1986.115] R. Fagin, Y. J. Halpern, and M. Vardi. A model

    theoretic analysis of knowledge. In P r oc . 2 5 t h I E E ES y ru p. o n F o u n d a t i o n s o f C o m p u t e r S c i e nc e , pages268-278, 1984.I16] M. J. Fischer. The consensus problem in unreliabledistributed systems (a brief survey). In M. Karpin-

    sky, editor, F o u n d a t i o n s o f C o m p u t a t i o n T h e o ry ,pages 127-140. Lecture Notes in Computer Science,vol. 158, Springer-Verlag, 1983.[17] M. J. Fischer and N. Immerman. Foundations of

    knowledge for distributed systems. In Theore t i ca lAsp ec t s o f Reason i ng abou t Knowledg e : Proceed-ing s o f t he 1986 C on fe rence, pages 171-185. Mor-gan Kaufmann, March 1986.[28] M. J. Fischer and N. Immerman. Interpreting log-ics of knowledge in propositional dynamic logicwith converse. I n f o r m a t i o n P r o c e s s i n g L e t t e r s ,2 5 ( 3 ) : 1 7 5 - 1 8 1 , May 1987.

    [19] M. J. Fischer, N. A. Lynch, J. E. Burns, andA. Borodin. Distributed FIFO allocation of identi-cal resources using small shared space. A C M T r a n s .o n P r o g r a m m i n g L a n g u a g es a n d S y s t e m s , 11(1):90-114, 1989.

    [20] M. J. Fischer, N. A. Lynch, and M. Merritt. Easyimpossibility proofs for distributed consensus prob-lems. J o u r n a l o f D i s t r i b u t e d C o m p u t i n g , 1:26-39,1986.

    [21] M. J. Fischer, N. A. Lynch, and M. S. Paterson. Im-possibility of distributed consensus with one faultyprocess. J o u r n a l o f th e A C M , 32(2):374-382, April1985.

    [22] M.J. Fischer and L. D. Zuck. Reasoning about un-certainty in fault- toleran t distributed systems. InM. Joseph, editor, F o r m a l T e c h n i q u es i n R e a l - T i m ea n d F a u l t - T o l e r a n t S y s t e m s , pages 142-158. Lec-ture Notes in Compute r Science, vol. 331, Springer-Verlag, 1988.

    [23] A. Gottlieb , R. Gr ishman, C.P. Kruskal, K.P.McAuliffe, L. Rudolph, and M. Snir. The NYUultracomputer--designing an MIMD parallel com-puter. I E E E T r a n s . o n C o m p u t e r s , pages 175-189,February 1984.

    [24] M. G. Gouda. The stabilizing philosopher: Asym-metry by memory and by action. S c i e n c e o f C o m -p u t e r P r o g r a m m i n g , 1989. To appear.[25] V. Hadzilacos. A knowledge theore tic analysis ofatomic commitmen t protocols. In Proc. 6 th A CMS y m p . o n P r i n c i p l e s o f D a t a b a s e S y s t e m s , pages129-134, 1987.[26] J. Halpern and L. Zuck. A little knowledge goes

    a long way: Simple knowledge-based derivationsand correctness proofs for a f amily of protocols. InP r oc . 6 lh A C M S y ru p. o n P r i n c i p l e s o f D i s t r i b u t e dC o m p u t i n g , pages 269-280, August 1987.

    [27] Y. J. Halpern. personal COmlnunicatiou.[28] Y. J. Halpern. Reasoning about knowledge: Anoverview. In T h e o r et i c a l A s p e c t s o f R e a s o n i n g a bo utKnowledg e : Proceed ing s o f t he 1986 Con fe rence ,pages 1-17. Morgan Kaufrnann, 1986.[29] Y. J. Halpern and R. Fagin. A formal modelof knowledge, action, and communication in dis-

    tribu ted systems: Preliminary report. In Proc. 4thA C M S y r up . o n P r i n c i p le s o f D i s t r i b u t e d C o m p u t -ing , pages 224-236, 1985.[30] Y. J. Halpern and Y. Moses. Knowledge and com-mon knowledge in a distributed environment. InP r oc . 3 r d A C M S y ru p. o n P r i n c i p l e s o f D i s t r i b u t e dC o m p u t i n g , pages 50-61, 1984.

    115

  • 8/15/2019 The wakeup problem

    11/11

    [31] P. M. Herlihy. Impossibi lity and universality re-sults for wait-free synchronization. In Proc. 7thA C M S y m p . o n P r i n c i p l es o f D i s t r i b u t e d C o m p u t -ing , pages 276-290, 1988.[32] D. S. Hirschberg and J.B. Sinclair. Decentralizedextrema-finding in circular configuration of pro-

    cesses. C o m m u n i c a t i o n s o f th e A C M , 23:627-628,1980.[33] S. Katz and G. Taubenfeld. What processes know:Definitions and proof methods. In P r o c . 5 t h A C MS y r up . o n P r i n c i p l e s o f D i s t r i b u t e d C o m p u t i n g ,pages 249-262, August 1986.

    [34] E. Korach, S. Moran, and S. Zaks. Tig ht lowerand upper bounds for some distributed algorithmsfor a complete network of processors. In Proc. 3rdA C M S y m p . o n P ri n c i p le s o f D i s t ri b u t ed C o m p u t -ing , pages 199-207, 1984.

    [35] H. S. M. Kruijer. Self-stabilization (in spite of dis-tributed control) in tree-structured systems. In for -m a t i o n P r o c e s s i n g L e t t e r s , 2:91-95, 1979.

    [36] L. Lamport . The mu tua l exclusion problem: State-ment and solutions. J o u r n a l o f t h e A C M , 33:327-348, 1986.[37] D. Lehmann. Knowledge, common knowledge and

    rela ted puzzles. In Proc . 3rd A CM Syrup . on Pr in -c ip le s o f D i s t r i b u t e d C o m p u t i n g , pages 62-67, 1984.[38] C. M. Lout and H. Abu-Amara. Memory re-quirements for agreement among unreliable asyn-

    chronous processes. A d v a n c e s i n C o m p u t i n g R e -search, 4:163-183, 1988.

    [39] N. A. Lynch and M. J. Fischer. A technique fordecomposing algorithms which use a single sharedvariable. J o u r n a l o f C o m p u t e r a n d S y s t e m S c i -ences, 27(3):350-377, December 1983.

    [40] Y. Moses and M. R. Tuttl e. Programming simulta-neous actions using common knowledge. A l g o r i l h -mica , 3:121-169, 1988.[41] R. Parikh and R. Ramanujam. Distributed pro-cesses and the logic of knowledge. In R. Parikh,

    editor, Proceed ing s o f t he W ork shop on Log ic o fP r o g r a m s , pages 256-268, 1985.

    [42] M. Pease, R. Shostak, and L. Lamport. Reachingagreement in the presence of faults. J o u r n a l o f t h eA C M , 27(2):228-234, 1980.[43] G. L. Peterson. An O ( n l o g n ) unidirectional al-gorithm for the circular extrema problem. A C MT r a n s . o n P r o g r a m m i n g L a n g u a g e s a n d S y s $ e m s ,4(4):758-762, 1982.

    [ 4 4 ]

    [ 4 5 ]

    [46]

    [ 4 7 ]

    [ 4 8 3

    [49]

    [ 5 0 ]

    [ 5 i ]

    G. H. Pfister and et. al. The IBM research par-allel processor prototype (RP3): Introd uction andarchitecture. In Proceed ing s I n te rna t iona l Con fe r -ence on Para l l e l Proce s s ing , 1985.A. G. Ranade, S. N. Bhatt, and S. L. Johnsson.The fluent abstr act machine. TechnicM ReportYALEU/DCS/TR-573, Department of ComputerScience, Yale University, January 1988.G. Taubenfeld. Leader election in the presence ofn - 1 init ial failures. I n f o r m a t i o n P r o c e s s i n g L e t -t e r s , 33:25-28, 1989.G. Taubenfeld. Self-stabilizing Petri nets. Techni-cal Report YALEU/DCS/TR-707, Department ofComputer Science, Yale University, May 1989.G. Taubenfeld, S. Katz, and S. Moran. Impossibil-ity results in the presence of multiple faulty pro-cesses. In P r o c. o f t h e 9 t h F C T - T C S c on fe re nc e,Banga lore , I nd ia , December 1989. Previous versionappeared as Technion TR-#492, January 1988.G. Taubenfeld, S. Katz, and S. Moran. Initialfailures in distribu ted computations. I n t e r n a t i o n a lJ o u r n a l o f P a r a l l el P r o g r a m m i n g , 1990. To appear.Previous version appeared as Technion TR-#517,August 1988.G. Taubenfeld and S. Moran. Possibility and im-possibility results in a shared memory environment.In J.C. Bermond and M. Raynal, editors, Proc. 3rdI n t e r n a t i o n a l W o r k s h o p o n D i s t r i b u t e d A l g o r i t h m s ,pages 254-267. Lecture Notes in Computer Science,vol. 392, Springer-Verlag, 1989.P. M. B. Vitanyi and B. Awerbuch. Atomic sharedregister access by asynchronous hardware. In Proc.2 7 t h I E E E S y m p . o n F o u n d a t i o ns o f C o m p u t e r Sc i -ence, pages 223-243, 1986.

    116