
A Prop ortional Share Resource Allo cation Algorithm for Real-Time, Time-Shared Systems y z x Ion Stoica Hussein Ab del-Wahab Kevin Je ay Sanjoy K. Baruah { k Johannes E. Gehrke C. Greg Plaxton time quantum. In addition, the algorithm provides sup- Abstract port for dynamic operations, such as processes joining or leaving the competition, and for both fractional and We propose and analyze a proportional sharere- non-uniform time quanta. Asaproof of concept we sourceallocation algorithm for realizing real-time per- have implementeda prototype of a CPU scheduler un- formance in time-sharedoperating systems. Processes der FreeBSD. The experimental results shows that our are assigned a weight which determines a shareper- implementation performs within the theoretical bounds centage of the resource they aretoreceive. The re- and hence supports real-time execution in a general source is then al located in discrete-sized time quanta purpose operating system. in such a manner that each process makes progress at aprecise, uniform rate. Proportional shareallocation algorithms are of interest because 1 they provide a 1 Intro duction natural means of seamlessly integrating real- and non- real-time processing, 2 they areeasy to implement, Currently there is great interest in providing real- 3 they provide a simple and e ective means of pre- time execution and communication supp ort in general cisely control ling the real-time performanceofa pro- purp ose op erating systems. Indeed, applications such cess, and 4 they provide a natural mean of policing as desktop video conferencing, distributed shared vir- so that processes that use moreofa resource than they tual environments, and collab oration-supp ort systems request have no il l-e ect on wel l-behavedprocesses. require real-time computation and communication ser- We analyze our algorithm in the context of an ideal- vices to b e e ective. At present the dominant approach ized system in which a resource is assumedtobegranted to providing real-time supp ort in a general purp ose op- in arbitrarily smal l intervals of time and show that our erating system is to emb ed a p erio dic thread or pro cess algorithm guarantees that the di erencebetween the mo del into an existing op erating system kernel and service time that a process should receive in the ide- to use a real-time scheduling algorithm such as rate- alized system and the service time it actual ly receives monotonic scheduling to schedule the pro cesses. In in the real system is optimal ly bounded by the size of a such as system, ap erio dic and non-real-time activities are typically scheduled either as background pro cesses Supp orted by GAANN fellowship. Dept. of CS, Old Domin- ion Univ., Norfolk, VA 23529-0162 [email protected]. or through the use of a second-level scheduler that is y Supp orted by NSF grant CCR 95{9313857. Dept. executed quasi-p erio dically as a server pro cess by the of CS, Old Dominion Univ., Norfolk, VA 23529-0162 real-time scheduler. [email protected]. z In general, this framework can b e quite e ective Supp orted by grant from the IBM & Intel corps and NSF grant CCR 95{10156. Dpt. of CS, Univ. of North Carolina at at integrating real-time and non-real-time computing. Chap el Hill, Chap el Hill, NC 27599-3175, [email protected]. However, we observe that this approach has yet to b e x Supp orted by NSF under Research Initiation Award CCR{ embraced by the larger op erating systems community. 9596282. Dept. of CS, Univ. of Vermont, Burlignton, VT 05405, We b elieve that this is due in part to the rigid distinc- [email protected]. { tions made b etween real-time and non-real-time. Real- Dpt. of CS, Univ. of Wisconsin-Madison, Madison, WI 53706-1685 [email protected]. time activities are programmed di erently than non- k Supp orted by NSF grant CCR{9504145, and the Texas Ad- real-time ones e.g., as p erio dic tasks and real-time vanced Research Program under grant No. ARP{93{00365{461. activities receive hard and fast guarantees of resp onse Dpt. of CS, Univ. of Texas at Austin, Austin, TX 78712-1188 [email protected]. time if admission control is p erformed. Non-real-time 1 activities are subservient to real-time ones and receive di ers from traditional metho ds of integrating real- and no p erformance guarantees. While this state of a airs non-real-time pro cesses in that here all pro cesses, real- is entirely acceptable for many mixes of real-time and and non-real-time, are treated identically. In a prop or- non-real-time activities, for many it is not. Consider tional share system, real-time and non-real-time pro- the problem of supp orting real-time video conferencing cesses can b e implemented very much like traditional on the desktop. This is clearly a real-time application, pro cesses in a time-shared op erating system. Thus in however, it is not one for which hard and fast guaran- terms of the pro cess mo del, no \sp ecial" supp ort is re- tees of real-time p erformance are required. For exam- quired to supp ort real-time computing | there is only ple, it is easy to imagine situations in which one would one typ e of pro cess. Moreover, like manyscheduling like to explicitly degrade the p erformance of the video- algorithms used in time-shared systems, our algorithm conference e.g., degrade the rate at which the video allo cates resources in discrete units or quanta which is displayed so that other activities, such as search- makes it easier to implement than traditional real-time ing a large mail database for a particular message, can p olicies which are typically event-driven and require complete quicker. Ideally, a general purp ose op erating the ability to preempt pro cesses at p otentially arbi- system that supp orts real-time execution should not a trary p oints. In addition, b ecause resources are allo- priori restrict the basic tenor of p erformance guaran- cated in discrete quanta in a prop ortional share system, tees that any pro cess is capable of obtaining. one can b etter control and account for the overhead of the scheduling mechanism as well as tune the sys- To address this issue weinvestigate an alternate tem to trade-o ne-grain, real-time control for low approach to realizing real-time p erformance in time scheduling and system overhead. Finally, prop ortional shared op erating systems, namely the use of propor- share algorithms provide a natural means of uniformly tional shareresourceallocation algorithms for pro ces- degrading system p erformance in overload situations. sor scheduling. In a prop ortional share allo cation sys- In this pap er we present a prop ortional share tem, every pro cess in the system is guaranteed to make scheduling algorithm and demonstrate that it can b e progress at a well-de ned, uniform rate. Sp eci cally, used to ensure predictable real-time resp onse to all each pro cess is assigned a share of the pro cessor | a pro cesses. Section 2 presents our pro cess mo del and p ercentage of the pro cessor's total capacity. If a pro- formally intro duces the concepts of a share and the cess's share of the pro cessor is s then in anyinterval of requirement for predictable execution with resp ect to length t, the pro cess is guaranteed to receives t a share. Section 3 discusses related work in schedul- units of pro cessor time where 0 , for some con- ing. Section 4 presents a deadline-based, virtual-time stant . In a prop ortional share system, resource al- scheduling algorithm that is used to ensure pro cesses lo cation is exible and the share received by a pro cess receive their requested share of the pro cessor. Section can b e changed dynamically. In this manner a pro cess's 5intro duces a key technical problem to b e solved in real-time rate of progress can b e explicitly controlled. the course of applying our algorithm, namely that of Prop ortional share resource allo cation algorithms dealing with the dynamic creation and destruction of lie b etween traditional general purp ose and real-time pro cesses. Section 6 outlines the pro of of correctness scheduling algorithms. On the one hand, prop ortional of our algorithm and Section 7 presents some exp eri- share resource allo cation is a variant of the pureproces- mental results using our prop ortional share system in sor sharing scheduling discipline, in which during each the FreeBSD op erating system, and demonstrates how time unit each pro cess receives 1=n of the pro cessor's \traditional" real-time pro cesses such as p erio dic tasks capacity, where n is the numb er of active pro cesses. can b e realized in a prop ortional share system. Thus each pro cess app ears as it is making uniform progress on a virtual pro cessor that has 1=n of the ca- pacity of the physical pro cessor. On the other hand, traditional real-time scheduling disciplines for p erio dic 2 The Mo del tasks can b e viewed as coarse approximations of pro- p ortional share allo cation. For example, if a p erio dic We consider an op erating system to consist of a set task requires c units of pro cessor time every p time of pro cesses real-time and non-real-time that com- units, then a rate-monotonic scheduler guarantees that p ete for a time shared resource such as a CPU or a for all k 0, in eachinterval [kp; k +1p], the p erio dic communications channel.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-