Dining, Drinking and Mobile Philosophers

Dining, Drinking and Mobile Philosophers

On Distributed Resource Handling: Dining, Drinking and Mobile Philosophers y Marina Papatriantafilou Philippas Tsigas Novemb er 1997 Abstract Resource allo cation is an essential class of problems, which includes many fundamental concurrency control problems. A signi cant amount of research has b een devoted to the group of these problems, which share a common part in their name: philosophers (dining, drinking, mobile,...) We survey some of the main developments in this eld. 1 Intro duction Taking into account that time, space, devices and control are all resources shared among the entities of a distributed system, the resource allo cation problem class includes most of the fundamental concurrency control problems. Resources can b e concrete or abstract entities, such as critical sections, printers, les, CPUs, critical sections, bandwidth, they can b e reusable or not (e.g. seats and tickets in airline reservation systems, resp ectively), they can be identical or distinct. Dep ending on the typ e of the resources and combinations of them (e.g. devices and time, in the sense of real-time requirements), we have di erent instances (with variations of de nitions and names) of the problem: e.g. mutual exclusion, k -exclusion [15 ] scheduling, pro cessor allo cation, load balancing [6 , 9], real-time scheduling [33 ], non-reusable-resource allo cation [28 ], banker-like resource allo cation [21 ], are some examples. Manyofthetyp es and asp ects of the problem are well-studied and the existing literature on them is extensive. Moreover, the researchinterest in the eld remains high, b oth b ecause of its breadth, as well as b ecause of the demand in the corre- sp onding applications areas. In this short pap er we can only cover a few of the many interesting results of the eld. In particular, wesurvey some of the main develop- ments in the literature on the dining, drinking and mobile typ es of philosophers formulation of the problem of reusable-resource allo cation. Computing Sciences Department, Chalmers Universityof Technology and Goteb org University, S-412 96 Goteb org, Email: (ptrianta, tsigas)@cs.chalmers.se y Department of Computer Systems, University of Uppsala, Sweden 2 The problems The core of the problem is that pro cesses ask for reusable) resources (mayb e several of them concurrently, for b ounded time use); each resource can b e used by only one processatatime. The problem of dining philosophers was describ ed by Dijkstra [13 ]: \... the problem is the Five Dining Philosophers. The life of a philosopher consists of an alternation of thinking and eating: cycle begin think ; eat end. Five philosophers, numb ered from 0 through 4 are living in a house where the table is laid for them, each philosopher having his own place at the table: 0 4 1 3 2 Their only problem |b esides those of philosophy| is that the dish served is a very dicult kind of spaghetti, that has to be eaten with two forks. There are two forks next to each plate, so that presents no diculty: as a consequence, however, no two neighb ours may b e eating simultaneously." In the generalised dining philosophers problem [26 ], each philosopher has an arbi- trary numb er of neighb ours, with each one of whom he shares one fork and he needs all of these forks in order to eat. The drinking philosophers problem, intro duced by Chandy and Misra in [11 ] is a generalisation of the dining philosophers. Each philosopher has, as b efore, an arbitrary numb er of neighb ours with each one of whom he shares one bottle; each time that it b ecomes thirsty, it requires a (pre-sp eci ed) subset (whichmaydi er each time) of its incident b ottles in order to drink. The integration of mobility intro duces new issues and problems [7 , 23]. Now the philosophers do not just sit, but are able to move. The ability of a philosopher (also called mobile host in this setting) to b e reachable while moving requires some wireless form of communication, which supp orts broadcast communication within a sp eci c region, called a cel l . Toprovide communication b etween di erent cells, a sp eci c host, called cel l agent or base station is asso ciated with each cell. The set of cell agents are interconnected and can communicate with each other in pairs. In order to satisfy a communication request of a mobile host, the resp ective cell agent should allo cate, dep ending on the bandwidth required, a certain number of 1 wireless channels to it [22 ]. The wireless channels should be chosen by the cell agents in suchaway that no interference b etween signals can o ccur. A solution to the mobile channel allo cation problem should guarantee that if a channel is used for a communication session of a mobile host (philosopher) in a sp eci c cell, it should 1 Wireless channels are divisions of the frequency sp ectrum provided for broadcast com- munication; the signal carried on a wireless channel is carried on the resp ective frequency. Henceforth, the terms \channel" and \frequency" are used interchangeably. not b e used concurrently for other communication sessions, except in distant cel ls, outside the scop e of the signal. Note that the set of frequencies that are p otentially p ossible to b e used in each cell are the same (i.e. frequencies are re-used in each cell). However, the freefrequencies at a cell agent are the frequencies of the sp ectrum that are not in use in that cell or in any of the cells within the scop e of the signal, and it is only from this set of frequencies channels that may b e allo cated to satisfy the requests at this cell. (Requests that cannot b e satis ed can b e dropp ed.) Note that the set of free frequencies for a base station changes over time. Furthermore, the same frequency could p otentially b elong to the set of free frequencies of two adjacent base stations and hence, even when a base station is picking channels from its own set, it needs to ensure that there is no interference. To solve the philosophers problems, an algorithm must ensure the following: Exclusion (safety ): no resource should b e used simultaneously by more than one pro cesses. The important distinctions between these three typ es of problems are with resp ect to exclusion and can b e summarised as follows: The dining problem disal lows neighb ours to eat simultaneously. The drinking problem al lows neighb ours to drink simultaneously,provided that they need to drink from di erent (pre-sp eci ed) b ottles. The mobile problem al lows neighbours the p ossibility to choose di erent frequencies to use, so that they make it p ossible to op erate simultaneously (i.e., situations in which adjacent base stations decide to pick the same frequency so that one of them has to wait for the other to release the frequency (thereby resulting in resp onse times that dep end on the duration that the frequencies are in use) can (and should) b e avoided). No deadlo ck (progress): among a set of non-failed pro cesses whichneedtouse the resources, some of them should b e able to do so after b ounded time. Starvation Freedom (fairness): as long as a pro cess do es not fail, the resp onse time for its requests is b ounded. The system is describ ed with an interference graph (or con ict graph ) G = (V; E), where no des represent pro cesses (philosophers, or, in the mobile setting cell agents) and edges represent resource con icts: an edge b etween two no des implies con ict in case these pro cesses try to access the resp ective resource(s) simultane- ously. If a pair of philosophers in the drinking and dining setting have (p otential) con icts in more than one resources, the interference graph has multiple edges b e- tween them, one for each resource (for reasons that will be obvious in the next section). The maximum degree in the graph is denoted by . In the drinking philosophers, each pro cess v has an asso ciated set of variables that sp eci es each i time the b ottles that it needs in order to drink. In the mobile philosophers, each cell agent v has an asso ciated number r , which denotes the number of pending i i requests at that cell eachtime. Each pro cess v (1 i n) is able to communicate (with messages or shared i memory) with its neighb ours in G. Usually no assumption is made on the sp eeds of the pro cesses or on the communication delays. The metrics of interest for the evaluation of solutions are (we are interested in the worst-case): Resp onse time: this is the delaybetween the time that a pro cess develops the need to use the resources and the time it is able to do so. It is measured in units of the upp er b ound of the time that a pro cess needs to use the resources (notice that in the mobile problem it is undesirable to relate the resp onse time to this measure), and/or, dep ending on the underlying communication medium, in units of the maximum message transmission delay in the network or in units of the duration of access to each shared variable. It should b e stressed that these b ounds are not assumed for the sake of the correctness of the solutions, nor for the sake of b eing used by the solutions, but only for the sake measuring the resp onse times.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us