QoS Aw are Resource Managemen t for Distributed Multimedia Applications Klara Nahrstedt Hao h ua Ch u and Sriniv as Nara y an Univ ersit y of Illinois at Urbana Champaign e mail klara h c h u srnara y a cs uiuc edu Abstract The abilit y of op erating system and net w ork infrastructure to pro vide end to end qualit y of service QoS guaran tees is a ma jor acceptance factor for v arious distributed m ultim edia applications due to the temp oral audio visual and sensory information in these applications Our constrain ts on the end to end QoS guaran tees are QoS should b e ac hiev ed on a general purp ose platform with a real time extension supp ort and QoS should b e application con trollable In order to ac hiev e the users acceptance requiremen ts and to satisfy our constrain ts on the m ultimedia systems w e need a QoS a w are resource managemen t whic h supp orts QoS ne gotiation admission and r eser vation mec hanisms in an in tegrated and accessible w a y In this pap er w e presen t a new r esour c e mo del and a time variant QoS management whic h are the ma jor comp onen ts of the QoS a w are resource managemen t The resource mo del incorp orates the r esour c e sche duler and a new comp onen t r esour c e br oker whic h pro vides negotiation admission and reserv ation capabilities for sharing resources suc h as CPU net w ork or memory corresp onding to requested QoS The resource brok ers are in termediary resource managers when com bined with the resources sc hedulers they pro vide a more predictable and ner gran ularit y con trol of resources to the application during the end to end m ultim edia comm unication than what is a v ailable in curren t general purp ose net w ork ed systems This pap er presen ts the QoS a w are resource managemen t mo del as a lo adable midd lewar e and discusses its v eri cation through implem en tation exp erimen ts and results I Intr oduction With the temp oral audio visual and sensory information in v arious distributed m ultimedia applications the pro vision of end to end quality of servic e QoS guar ante es in m ultimedia comm unication is a ma jor acceptance factor for these applications F or example m ultimedia applications suc h as video conferencing require b ounded end to end delay with a minimal jitter for meaningful audio and video comm unication Video on demand applications require minimal jitter and loss r ate to accomplish a go o d viewing qualit y of retriev ed mo vies Figure sho ws a distributed m ultim edia system en vironmen t where w e consider the end to end QoS issues The en vironmen t consists of general purp ose w orkstations and PCs equipp ed with m ultimedia devices suc h as video cameras microphones and sp eak ers Our assumption ab out the general purp ose op erating systems in these end p oin ts is that they supp ort r e al time extensions with mec hanisms suc h as priorit y sc heduling and memory pinning whic h are no w a v ailable in most of the UNIX platforms and Windo ws NT platforms The m ultimedia end p oin ts are connected via lo cal area net w orks suc h as A TM Async hronous T ransfer Mo de and F ast Ethernet whic h are curren tly widely a v ailable in academia and industry One imp ortan t issue ab out this general purp ose en vironmen t is that not all comp onen ts along the end to end path e g from video retriev al at the serv er w orkstation to video displa y at the clien t PC ha v e QoS supp ort F or example A TM net w ork pro vides a QoS supp ort bandwidth reserv ation but the end p oin ts w orkstations PCs do not ha v e an y sp eci c supp ort of QoS the R T extensions are necessary but not su cien t for QoS supp ort Our goal is to presen t a solution at the end p oin ts of the end to end m ultimedia comm unication path whic h con tributes to end to end guaran tees and allo ws the applications to access and con trol the end to end QoS parameters W e assume in this framew ork that the underlying net w ork e g A TM has some capabilit y of QoS pro vision suc h as bandwidth reserv ation and enforcemen t The w ork of all authors w as supp orted b y the NSF Career Aw ard under the agreemen t n um b er NSF CCR and the NSF CISE Infrastructure gran t under the agreemen t n um b er NSF CD A Multimedia Workstation Multimedia Workstation END-TO-END QoS System Architecture System Architecture GUARANTEES Application Level Application Level System Level System Level (Operating System (Operating System Communication Communication Protocols) Protocols) Network Level Network Level Gateway Hub ATM Network Fast Ethernet Multimedia PC Multimedia Workstation Fig The End to End Scenario of Distributed Multimedia Applications Our approac h is to pro vide a distributed and QoS a w are resource managemen t platform in form of a lo adable midd lewar e b et w een the applications and the actual general purp ose op erating system This platform called QualMan consists of a set of resource serv ers using a new resource mo del and a robust time v arian t QoS managemen t accessible to an y application The resource mo del incorp orates in addition to a resource sc heduler a new comp onen t r esour c e br oker whic h pro vides QoS negotiation admission and reserv ation capabilities for sharing resources suc h as CPU net w ork or memory according to QoS requiremen ts The resource brok ers are in termediary resource managers whic h pro vide together with resource sc hedulers a more predictable and ner gran ularit y con trol of resources to the applications during the end to end m ultimedia comm unication than is accessible in curren t general purp ose net w ork ed systems There are trade o s with our approac h of pro vision QoS guaran tees The adv an tage is that this QoS a w are resource managemen t platform is exible and lo adable at a general purp ose w orkstation or PC an y time the end p oin t is used for distributed m ultimedia applications The user starts the middlew are and uses the API Application Programm ing In terface whic h allo ws the user to access and con trol the QoS o ered b y the middlew are The disadv an tage is the lac k of v ery ne QoS gran ularit y whic h is particularly visible in the pro vision of timing constrain ts The reason is that in order to ac hiev e exibilit y and load abilit y for an y platform there are no c hanges in the k ernel hence the timing qualit y has lo w er resolution than if some of the algorithms w ere em b edded in the k ernel itself where w e w ould ha v e access to m uc h ner clo c k resolution Ho w ev er our ac hiev ed timing con trol is su cien t for m ultimedia applications and our results sho w that the middlew are supp ort pro vides m uc h b etter temp oral qualit y supp ort than an y application could ac hiev e running on top of a general purp ose en vironmen t without our middlew are The pap er is organized as follo ws Section presen ts the QoS and resource mo del as w ell as the placemen t of the QualMan arc hitecture in the o v erall m ultimedia comm unication arc hitecture This conceptual section will b e follo w ed b y the description of individual elemen ts of the QualMan arc hitecture Section describ es the CPU serv er Section presen ts the memory serv er and Section discusses the comm unication serv er Section presen ts the API to our QoS a w are resource managemen t Section presen ts implemen tat ion details and results of our QualMan platform Section discusses the related w ork and Section concludes the pap er I I QoS A w are Resour ce Mana gement Ar chitecture T o ac hiev e an end to end qualit y of service QoS along m ultimedia comm unication paths for distributed m ultimedia applications w e need to pro vide services and proto cols in the end p oin ts and net w orks whic h understand what qualit y of service is and ho w to map this qualit y in to the required resource allo cation F urthermore the underlying resource managemen t m ust ha v e services and proto cols whic h kno w ho w to negotiate admit reserv e and enforce requested resource allo cation according to requested QoS requiremen ts In this section w e will presen t our QoS and resource mo del whic h will pro vide the basis for the QoS a w are resource managemen t arc hitecture QualMan Based on those mo dels w e will giv e an o v erview of the QualMan arc hitecture and its placemen t in the end to end m ultim edia comm unication arc hitecture A QoS Mo del W e consider parameterization of the QoS b ecause it allo ws us to pro vide qualit y con trollable services W e will consider a deterministic sp e ci c ation of parameters where the QoS parameters will b e represen ted b y a real n um b er at a certain time t i e QoS T R where T is a time domain represen ting the lifetime of a service and R is the domain of real n um b ers The o v erall qualit y of service can b e sp eci ed either b y a single v alue b y a pair of v alues suc h as QoS and QoS or b y a triple of v alues suc h as b est v alue min max QoS mean v alue QoS and w orst v alue QoS W e will use the single value QoS or the p air value max mean min mean QoS QoS sp eci cation in our service and proto col design P articularly the pair v alue sp eci cation min max will allo w us to de ne range represen tation with ac c eptable quality r e gions QoS QoS t QoS and min max unac c eptable quality r e gions QoS t QoS as sho wn in Figure min Representation of QoS parameters 30fps Frame Rate q_max Acceptable Region 15 fps 1 fps q_min Unacceptable Region 80x40 360x240 640x480 Resolution Fig Range Represen tation of QoS P arameters The gure sho ws t w o qualit y parameters r esolution of a video frame X axis and fr ame r ate of a video stream Y axis The user application sp eci es that receiving video frame rate of fps or b elo w is unac c eptable ev en if the resolution of the frame is v ery go o d This sp eci cation determines the unacceptable region Similarly the user application migh t sp ecify that a video with a v ery small resolution b elo w x pixels is not useful and w e get another unacceptable region The region ab o v e fps and x pixels de nes the acceptable region The upp er righ t corner of the acceptable region is cut o whic h is determined b y the maxim al b oundaries of the bare computer hardw are arc hitecture In our example the hardw are arc hitecture cannot pro vide fps with the resolution x pixels There are man y p ossible QoS parameters suc h as visual trac king precision image distortion pac k et loss rate jitter of arriving frames sync hronization sk ew and others They can b e classi ed from di eren t asp ects One asp ect w e are considering is according to the la y ered m ultim edia comm unication arc hitecture whic h consists of four main la y ers users application system and net w ork la y ers NS b If w e assume this t yp e of end p oin t la y ering then w e can separate QoS in to p er c eptual QoS e g TV qualit y of video applic ation QoS e g frames p er second video system QoS e g ms p erio d cycle and network QoS e g Mbps bandwidth classes This classi cation allo ws eac h la y er to sp ecify its o wn qualit y parameters Ho w ev er this classi cation also requires translations at the b oundaries b et w een individual la y ers NS Some examples of application and system QoS parameters for MPEG compressed video streams are sho wn in T able I T ABLE I Applic ation and System QoS Par ameters Examples QoS t yp e Sp eci cation QoS parameter Sym b ol Sample size M A I P B Application Pro cessing Sample size I P B M M M A A A QoS requiremen ts Sample rate R A Num b er of frames p er GOP G Compression pattern G G G I P B Original size of GOP M G Pro cessing size of GOP M G Degradation factor D Comm unicati on End to end dela y E A Sync hronization Sk ew S y nc A Jitter J A System CPU Computation time C QoS Cycle time T CPU Utilization U Memory Memory request M em r eq P ac k et size M N Comm unicati on Requested pac k et rate R N Requested bandwidth B N End to end dela y E N In this pap er w e consider the system QoS p ar ameters suc h as the CPU QoS memory QoS and com m unication QoS parameters when discussing the QualMan the QoS a w are resource managemen t platform F urthermore our fo cus will b e on con trolling time variant QoS p ar ameters suc h as the jitter J of arriving A frames within a con tin uous media stream whic h implicitly in uences the synchr onization skew S y nc b e A t w een t w o or more con tin uous streams and end to end delay E b et w een t w o end p oin ts b ecause they ha v e A the most signi can t impact on the acceptance of distributed m ultimedia applications B R esour c e Mo del T o pro vide QoS eac h of the shared resources at the end p oin ts m ust b e mo deled autonomously enough to pro vide its o wn QoS con trol as w ell as b e able to adapt to p ossible o ccurrences of non deterministic system c hanges o v erruns on general purp ose systems W e extend the shared resource mo del with the brok erage functionalit y as sho wn in Figure The access to a shared resource is based on the client server mo del The general mo del of the client consists of t w o main parts the client br oker and the client pr o c ess The clien t brok er requests and negotiates with the resource brok er during the establishmen t or adapta tion phase of a m ultimedia comm unicati on connection The clien t brok er sp eci es desired QoS e g des QoS QoS QoS parameters The clien t pro cess utilizes negotiated resources during the mean min max pro cessing transmission phase The general mo del of the server pro vides equiv alen t services for con trolling the time v arian t QoS param eters jitter J sync hronization sk ew S y nc end to end dela y E and their adaptation to the clien ts requests Up on the brok erage request the clien t brok er and resource brok er negotiate renegotiate a QoS c ontr act b et w een the clien t and serv er The resource brok er p erforms admission services to mak e decisions ab out resource a v ailabilit y The r esour c e sche duler consist of t w o parts the resource con troller and the CLIENT Request for Request for Resource Work Resource Brokerage response request response request (QoS guaranteed, (event,QoS-spec) (event) (QoS contract) or QoS degradation) deal profile Timing Control Negotiation/ Renegotiation Event Control degradation notification Admission Resource Resource Controller Broker Resource Scheduler Resource Worker SERVER Shared Resource Fig R esour c e Mo del with c orr esp onding servic es The client server mo del for ac c ess to a r esour c e is extende d by the br oker age functionality which pr ovides QoS ne gotiation admission and r eservation c ap abilities resource w ork er The r esour c e c ontr ol ler is in v ok ed to con trol the r esour c e worker The con troller gets the QoS c ontr act whic h includes not only the parameters but also a feasible sc heduling p olicy satisfying timing and ev en t o w con trol of resource usage The resource brok er comm unicates the information to the resource con troller via a c ontr act pr o le Once the con troller has the initial information it tak es o v er and issues appropriate sc hedulable units to the resource w ork er according to the con trol p olicy F urthermore the resource con troller is resp onsible for QoS monitoring and p ossible adaptation if short QoS violations o ccur Larger QoS violations are comm unicated to the resource brok er whic h decides further pro cessing according to rules sp eci ed b y the clien t Timing and ev en t sc heduling con trol within the resource con troller pro vide con trol for the jitter and syn c hronization sk ew They are deriv ed from con tin uous media QoS requiremen ts from the clien t s program sp ecifying timing and other ev en ts during the lifetime of a clien t parsing of clien t s program during the pre pro cessing phase The monitoring and adaptation b et w een the resource con troller and w ork er create a closed feedbac k lo op whic h pro vides a basic functionalit y for the adaptation capabilit y C QualMan s A r chite ctur e and Plac ement in Multime dia Communic ation A r chite ctur e The ab o v e describ ed resource mo del has implications for the o v erall m ultimedia comm unicatio n arc hitecture W e can apply this mo del to eac h la y er of the end system application system and net w ork where individual brok ers and resource sc hedulers comm unicate with eac h other and create an in tegrated end to end solution see Figure The net w ork brok ers and net w ork proto cols pro vide the lo w est lev el of QoS pro vision They are resp onsible for the lo w lev el end to end net w ork qualit y guaran tees The resource brok ers and resource sc hedulers in the system lev el pro vide con trol of lo cal end p oin t resources suc h as CPU memory and disk as w ell as comm unication en try p oin ts to the net w orking en vironmen t The application brok er and sc heduler can handle application sp eci c qualit y con trol and resp onse to the results of the lo w er lev el resource allo cation In our further re nemen t of the end p oin t arc hitecture the system la y er will b e divided in to the QualMan midd lewar e our QoS a w are resource managemen t platform and the core OS kernel sho wn in Figure The middlew are can in terface with the application lev el through the applic ation system interfac e using either the applic ation QoS API or the system QoS API The middlew are itself consists of r esour c e servers CPU Sc hedulable units are pac k ets sc heduled in the net w ork pro cesses sc heduled b y the op erating system or disk blo c ks sc heduled b y the disk con troller Curren t design and implemen tation of QualMan deriv es the timing and ev en t sc heduling con trol from con tin uous media QoS requiremen ts only Application Application Scheduler (Application Broker Management) Application Level System QoS API Application QoS API - QoS Broker CPU Server Mem. Server Disk Server Comm. Server Broker Broker Broker Broker Scheduler Scheduler Scheduler Scheduler Middleware QualMan General-Purpose OS with RT Extensions System Level Network Network Scheduler (Connection Broker Management) Network Level Fig Multimedia Comm uni cation Arc hitecture with a Detailed View on System La y er Middlew are memory comm unication and disk In this pap er w e will discuss the resource serv ers design implemen tat ion and their results as w ell as on the system QoS API Before w e go in to the details of the individual resource serv ers of the QoS a w are resource managemen t it is imp ortan t to p oin t out the complexit y of the applic ation QoS API in terface b et w een the application and system la y er The in terface is implemen ted b y the QoS br oker and it incorp orates sev eral functionalities suc h as the tr anslation b et w een the application QoS and system QoS parameters ne gotiation proto cols b et w een the individual resource serv ers at the lo cal site and the remote site and r esour c e r eservation c o or dination to a v oid detect deadlo c ks The translation service allo ws eac h domain application or system to express the QoS parameters in its o wn language The negotiation proto col at this lev el needs to implemen t negotiation b et w een the QoS brok er and the resource brok ers as w ell as negotiation b et w een the distributed QoS brok ers to get the results of negotiation reserv ation of resources at the lo cal and remote sites The resource reserv ation co ordination needs to co ordinate the reserv ation of resources so that deadlo c k can b e a v oided apply Bank er s algorithm SG to request and reserv ation edges or it can b e detected and resolv ed Figure sho ws a p ossible deadlo c k scenario b et w een pro cesses P and P where P has reserv ed the disk resource and w aits for CPU reserv ation and P has allo cated CPU resource but w aits for disk resource whic h is con tracted to P The resource co ordination needs to rely on robust p olicies to satisfy some reserv ations in case of resource con ten tion and to hold resources for committed reserv ations Due to the limits on the length of this pap er w e will omit a detailed description of this in terfaces and refer the reader to our pap ers NS a NS KN In summary the QoS brok er pro vides an in tegrated and automated translation when accessing QoS a w are resource managemen t Our nal goal is to mak e the QoS brok er and the underlying QualMan CORBA c ompliant This functionalit y will allo w users to ac hiev e end to end QoS guaran tees using high lev el CORBA framew ork Gro W e will concen trate on CPU memory and comm unication serv ers b ecause these are curren tly the most signi can t comp onen ts in our system The disk is lo cal hence the CPU and memory con trol of accessing the les on the disk are su cien t to ac hiev e go o d access times to the disk Ho w ev er w e are w orking on a more elab orate disk serv er in case the disk resides remotely Brokerage Initiator Brokerage Initiatee P1 P3 requested reserved reserved reserved reserved reserved reserved CPU R. Mem. CPU Mem. Disk R. R. R. R. allocated requested allocated allocated allocated Net. allocated allocated P6 R. P4 P2 P5 Fig Resource Reserv ation and Allo cation Graph comprising a Deadlo c k Situation at the Brok er Initiatee Site I I I CPU Ser ver The CPU serv er pro vides a QoS con trol to the application o v er the shared CPU resource It di eren tiates during its pro cessing among waiting r e al time R T pr o c esses whic h w ait to b e sc heduled active R T pr o c esses whic h are curren tly sc heduled and non R T pr o c esses The w aiting and activ e R T pro cesses are sc heduled b y the CPU serv er and the non R T pro cesses are sc heduled b y the UNIX sc heduler The CPU serv er arc hitecture is mo deled closely according to the resource mo del describ ed in Section and it con tains three ma jor comp onen ts the CPU br oker disp atch table and disp atcher as sho wn in Figure Note that the dispatc her is equiv alen t to the resource sc heduler and its t w o parts con troller and w ork er as sho wn in Figure They are in tegrated in to a single en tit y in the curren t CPU serv er The reason is that the timing and ev en t con trol in the curren t CPU serv er is simple and consists of p erio dic time in terrupts at the b oundaries of constan t size time slots Eac h comp onen t is describ ed in details in the follo wing subsections A Br oker The CPU brok er receiv es requests from clien t R T pro cesses clien t s brok er It p erforms the admission P n C i con trol test where C is the execution time and T is the p erio d cycle time of the i th i i i T i clien t pro cess to determine whether the new clien t pro cess can b e sc heduled If it is sc hedulable the brok er will put the R T pro cess in to the w aiting R T pro cess p o ol b y c hanging it to the w aiting priorit y The brok er also computes a new sc hedule based on a desirable sc heduling algorithm the new sc hedule is written to the disp atch table The brok er is a ro ot daemon pro cess running at a normal dynamic priorit y It can b e started at the system b o ot time lik e an y other net w ork and le system daemons It will w ak e up when a new clien t request arriv es The brok er needs to b e a ro ot pro cess so that it can c hange pro cesses in to the R T xed priorit y The brok er pro cess do es not p erform the actual dispatc hing of the R T pro cesses instead it will fork a separate real time disp atcher pro cess The reason is that the admission and sc hedulabilit y test in the brok er ma y ha v e v ariable computation time hence it ma y a ect the timing of dispatc hing The admission and sc hedulabilit y test do not need to b e done in real time as a result the brok er runs at a non R T dynamic priorit y The separation of R T dispatc hing in the disp atcher pro cess and the sche dulability test p erformed in non R T in the br oker pro cess is Early v ersion of the CPU serv er w as published in IDMS pro ceedings CN Service User RT Client RT Client Process Broker CPU Server Service Provider accept/reject Dispatch Table (U,T) System Level Dispatcher CPU (Scheduler) Broker UNIX Fig The CPU serv er arc hitecture T ABLE I I Sample Disp atch T able R e al Time Slot Num b er Time Pro cess PID ms ms ms ms free an essen tial feature that allo ws b oth disp atcher and br oker to do on line computation without compromising the precision of R T pro cesses dispatc hing The clien t R T pro cesses m ust start their pro cessing at the non R T dynamic priorit y lev el The brok er and the dispatc her will c hange them in to the xed R T priorit y when they are accepted and dispatc hed This is an impro v emen t o v er the curren t UNIX en vironmen t b ecause our sc heme allo ws an y user to run pro cesses at the xed priorit y in a fair and secure manner B Disp atch T able The disp atch table is a shared memory ob ject where the br oker writes the computed sc hedule to and the disp atcher reads from in order to con trol and dispatc h R T pro cesses It is lo c k ed inside memory for e cien t reading and writing The dispatc h table con tains a rep eatable time fr ame of slots eac h slot corresp onds to a time slice of CPU time Eac h slot can b e assigned to a R T pro cess pid a group of co op erating R T pro cess pids or b e free whic h means yielding the con trol to the UNIX TS sc heduler to sc hedule an y non R T pro cesses Let us consider the example in T able I I The rep eatable time fr ame for all accepted R T clien t pro cesses is ms GC D T T and it con tains time slots of ms eac h The sample dispatc h table is a result of a rate monotonic RM sc hedule with the pro cess pid at p erio d ms exe cution time ms and co op erating pro cess pids at p erio d ms exe cution time ms There is free slot whic h means that ms out of ev ery ms of CPU is allo cated to the non R T pro cesses T ABLE I I I Priority Sche duling Structur e Priorit y Pro cess highest Dispatc her nd highest Running R T pro cess R T class Not used an y An y TS pro cesses TS class R T Class lo w est W aiting R T pro cesses The minim um n um b er of free slots is main tained b y the brok er to pro vide a fair share of CPU time to the non R T pro cesses In the T able I I ms out of ms of the CPU is guaran teed to the non R T pro cesses The site administrator can adjust the non R T p ercen tage v alue to b e what is considered fair F or example if the computer is used hea vily for R T applications the non R T p ercen tage can b e set to a small n um b er and vice v ersa C Disp atcher The disp atcher is a p erio dic serv er pro cess running at the highest p ossible xed priorit y The dispatc her pro cess is created b y the brok er and it is killed when there are no R T pro cesses to b e sc heduled in the system When there are only non R T pro cesses running the system has no pro cessing o v erhead asso ciated with the R T serv er The dispatc her con tains the shared memory dispatc h table and a p oin ter to the next dispatc hing slot A t the b eginning of the next dispatc h slot a p erio dic R T timer signals the dispatc her to sc hedule the next R T pro cess The length of time to switc h from the end of one slot to the start of the next one is called the disp atch latency The dispatc h latency is the sc heduling o v erhead whic h should b e k ept at a minimal v alue The dispatc hing is based on the follo wing priorit y sc heduling aMYO The dispatc her runs at the highest p ossible xed priorit y the w aiting R T pro cess w aits its sc heduling turn at the lo w est p ossible xed priorit y called the w aiting priorit y and the activ e R T pro cess runs at the nd highest xed priorit y called running priorit y The priorit y structure is sho wn in T able I I I The dispatc her w ak es up p erio dically to dispatc h the R T pro cesses b y mo ving them b et w een the w aiting and the running priorit y during the other time it just sleeps When the dispatc her sleeps the R T pro cess at the running priorit y executes When no R T pro cesses exist the non R T pro cesses with dynamic priorities execute using the fair time sharing sc heduler of UNIX This pro vides a simple mec hanism to do R T sc heduling in UNIX It also has man y desirable prop erties whic h other approac hes suc h as the pr o c essor c ap acity r eserves MT do not pro vide It requires no mo di cation to the existing UNIX POSIX k ernels The sc heduling pro cess can b e imple men ted as an user lev el application It has v ery lo w computation o v erhead It pro vides the exibilit y to implemen t an y sc heduling algorithms in the sc heduler e g rate monotonic earliest deadline or ev en the hierarc hical CPU algorithms W e will demonstrate the sc heduling p olicy of the dispatc her on the follo wing example Let us consider the dispatc h table in T able I I with time slot starting at ms The dispatc her is mo ving from slot to slot and the follo wing steps are tak en The p erio dic R T timer w ak es up the dispatc her pro cess and the pro cess is preempted con text switc h The dispatc her c hanges the pro cess to the w aiting priorit y and pro cesses to the running R T priorit y system calls to set priorit y The dispatc her puts itself to sleep and one of the pro cesses is sc heduled con text switc h The program co de segmen t that corresp onds to the ab o v e steps is executed rep eatedly and is lo c k ed in to memory to a v oid costly page faults The dispatc h latency can b e b ounded b y the time to do con text switc hes and the maxim um n um b er of pro cesses in an y adjacen t slots set priorit y system calls Unless the pro cesses are in their critical sections dispatc her will not allo w pro cess to o v errun the time allo cated for the slot in our case ms The execution time of the R T pro cesses execution time is protected from eac h other D R T clients Our clien t s system QoS request uses the simple R T Mac h s form of QoS sp eci cation p erio d T CPU C usage in p er c entage U where U F or example the sp eci cation T ms U means T that ms out of ev ery ms are reserv ed for this R T pro cess There are restrictions on the lo w er b ound of the p erio d size The hardw are restricts the p erio d size to b e greater than the soft w are clo c k resolution Smaller p erio d also leads to smaller time slice whic h results in higher n um b er of con text switc hings and ine cien t CPU utilization The users can compute the clien t s required p erio d T e g R frames p er second video pla y er has A R A a p erio d of T ms but the computation of the CPU usage p ercen tage is di cult U requires measuring of clien t pro cess execution time C during pre pro cessing phase or other estimations of C The UNIX command r usag e will not giv e an accurate system time b ecause some of the system threads execution times ma y not b e accoun ted as describ ed in the Pro cess Reserv es Mo del in the R T Mac h MT The user can get a go o d estimation b y a few trial and error runs of the clien t programs The clien t R T pro cess ma y blo c k while making a system call During this blo c king time the clien t is not executing But since the k ernel is serving the system call for the clien t the blo c king time should b e considered as a part of clien t s execution time as in the case of Pro cess Reserv es Mo del IV Memor y Ser ver The execution time of clien t s R T pro cess also dep ends on the state of memory con ten tion and the resulting n um b er of page faults W e designed a memory br oker where the R T pro cess can reserv e memory prior to their execution The memory serv er consists of the br oker and the memory sche duler Figure sho ws the arc hitecture of the memory serv er and its relation to the service user The memory serv er is a ro ot pro cess that can b e started Service User RT Client RT Client Process Broker Pinned Shared Memory malloc Memory Server Service Provider rsv_id/reject Memory Memory Mem_req System Level Scheduler Broker UNIX Fig The Memory Serv er Arc hitecture at the system b o ot up time It is initialized with a parameter called glob al r eserve whic h is the maxim um amoun t of pinned memory in b ytes that the serv er can allo cate to real time pro cesses The global reserv e should b e c hosen carefully so that it do es not starv e the non real time pro cesses and the k ernel The serv er w aits for requests from real time pro cesses The real time pro cess b egins with the reserv ation phase It con tacts the memory brok er to try to establish a memory r eservation with a sp eci ed amoun t of memory request in b ytes The reserv ation should b e an estimated amoun t of the pinned memory that the pro cess needs in order to satisfy its timing requiremen t It should include all its text data and shared segmen ts Once the memory brok er receiv es the request it P k p erforms an admission test M em M em M em to c hec k that the incoming request of r eq acc g lob r esv j j P k memory reserv ation M em added to the already accepted memory reserv es M em do es not exceed r eq acc j j the global reserve M em If the admission test succeeds the memory brok er returns a reserv ation g lob r esv iden ti er rsv id to the pro cess and it creates an en try in its table rsv id M em The pro cess should acc then lo c k its text segmen t using the reserv ation rsv id During or prior to the execution phase the R T clien t pro cess can send the memory sc heduler a request rsv id size to acquire the pinned memory data allo cation e g malloc Once the request is receiv ed b y the memory sc heduler it c hec ks whether there is enough reserv ation M em for this pro cess to satisfy its acc request If so it decreases size b ytes of memory from the reserv ation rsv id The serv er then allo cates the pinned memory in the form of shar e d memory to the pro cess The serv er creates a shared memory segmen t of size using shmid shmget key size and lo c ks it using shmctl shmid SHM LOCK The shared memory k ey is then passed to the pro cess whic h attac hes the shared memory segmen t in to its address space When the pro cess w an ts to free its pinned memory it detac hes the shared memory segmen t and sends a request con taining the shared memory k ey to the memory serv er Then the serv er destro ys the share memory segmen t and increases the corresp onding memory reserv e A R elation b etwe en CPU and Memory R eserves The relationship b et w een the memory reserv es and pro cesses can b e man y to man y A pro cess can establish m ultiple reserv es to protect memory usage among v arious parts of the same program F or example a dis tributed video pla ybac k application can assign separate reserv es for its displa y deco ded and net w ork bu ers It will restrict the gro wth of some bu ers that use pinned memory Multiple pro cesses can also share the same reserv e F or example a distributed video pla ybac k application ma y require services from the net w ork deco der or displa y pro cesses or mo dules driv ers whic h can c harge their memory usage to the application s reserv e The underlying shared memory implemen tatio n also helps to eliminate the cop ying o v erhead when v arious pro cesses need to pass data around Consider a net w ork mo dule that assem bles pac k ets in to frames and passes the frames to the deco der pro cess The net w ork mo dule and the deco der pro cess can establish a join t memory reserv ation and create a common shared memory region The net w ork mo dule c harges the reserv ation for ev ery new frame it uses the deco der pro cess gets the frames through the shared memory region without cop ying W e are curren tly dev eloping a real time net w ork transp ort proto col in whic h its bu ering mec hanism is based on this memory reserv ation mo del B Smal l Data A l lo c ation F or small data MEM alloc e g b ytes it is to o exp ensiv e to create a separate shared memory segmen t There is an adjustable parameter called MIN ALLOC SEGMENT whic h is the minim um size of the shared memory segmen t size The default MIN ALLOC SEGMENT is the page size whic h is K on the SUN w orkstation All MEM alloc s whic h are less than K are group ed together in to a shared memory segmen t of size K F or example the rst b ytes of a MEM allo c request will create b e c harged a K shared memory segmen t with the b ytes allo cated to this request The subsequen t small requests will b e allo cated within the same shared memory segmen t T o reduce fragmen tation within the shared memory segmen t w e use a resource map memory allo cator with the First Fit algorithm In the Solaris Op erating System there are sev eral system tunable parameters that place limitatio ns on the v arious asp ects of the shared memory segmen ts as sho wn in T able IV shmsys shminfo shmmax is the maxim um size of a shm segmen t shmsys shminfo shmmni is the maxim um n um b er of shm iden ti ers shmsys shminfo shmseg is the maxim um n um b er of shm segmen ts p er pro cess Their default v alues are T ABLE IV Shar e d memory p ar ameters in the system c on gur ation le Parameters Default Value Suggested Value shmsys shminfo shmmax MB MB shmsys shminfo shmmni shmsys shminfo shmseg to o small The system administrator can increase these parameters to the suggested v alues in the table b y mo difying the etc system con guration le C Limitations There are sev eral limitati ons in our shared memory implemen tati on of the memory reserv ation The rst one is that the memory reserv ation co v ers only the text and data segmen ts but not the stac k segmen t W e ha v e found that it is di cult to monitor and manage the stac k segmen t without mo di cations inside the k ernel In a t ypical program its stac k segmen t is usually m uc h smaller than its text or data segmen ts there is some probabilit y that the stac k segmen t will not sw ap out as often as the data and or text segmen ts w ould sw ap out The second limitatio n is with the data allo cation in the link ed shared library Users can not mo dify the data allo cations in the link ed libraries e g X library to call our memory reserv ation routines These data segmen ts in these libraries are not pinned and accoun ted for in the reserv ation W e ha v e c hosen the shared memory implemen tat ion b ecause it can b e done at the user lev el and without mo di cations in the k ernel These limitati ons can b e o v ercome with another c hoice of implemen tati on whic h in v olv es mo di cations to the virtual memory system Ho w ev er this w ould mean a defeat of the desired loadable capabilit y whic h our curren t middlew are has V Communica tion Ser ver Similar to the CPU and memory serv ers the c ommunic ation server consists of t w o comp onen ts the c om munic ation br oker whic h admits and negotiates the comm unication QoS parameters and the end to end multime dia e cient tr ansp ort pr oto c ol METP whic h enforces the comm unicati on QoS at the end p oin ts and propagates the A TM QoS parameters guaran tees to the higher comm unication la y ers Figure sho ws the arc hitecture A Communic ation Br oker The comm unication brok er is a managemen t daemon whic h in conjunction with the transp ort proto col pro vides QoS guaran tees required b y the distributed m ultimedia application The brok er p erforms the follo wing tasks Servic e R e gistr ation The m ultimedia application R T clien t is required to register with the comm uni cation brok er and to sp ecify a name iden ti cation the t yp e of data b eing transmitted and the qualit y parameters requested from the connection s The parameters whic h the brok er needs for further decision making are the p e ak me an and burst b andwidth B B B size of the application proto col data unit APDU M end to end delay E peak mean bur st A A sp e ci c ation of data ow either simplex or duplex r eliability enforcemen t either total or partial and time out t whic h sp eci es ho w long to w ait for a PDU or for an ac kno wledgmen t in reliabilit y mec hanisms out The comm unicati on brok er tabulates this information and sets up a message c hannel for future com m unications with the R T clien t application This c hannel is used to inform the R T clien t of incoming connections as w ell as to send messages ab out upgrading or degrading the requested comm unicati on QoS A dmission Contr ol and Ne gotiation Once the application sp eci es its comm unication QoS parameters at the time of connection setup the brok er p erforms c hec ks to v erify that the parameters can b e guaran teed Service User RT Client RT Client Process Broker Communication Server Service Provider Shared Table acc./part_acc./rej. METP (B, M_A, E_A,...) Multimedia Comm. System Level Efficient Transport Broker Protocol (Scheduler) UNIX/ATM Fig The Comm uni cation Serv er Arc hitecture The admission con trol mec hanism using an admission condition decides if the requested QoS can b e met or suggests a lo w er ac hiev able v alue The comm unicati on brok er p erforms admission on bandwidth a v ailabilit y and end to end dela y P k F or comm unication b andwidth availability the admission condition is B B B where acc r eq H I i i B is the accepted bandwidth for the i th connection and B is the requested bandwidth of the new acc r eq i connection In our curren t implemen tati on the admission test uses the mean bandwidth B v alue mean corresp onding to an optimistic resource allo cation The end to end delay dep ends on a n um b er of factors suc h as the application PDU size load on the net w ork the loads on the end hosts and the bandwidth reserv ed for the connection Admission con trol for end to end dela y is p erformed using a pr o ling scheme A pro le of the end to end dela ys for v arious APDU size is created measured o line and used as the seed T able V sho ws an example of a pro le of end to end dela ys for v arious APDU sizes T ABLE V End to end delay ms APDU size KB EED in ms The bandwidth actually represen ts the bandwidth sp eci cation calculated from the application stream c haracteristics plus the header o v erheads coming from the transp ort proto col and from the AAL A TM la y ers The reason is that the B b ound is the H I bandwidth ac hiev ed at the A TM la y er The ac hiev ed bandwidth in the user space is p ossible to determine but it dep ends on the actual CPU load and CPU bandwidth a v ailabil it y for comm unication activities in the end p oin t This pro le is strongly platform dep enden t T able V sho ws measuremen ts using our A TM SP AR C platform and w e use the table as an example to sho w the pro ling concept The APDU end to end delay E is de ned as the time required for one APDU to completely reac h the A destination from the source Due to the missing information ab out the pac k et service time in in termediate comp onen ts it is di cult to get a precise E Hence w e estimate the E as follo ws Let t b e the time A A at whic h the source starts sending the T ransp ort PDU TPDU s b elonging to the considered APDU Let t b e the time at whic h an ac kno wledgmen t for the APDU is receiv ed b y the source The time in terv al t t is the sum of the time required for the en tire APDU to b e sen t across APDU EED and the time E required for an ac kno wledgmen t PDU to b e sen t from the destination to the source TPDU EED N The E can b e estimated using the standard round trip time measuremen t algorithm whic h in v olv es N sending one TPDU across receiving an ac kno wledgmen t for it and dividing the resulting v alue b y t w o Hence the APDU EED is giv en b y E t t E where E represen ts the end to end dela y of A N N the group ac kno wledgmen t When the user supplies the APDU size and an end to end dela y E requiremen t the APDU size is A matc hed with the closest larger size in the table V and the end to end dela y v alue sp eci ed is c hec k ed against the v alue in the pro le If the v alue sp eci ed is less than the v alue in the table then the net w ork admission con trol is passed F or the CPU b andwidth and memory availability in METP the comm unication brok er con tacts the CPU and memory serv er The comm unication brok er needs to ha v e an information ab out the pro cessing times C and size M corresp onding to the pro cessing of APDUs in the transp ort tasks e g fragmen tation of A APDUs to TPDUs header creation mo v emen t of PDUs in METP The p erio d T of the transp ort tasks is deriv ed from the frame rate R After receiving an APDU METP fragmen ts the APDU in to TPDUs A and sends them in a burst together ev ery T A R A Conne ction Setup Connection setup includes negotiation b et w een the comm unication brok ers of remote en tities once these negotiations are done the connection is established using the A TM API for setup of V Cs and their QoS parameters The connection setup request to the comm unication serv er is initiated from the R T clien t application The connection setup proto col is sho wn in Figure First the initiator R T clien t sends the r e gister r e quest along with the QoS parameters Second the initiator brok er p erforms admission con trol on the sp eci ed QoS If the admission test is successful the initiator brok er will send an op en c onne ction request to the initiatee brok er whic h also p erforms an admission test If this admission test is successful the initiatee R T clien t will accept the connection setup and the proto col resp onds with an ac c epte d al lo c ation message Up on receiving the accept message the initiator side completes the connection setup Machine A Machine B RT client Broker Broker RT Client (Initiatee) (Initiator) RegisterService OpenConnection OpenConnection AcceptedRequest AcceptedRequest ListenForConnection Fig Connection Setup Proto col W e also pro vide a p ossibilit y of p artial ac c eptanc e where if the initiatee do es not ha v e a v ailable requested resources for end to end dela y pro vision it sends bac k a message with p artial ly ful l le d con ten t only bandwidth guaran tees are giv en The initiator of the QoS connection decides if this is su cien t If this is As w e describ e later our ac kno wledgmen t sc heme uses group ac kno wledgmen t whic h is sen t after all TPDUs b elonging to the considered APDU are receiv ed the case ac c epte d al lo c ation message is sen t bac k to the initiatee and a connection op ens at the initiatee side with degraded qualit y The third p ossibilit y is to send out a r eje ct r e quest message when bandwidth and EED tests are b oth violated in whic h case the initiator m ust w ait with op ening the connection Monitoring and A daptation Monitoring and adaptation are needed in order to allo w for upgrades and degrades in the qualit y of connections A monitoring thread examines the bandwidth resources a v ailable whenev er a connection is closed and c hec ks if the freed resources can b e used to satisfy an y partially satis ed resource request If so the monitoring thread send a message to the R T clien t o v er the register c hannel informing it ab out the p ossible upgrade in resource allo cation B Multime dia E cient T r ansp ort Pr oto c ol The comm unicati on serv er includes a thin la y er of transp ort service supp ort F or supp ort of jitter and other temp oral QoS requiremen ts this m ultimedia e cien t transp ort proto col requests an appropriate amoun t of CPU bandwidth and memory from the CPU and memory serv ers so that its transp ort tasks can mo v e and pro cess TPDUs in a predictable fashion F urthermore this proto col expands the nativ e A TM mo de AAL API to pro vide e cien t reliabilit y capabilit y whic h is not pro vided b y the AAL la y er and enforces optimal mo v emen t of data through the transp ort extension The arc hitecture of the transp ort la y er is depicted in Figure The proto col is describ ed in t w o sections Application Application Timestamp Recv List Send Queue Data Recv Function Retry Recv Function Function ATM Network Fig Comp onen ts of the T ransp ort La y er one explaining the sending side and the other the r e c eiving side B Sending Proto col The application data is segmen ted in to TPDUs The size of the TPDU is con gurable Eac h TPDU has a header section and a data section In traditional transp ort la y ers memory for the TPDUs is allo cated afresh in k ernel space and the application data is copied in to the newly created TPDUs whic h con tain additional space for headers In our transp ort la y er a simple but clev er sc heme is used to ac hiev e a zero cop y send ab o v e the device driv er lev el Since memory for the data has already b een allo cated b y the application the same memory can b e used to store the headers to o The b asic ide a is to lo c ate the b e ginning of e ach TPDU in the applic ation chunk and overwrite the pr e c e ding bytes with the he ader of the TPDU Those few b ytes are bac k ed up b eforehand and can b e accessed if the previous TPDU needs to b e retransmitted This sc heme a v oids a cop y of the en tire application c h unk The size of the header is usually small compared to the size of the data in the TPDU T o giv e an example the maxim um amoun t of data that can b e sen t in one TPDU is kilob ytes and the size of the header is a xed b ytes The sending proto col w orks as follo ws The sending function lo cates the b eginning of eac h TPDU and o v erwrites the preceding b ytes with the header of the TPDU The TPDU is transmitted Information ab out eac h transmitted TPDU is stored in a list This list is used to retriev e information if an y TPDU needs to b e retransmitted The en try stored in the list includes the lo cation of the TPDU within the APDU the timestamp corresp onding to the sending time of the TPDU the size of the TPDU statistical information suc h as the n um b er of retransmissions After all PDUs in the APDU ha v e b een transmitted once the sending side w aits for a resp onse from the receiv er The resp onse could b e one of the follo wing a A gr oup p ositive acknow le dgment GP A CK A GP A CK is receiv ed recv function if all TPDUs sen t ha v e reac hed the receiv er successfully When a GP A CK is receiv ed all TPDUs in the range of sequence n um b ers sp eci ed in the GP A CK are remo v ed from the list of unac kno wledged PDUs b A gr oup ne gative acknow le dgment GNA CK A GNA CK is receiv ed when one or more of a sequence of TPDUs do es not reac h the receiv er When a GNA CK is receiv ed all TPDUs in the range of sequence n um b ers sp eci ed in the GNA CK are retransmitted retry function The time of retransmission and the n um b er of retries are up dated When a timeout t o ccurs the sending side c hec ks to see if all TPDUs in the APDU ha v e b een out ac kno wledged If there are unac kno wledged TPDUs there are t w o p ossible scenarios The p essimistic scenario is that all unac kno wledged TPDUs w ere lost during the transmission and need to b e retransmitted The optimistic scenario is that some or all of the TPDUs reac hed the receiv er but the ac kno wledgmen t sen t b y the receiv er w as lost In order to sa v e time and bandwidth the transp ort la y er rst assumes the optimistic scenario and re transmits only the rst unac kno wledged TPDU If the TPDU has reac hed the receiv er along with some or all of the other TPDUs the receiv er sends out a GP A CK A GP A CK con tains a pair of sequence n um b ers de ning a range of TPDUs whic h ha v e reac hed the receiv er On receiving a GP A CK all TPDUs in the range sp eci ed b y the GP A CK are remo v ed from the list of unac kno wledged TPDUs Ho w ev er if there is no resp onse from the receiv er to the rst retransmission the p essimistic scenario is assumed and all unac kno wledged timed out PDUs are retransmitted This tec hnique of optimized retransmission impro v ed the p erformance of the transp ort la y er The idea is similar to the SMAR T tec hnique KM The di erence is that in our sc heme there is no concept of a cum ulativ e ac kno wledgmen t as in SMAR T Also in SMAR T retransmission the selectiv e retransmission is based only on the NA CKs sen t b y the receiv er and there is no sc heme to p erform optimized retransmissions when timeouts o ccur Our sc heme is more elab orate in the w a y it p erforms timeout triggered retransmissions B Receiving Proto col The receiving side tak es care of receiving the TPDUs and reassem bles them in to c h unks required b y the R T clien t The data is visualized as a stream of TPDUs So the c h unks sen t out b y the sending side can di er in size from the c h unks read b y the receiving side Supp ort for suc h a feature requires information ab out application c h unks to b e included in eac h TPDU The receiving proto col w orks as follo ws A receiving function receiv es TPDUs and inserts them in to the correct p osition in a receiving queue The receiving queue is ordered in ascending order of sequence n um b ers Ev ery TPDU also con tains information ab out the application c h unk it b elongs to This information is extracted and stored in a separate list If an y data PDUs are missing in the sequence the receiving function sends a GNA CK to the sender The GNA CK carries t w o sequence n um b ers sp ecifying the range of sequence n um b ers in whic h PDUs are missing If an y duplicate PDUs are receiv ed a GP A CK is sen t to the sender The GP A CK con tains the lo w est and highest ac kno wledged TPDU sequence n um b ers in the APDU with no unac kno wledged TPDUs b et w een them This serv es as an ac kno wledgmen t for either part or the whole of the APDU dep ending on the situation The receiving function determines the TPDUs to b e retriev ed using the application c h unk information The selected TPDUs are remo v ed from the receiv e queue and copied to their correct p ositions in the application memory If the transp ort la y er is in the real time mo de and all TPDUs corresp onding to one application c h unk ha v e not b een receiv ed b efore it is time to receiv e the next c h unk the receiv e function returns with whatev er data has b een receiv ed so far If an y TPDU b elonging to the curren t application c h unk arriv es later it is discarded B Con gurabilit y The transp ort la y er has some imp ortan t dynamically con gurable features R eliability The transp ort la y er can op erate in t w o mo des a total ly r eliable mo de and a p artial ly r eliable mo de In the totally reliable mo de there are no timing guaran tees The user is allo w ed to sp ecify an exp ected QoS An e ort is made to ful ll the timing requiremen ts but priorit y is giv en to the reliabilit y of deliv ery so timing is compromised to ensure that ev ery b yte of data sen t b y the sender reac hes the receiv er In the partially reliable mo de also termed the real time mo de the timing guaran tees tak e precedence o v er reliabilit y of deliv ery The maxim um time for send and r e c eive op erations can b e sp eci ed The transp ort la y er sends as m uc h data as p ossible within the time sp eci ed This mo de is particularly useful in frame based video transmission If the user requires a frame rate to b e sustained but is willing to compromise on the qualit y of the video then the real time mo de ma y b e used The do wnside is that an in telligen t video compression sc heme with the abilit y to deal with missing data is needed Th us a real life scenario using the dynamic con gurabilit y can b e the follo wing a video application can b e started with the transp ort la y er in the reliable mo de If the user is not satis ed with the sp eed of data deliv ery the transp ort la y er can b e con gured to execute in the real time mo de without in terrupting the application Detachable descriptors Curren t transp ort la y ers are tigh tly coupled to the system le descriptors F or instance once a TCP so c k et is created it is not p ossible to c hange the data link la y er c haracteristics asso ciated with the so c k et without closing it Sp eci cally in the case of TCP o v er A TM there is no mec hanism to c hange the qualit y of the A TM connection asso ciated with the so c k et without closing and reop ening the so c k et Our transp ort la y er pro vides con guration metho ds to dynamically attac h connection descriptors Th us new A TM connections can b e transparen tly created and attac hed to the transp ort la y er while the applications con tin ue to send and receiv e data without in terruptions F urthermore the descriptor used for sending data can b e di eren t from the one used for receiving data This allo ws connections with di eren t QoS at the data link lev el to b e coupled with a single transp ort la y er TPDU size The size of the TPDU can b e con gured dynamically This feature is also pro vided b y TCP The limitati on in the curren t implemen tatio n is that the sender and receiv er should b oth issue the con guration command to c hange the size of the TPDU to the same v alue This limitatio n can b e easily o v ercome b y adding more con trol capabilit y to the transp ort la y er The size of the TPDU cannot exceed the size of the A TM MTU In order to ha v e larger TPDU sizes the size of the A TM MTU m ust rst b e increased Ho w ev er this is observ ed to degrade the p erformance of the A TM card B Real time F eatures The transp ort proto col p ossesses some real time features designed with m ultimedia transmission in mind These features can b e activ ated b y con guring the transp ort la y er to run in its real time mo de The features include Sender side Time d out data disc ar d If a send op eration tak es longer than its allotted time the sending side discards future data till it catc hes up with the timer This is done in an ticipation of a discard on the receiv e side Since data arriving late is an yw a y discarded b y the receiving side the sending side sa v es bandwidth b y a v oiding transmission of the late data and instead transmits future data b efore its time in an attempt to p erform a time sa ving op eration Dynamic timer adjustment Both the send and the r e c eive op erations use timers in order to pro vide real time guaran tees to the application These timers are used for retransmission in the case of the send op eration and acceptance or rejection of data in the r e c eive op eration As men tioned previously the actual dela y v alues dep end on the load on the net w ork Hence it is necessary to dynamically tune the timeout v alues in order to ac hiev e b etter throughput The transp ort la y er up dates it timeout v alues using a simple a v eraging sc heme The timeout is set to the a v erage of the curren t timeout v alue and the curren t application TPDU round trip time It is found that this sc heme of timer adjustmen t reduces retransmissions and increases throughput without signi can t degradation of the QoS parameters VI Applica tion Pr ogram Interf a ce API The CPU memory service pro vides a C programming in terface to the user pro cesses The metho ds are encapsulated in to C classes called Cpu and Mem as sho wn in T able VI The in ter pro cess comm unicatio n IPC b et w een the resource brok er sc heduler and the user pro cesses are hidden inside the metho ds This API includes metho ds for r eservation and al lo c ation of CPU and memory resources through the CPU and Memory QoS parameters management of CPU and memory resources and de al lo c ation of the allo cated resources T ABLE VI CPU and Memory Server Applic ation Pr o gr am Interfac e int Cpu reserve int pid double Reserv e CPU time corresp onding to util o v er the time util int period period for the pro cess pid int Cpu get freereserve int pid Return the curren t amoun t of free CPU a v ailable for CPU reserv e void Cpu free reserve int pid F ree the CPU reserv ation of the pro cess pid int Mem reserve int size Establish a memory reserv ation of the giv en size If success ful it will return the rsv id otherwise it returns MEM FAIL void Mem free reserve int rsv id F ree all the memory blo c ks asso ciated with memory reserv a tion rsv id int Mem txt lock int rsv id Pin the text segmen t of this pro cess in to memory The mem ory is c harged to the reserv ation rsv id for the amoun t of the program binaries size If successful return MEM SUCCESS otherwise return MEM FAIL void Mem alloc int rsv id int Return the p oin ter to a pinned memory blo c k for the giv en size size The allo cated memory is c harged to the reserv ation rsv id for the amoun t size Return NULL if there is not enough reserv e This call is equiv alen t to mallo c with one extra rsv id argumen t void Mem free void ptr F ree the memory blo c k p oin ted to b y the p oin ter ptr The reserv ation is increased b y the amoun t of the freed size int Mem get reserve int rsv id Return the curren t amoun t of a v ailable memory under the reserv ation rsv id The comm unication service also pro vides a C programming in terface to the user pro cesses Programs dev elop ed using the framew ork will need to comm unicate with the comm unication brok er for servic e r e gis tr ation c onne ction establishment and c onne ction te ar down The serv er API is encapsulated in to the class ServerConnection and the clien t API is encapsulated in to the class ClientConnection as sho wn in T able VI I A serv er connection rst registers itself with its lo cal net w ork brok er via the ServerConnection open T ABLE VI I Communic ation Server Applic ation Pr o gr am Interfac e void ServerConnection open int P erform initialization of a connection serverId to the com serverId m unication brok er int ServerConnection close Close the connection to the brok er b y sending CloseConnection message to brok er int ServerConnection accept Qual ity Listen for and accept a connection with qos parameters qos void ServerConnection sendData c har Send data in bu er buf of amoun t size to the remote buf int size mac hine int ClientConnection open char Setup a connection serverId of qualit y qos b et w een the remoteHost int serverId Quality initiator clien t the lo cal brok er and the remote mac hine qos remoteHost int ClientConnection recvData ch ar Receiv e data of amoun t size in bu er buf from the remote buf int size mac hine Quality ClientConnection getQoS Get the actual qualit y guaran teed int ClientConnection close Close the connection metho d whic h is sp eci ed a unique serverId A serv er connection then listens for and accepts connections via the ServerConnection accept metho d from remote clien ts whic h use the unique serv erId to lo cate the serv er Once the connection has b een established the ServerConnection sendDat a metho d is used to send data A clien t connection rst establishes a connection with the serv er via the ClientConnection open metho d whic h indirectly calls the lo cal comm unication brok er to p erform admission con trol and to set up a connection After lo cal and remote admission con trol ha v e b oth b een p erformed successfully data reception can b e p erformed using the ClientConnection recvData metho ds T o illustrate the ab o v e describ ed individual APIs in an in tegrated fashion w e pro vide a simple sample pr o gr am that sho ws ho w to use our CPU memory and comm unication serv ers The sample program presen ts a piece of V OD Video on Demand clien t co de from the V OD application In this co de the memory serv er establishes a memory reserv ation via the mem reserve routine It pins its text segmen t using the displa y reserv ation through mem txt lock It allo cates new displa y and deco der frames using the mem alloc routine The displa y frame can b e freed using the mem free routine to restore the memory reserv ation A t the end reserv ations are destro y ed using mem free reserve The CPU serv er establishes the reserv ation of the CPU bandwidth using cpu reserve A t the end the CPU reserv ation is destro y ed using cpu free reserve The comm unicati on serv er uses the clien t s connection setup routine comm open to initiate and setup a connection at the V OD clien t side Once the connection is established successfully the APDUs are receiv ed using comm recvData within the streaming lo op INITIATOR SIDE client which displays video frames include mem api h include cpu api h include comm api h void main char disp buf char dec buf CPU reservation Cpu cpu if cpu reserve CPU FAIL printf CPU reserve failed n exit Memory reservation Mem mem int mrsv create memory reservation if mrsv mem reserve MEM FAIL printf mem reserve failed n cpu free reserve exit mem txt lock mrsv pin the text segment char disp buf char mem alloc mrsv display buf alloc char dec buf char mem alloc mrsv decoder buf alloc Communication reservation ClientConnection comm Quality qos APDU size endToEndDelay ms sample rate APDUs s if comm open london cs uiuc e du serverId qos COMM FAIL printf communication reserve failed n cpu free reserve mem free reserve mrsv exit for comm recvData dec buf vsize decode dec buf disp buf vsize display disp buf cpu free reserve mem free reserve mrsv comm close VI I Implement a tion A Sp e ci c Issues ab out CPU Server W e ha v e implemen ted our serv er arc hitecture on a single pro cessor Sun Sparc running Solaris Op er ating System OS The Solaris OS has a default global priorit y range the least imp ortance There are priorit y classes R T class System class and TS class The R T class con tains xed priorit y range whic h maps to the global priorit y range The dispatc her s priorit y is the running priorit y is and the w aiting priorit y is The w aiting priorit y needs to b e mapp ed to the lo w est global priorit y and it m ust b e lo w er than an y TS priorities This can b e done b y compiling a new R T priorit y table RT DPTBL inside the k ernel The c hanging priorit y is done b y using the priocntl system call Its a v erage cost is measured as s The a v erage dispatc h latency con text switc h priocntl is measured as ms The in terv al timer is implemen ted using setitimer with the maxim um usable resolution of ms and it is the smallest time slot size The o v erhead comes up to b e whic h is acceptable The cpu brok er implemen ts a rate monotonic RM sc heduling algorithm to generate the dispatc h table B Sp e ci c Issues ab out Memory Server In mo dern computer arc hitecture the memory hierarc h y consists of lev els in decreasing order of access time Cac he st lev el and nd lev el Ph ysical Memory and Disk The p enalt y for a cac he miss nd lev el is in the range of clo c k cycles s of ns PH As long as the cac he miss ratio falls in to a consisten t range throughout a pro cess execution it has little impact on the on time p erformance of the soft real time pro cesses Therefore w e do not pro vide an y cac he managemen t or guaran tee Ho w ev er the p enalt y for a virtual memory ph ysical memory miss is in the range of clo c k cycles s of ms PH F or a soft w are video deco der enco der running at frames p er second or ms p er frame a few virtual memory misses migh t lead to the loss of sev eral frames text text execve'd program data data text shared libaries data linker stack limit stack stack stack Fig Address Space La y out in the SUN Solaris Op erating System In UNIX eac h pro cess has its o wn virtual address space Within its virtual address space a pro cess memory is divided in to sev eral segmen ts text stac k data shared libraries shared memory or memory map The text segmen t con tains the program binaries The stac k segmen t con tains the execution stac k The data segmen t con tains the pro cess data e g mallo c The address space la y out in the SUN Solaris Op erating System is sho wn in Figure Mic Note that in C memory allo cation for a new class ob ject is done implicit through the constructor call e g new CLASSNAME In suc h cases the memory allo cation do es not go through our Mem alloc API call and hence they are not pinned C Sp e ci c Issues ab out Communic ation Server W e ha v e implemen ted our comm unicatio n serv er in an in tegrated fashion with the underlying A TM net w ork CPU and memory serv er The comm unication serv er runs on SP AR C mac hines The SP AR C mac hine has b een installed a F ORE SBA E A TM Adapter card whic h is connected to a p ort on a F ORE ASX switc h The switc h is con gured with p orts and with Mbps capacit y on eac h p ort The bandwidth o v erhead of our transp ort subsystem is measured to b e around whic h includes the A TM cell header o v erhead Bytes AAL MTU header o v erhead and our METP PDU header This means that if the application requests a connection with for example Mbps user lev el bandwidth then our comm unicati on brok er will establish reserv e a connection with Mbps Mbps Mbps for mean bandwidth B allo cation F urthermore in our implemen tat ion the p eak and burst bandwidth mean are in tegrated in to one parameter the p eak bandwidth b ecause our A TM card do es not pro cess the B bur st parameter although the A TM API allo ws for its sp eci cation This means that if considering the ab o v e example the p eak bandwidth B of a connection is set to b e an additional Mbps on top of the mean peak bandwidth Mbps Mbps Mbps The ac kno wledgmen t connection rev erse connection is also established for sending ac kno wledgmen t information from the receiv er bac k to the sender its bandwidth is set to b e one fth of the forw ard connection s bandwidth W e ha v e compared the bandwidth reserv ation v ersus allo cation p erformance b et w een our transp ort la y er and the underlying AAL la y er to see if the ab o v e presen ted bandwidth calculations and reserv ations based on those calculations matc h the real situation The comparison is sho wn in Figure The reserv ed bandwidth is the user lev el mean bandwidth that the application sp eci es to the comm unicati on brok er and the comm unication brok er will then add the ab o v e discussed bandwidth o v erhead The maxim um ac hiev able user lev el bandwidth for our transp ort la y er is around Mbps whic h is far b elo w the A TM standard of Mbps Ho w ev er as sho wn in the Figure the lo w er p erformance of METP is caused to large degree b y the p o or p erformance of the underlying F ORE AAL la y er The AAL la y er without our METP cannot ac hiev e guaran tees for higher reserv ation requests ab o v e to Mbps 45 Transport Protocol Fore AAL3/4 40 35 30 25 20 15 Achieved bandwidth (mbps) 10 5 0 0 5 10 15 20 25 30 35 40 45 50 Reserved bandwidth (mbps) Fig Reserv ed bandwidth Excluding Ov erhead vs Ac hiev ed bandwidth VI I I Experiments and Resul ts A CPU Server R esults W e ha v e p erformed a n um b er of exp erimen ts with the CPU serv er on a single pro cessor Sparc w orkstation running Solaris OS with MB of ph ysical memory The rst exp erimen t CPU Exp erimen t consists of the mixture of the follo wing four p opular applications running concurren tly The rst application is a R T mpeg play program the later three applications are TS bac kground programs The Berk eley mpeg play program v ersion pla ys the TV carto on Simpsons mp eg le at frames p er second fps The gcc compiler compiles the Berk eley mpeg play co de This is a mean applicatio n bandwidth whic h considers an a v erage size of the APDUs among the v arious frame sizes in the stream The Mbps corresp onds to the o v erhead under the follo wing assumptions all video frames transmitted o v er the connections I I are I frames B M R and our METP proto col fragmen ts APDU in to a set of TPDUs whic h creates a burst bandwidth A A I o v er a short p erio d of time whic h ma y b e m uc h larger than the mean bandwidth B or the bandwidth B mean A compute program calculates the sin and cos table using the in nite series form ula A memory in tensiv e program that copies mp eg frames in a ring of bu ers The graphs in Figure sho w the measuremen t of in ter frame time on the mpeg play program under the ab o v e sp eci ed load The left graph sho ws the result under the normal TS UNIX sc heduler without our serv er The righ t graph sho ws the result of the fps mpeg play program with CPU reserv ed ev ery ms Using the UNIX TS sc heduling noticeable jitter o v er ms equiv alen t to frames time o ccurs frequen tly times out of the frames seconds The largest jitter is ab out ms o v er frames time whic h is clearly unacceptable Using our serv er noticeable jitter o v er ms do es not o ccur at all 800 800 10fps 10fps 700 700 600 600 500 500 400 400 300 Interarrival time in ms 300 Interarrival time in ms 200 200 100 100 0 0 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 Frame Number Frame Number Fig In ter frame time measuremen t for mpeg play at fps on the SUN Sparc Solaris platform The left graph sho ws the result for the TS UNIX sc heduler The righ t graph sho ws the result of our CPU serv er with CPU reserv ed ev ery ms The second exp erimen t CPU Exp erimen t consists of t w o mpeg play programs that pla y the same TV carto on Simpsons at fps and fps The set of bac kground TS jobs is the same as in CPU Exp erimen t The graphs in Figure sho w the measuremen t of in ter frame time on the t w o mpeg play programs The left graph sho ws the result under normal TS UNIX sc heduler without our CPU serv er The righ t graph sho w the result for the fps mpeg play program with CPU reserv ed ev ery ms and for the fps mpeg play program with CPU CPU reserv ed ev ery ms Using the UNIX TS sc heduling noticeable jitter o v er ms for the fps mpeg play program o ccurs frequen tly at times out of frames seconds and the largest jitter is around ms frames time whic h is unacceptable The fps mpeg play program exhibits noticeable jitter o v er ms frame time times Using our serv er noticeable jitter o v er ms do not o ccur for b oth fps and fps mpeg play programs B Memory Server R esults W e ha v e tested our memory serv er together with the CPU serv er under the same system setup as in the CPU only exp erimen ts in the previous subsection The memory serv er is con gured with a MB of global reserve out of MB of ph ysical memory serving p oten tially m ultiple mpeg play programs The rst exp erimen t CPU MEM Exp erimen t consists of the same mixture of applications as de ned in CPU Exp erimen t The result is presen ted on the left graph in Figure and it sho ws the measuremen t of the in ter frame time on the fps mpeg play program under the sp eci ed load and with the presence of b oth the memory and CPU serv ers The mpeg play program mak es a CPU reserv ation of ms and establishes a memory reserv ation of MB All the malloc calls are c hanged to MEM alloc The result is similar to the CPU serv er graph in Figure with a further impro v em en t in a v erage jitter from ms Jitter is computed as j in ter frame time p erio d ms j P j itter The a v erage jitter is computed as num f r ames 800 800 4fps 4fps 8fps 8fps 700 700 600 600 500 500 400 400 300 Interarrival time in ms 300 Interarrival time in ms 200 200 100 100 0 0 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 Frame Number Frame Number Fig In ter frame time measuremen t for the t w o mpeg play programs at fps and fps on the SUN Sparc Solaris platform The left graph sho ws the result for the TS UNIX sc heduler The righ t graphs sho ws the result of our CPU serv er with the mpeg play program at fps ms and fps ms to ms The second exp erimen t CPU MEM Exp erimen t consists of the same mixture applications as in CPU Exp erimen t The result is presen ted on the righ t graph in Figure and it sho ws the measuremen t of the in ter frame time on t w o mpeg play programs at fps and fps under the sp eci ed load and with the presence of b oth the memory and CPU serv ers The fps mpeg play program mak es a CPU reserv ation of ms and a memory reserv ation of MB and the fps mpeg play program mak es a CPU reserv ation of ms and also a memory reserv ation of MB W e observ e more signi can t impro v emen ts in the a v erage jitter from ms in CPU Exp erimen t to ms in CPU MEM Exp erimen t for the fps mpeg play program and from ms in CPU Exp erimen t to ms in CPU Exp erimen t for the fps mpeg play program 800 800 10fps 4fps 8fps 700 700 600 600 500 500 400 400 300 Interarrival time in ms 300 Interarrival time in ms 200 200 100 100 0 0 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 Frame Number Frame Number Fig The in ter frame time Measuremen t for mpeg play programs with b oth the memory and CPU serv ers The righ t graph sho ws one mpeg play program at fps with reserv ation ms MB The left graph sho ws t w o mpeg play programs at fps with reserv ation ms MB and at fps with reserv ation ms MB C Communic ation R esults W e ha v e tested our comm unicati on serv er together with the CPU and the memory serv ers The comm uni cation serv er exp erimen t uses t w o mac hines one acting as sender and the other one as receiv er The A TM net w ork con guration w as describ ed in the previous section Except for the additional net w ork supp ort the mac hines are of the same con guration as in the previous exp erimen ts The comm unicati on serv er exp erimen t runs a video serv er program on one mac hine and p oten tially sev eral clien t video programs running on other mac hines The video serv er program forks a c hild pro cess to service a clien t and the serv er s c hild pro cess retriev es a requested MPEG stream and sends the compressed video frames via our R T transp ort proto col The video clien t mpeg play program is built on top of the Berk eley mpeg play program with mo di cations to read data from our METP proto col instead of a le The clien t program mpeg play p erforms the same deco ding and displa ying as in the original Berk eley mpeg play program In the rst exp erimen t CPU MEM COM Exp erimen t the video serv er and the clien t programs are running concurren tly with the same mixture of bac kground TS programs as in CPU MEM Exp erimen t on b oth the serv er and the clien t mac hines The graphs in Figure sho w the in ter frame time measured on a single clien t mpeg play program running at fps The left graph sho ws the result without an y reserv ation The righ t graph sho ws the result for the clien t program with resource reserv ation CPU ms memory MB net Mbps and the serv er program with resource reserv ation CPU ms memory MB net Mbps Without an y resource reserv ation noticeable jitters o v er ms o ccur frequen tly times The largest jitter is ab out ms With the resource reserv ation noticeable jitters o v er ms do not o ccur 800 800 10fps 10fps 700 700 600 600 500 500 400 400 300 Interarrival time in ms 300 Interarrival time in ms 200 200 100 100 0 0 0 50 100 150 200 250 300 350 0 100 200 300 400 500 600 700 Frame Number Frame Number Fig In ter frame time measuremen t for one clien t mpeg play program at fps The left graph sho ws the result without an y reserv ation The righ t graph sho ws the result with the clien t program reserv ation CPU ms memory MB net Mbps and the serv er program reserv ation CPU ms memory MB net Mbps The second exp erimen t CPU MEM COM Exp erimen t consists of t w o video clien ts programs running at fps and fps frame rate The left graph in Figure sho ws the result without an y reserv ation The righ t graph sho ws the result for the fps clien t mpeg player with resource reserv ation CPU ms memory MB net Mbps and its serv er with resource reserv ation CPU ms memory MB net Mbps for the fps clien t mpeg player with resource reserv ation CPU ms memory MB net Mbps and its serv er with resource reserv ation CPU ms memory MB net Mbps Without an y resource reserv ation noticeable jitters o v er ms for the fps clien t mpeg play program o ccur frequen tly times ho w ev er jitters for the fps clien t mpeg play program o ccur less frequen tly b ecause this stream consumes little resources at a lo w frame rate With resource reserv ation jitter sta ys within ms range for the fps clien t mpeg play program and within ms range for the fps clien t mpeg play program W e summarize the p erformance results on the clien t mpeg play program under v arious degrees of resource reserv ation in T able VI I I The comparison metric is the aver age jitter in ms Since the MPEG stream is compressed in to lo w bandwidth whic h is not a go o d stress test on our transp ort In all comm unication serv er exp erimen ts w e will sp ecify as the comm unication QoS net the mean bandwidth reserv ation requiremen t B b ecause this is the most signi can t parameter for the V OD applicatio n and its p erformance Other parameters mean are presen t but are less signi can t in the o v erall result 800 800 3fps 3fps 6fps 6fps 700 700 600 600 500 500 400 400 300 Interarrival time in ms 300 Interarrival time in ms 200 200 100 100 0 0 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 Frame Number Frame Number Fig In ter frame time measuremen t for t w o clien t mpeg play programs at fps and fps The left graph sho ws the result without an y resource reserv ation The righ t graph sho ws the result for fps clien t reserv a tion CPU ms memory MB net Mbps and serv er reserv ation CPU ms memory MB net Mbps for fps clien t reserv ation at CPU ms memory MB net Mbps and serv er reserv a tion at CPU ms memory MB net Mbps T ABLE VI I I Summary of Performanc e R esults on the mpeg play pr o gr am under various de gr e es of r esour c e r eservation Resource Reserv e One stream fps Tw o streams fps Tw o streams fps None ms ms m s CPU ms ms m s CPU memory ms ms m s CPU memory net w ork ms ms m s subsystem w e ha v e p erformed additional set of exp erimen ts with the video serv er sending uncompressed video frames to p oten tially m ultiple clien ts at a m uc h higher bandwidth using our METP proto col Eac h uncompressed video frame is of xed size KB The rst exp erimen t CPU COM Exp erimen t in v olv es a single clien t program requesting video frames at fps Mbps from a serv er The same mixture of TS bac kground programs are run concurren tly with the video serv er and clien t programs on b oth the serv er and clien t mac hines W e measure the in ter arriv al time of the uncompressed video frame at the clien t side The left graph in Figure sho ws the result without an y resource reserv ation the righ t graph sho ws the result with the clien t reserv ation CPU ms net Mbps and serv er reserv ation CPU ms net Mbps Jitter o v er ms one frame time under no resource reserv ation o ccurs frequen tly times whereas it do es not o ccur under the resource reserv ation The second exp erimen t CPU COM Exp erimen t adds one more clien t program that requests video frames at fps Mbps Again the same mixture of TS bac kground programs are run concurren tly with the video serv er and clien t programs on b oth the serv er and clien t mac hines The left graph in Figure sho ws the result without an y reserv ation and the righ t graph sho ws the result for the fps clien t reserv ation CPU ms net Mbps and serv er reserv ation CPU ms net Mbps and for the fps clien t reserv ation CPU ms net Mbps and serv er reserv ation CPU ms net Mbps Noticeable jitter o v er ms t w o frames time for the fps clien t o ccurs frequen tly times under no resource reserv ation whereas it do es not o ccur under resource reserv ation In summary all exp erimen ts and results sho w that our resource negotiation admission reserv ation mec h anisms enforcemen t algorithms in the CPU memory comm unicati on serv ers and their in tegration pro vide m uc h b etter p erformance and QoS guaran tees to m ultim edia applications under mixed time sharing load 500 500 10 fps 10 fps 450 450 400 400 350 350 300 300 250 250 200 200 Interarrival time in ms Interarrival time in ms 150 150 100 100 50 50 0 0 0 50 100 150 200 250 300 350 400 450 500 0 100 200 300 400 500 600 Frame Number Frame Number Fig In ter frame time measuremen t for single clien t uncompressed video program at fps The left graph sho ws the result without an y resource reserv ation The righ t graph sho ws the result with clien t reserv ation CPU ms net Mbps and serv er reserv ation CPU ms net Mbps 500 500 5 fps 5 fps 10 fps 10 fps 450 450 400 400 350 350 300 300 250 250 200 200 Interarrival time in ms Interarrival time in ms 150 150 100 100 50 50 0 0 0 50 100 150 200 250 300 350 400 450 0 100 200 300 400 500 600 Frame Number Frame Number Fig In ter frame time measuremen t for t w o clien t uncompressed video programs at fps and fps The left graph sho ws the result without an y resource reserv ation The righ t graph sho ws the result with fps clien t reserv ation CPU ms net Mbps fps serv er reserv ation CPU ms net Mbps and fps clien t reserv ation CPU ms net Mbps and fps serv er reserv ation CPU ms net Mbps than the general purp ose net w ork ed platform This means that our implemen tatio n and results strongly v er ify QualMan resource managemen t mo del and design in its form of a loadable middlew are b ecause it can pro vide a more predictable and ner gran ularit y resource con trol of end p oin t resources to the application for end to end m ultimedia comm unication as w ell as m ultim edia acceptable end to end QoS guaran tees IX Rela ted W ork A QoS F r amework The curren t existing QoS systems either allo w to access and con trol net w ork QoS suc h as the Lancaster QoS system Cam or OMEGA end p oin t system NS or CPU QoS parameters suc h as Nemesis LMB Real Time Mac h reserv e LRM B CPU Sche duling The area of accommo dating sc heduling of soft R T applications on the curren t UNIX platforms w as addressed b y sev eral groups Go y al Guo and Vin GGV implemen ted the Hier ar chic al CPU Sche duler in the SUN Solaris The CPU resource is partitioned in to hierarc hical classes suc h as Real time and Best E ort classes in a tree lik e structure A class can further partition its resource in to sub classes Eac h class can designate a suitable sc heduler to meet the ob jectiv e of its pro cesses leaf no des Protection b et w een classes is ac hiev ed b y the Start time F air Queuing SF Q algorithm whic h is a mo di cation of the W eigh ted F air Queuing Algorithm SF Q is a fair sc heduler that sc hedules all the in termediate classes and sub classes according to their partitioned resources Mercer Sa v age and T okuda MT implemen ted the Pr o c essor Cap acity R eserves abstraction for the R T threads in the R T Mac h Op erating System A recen t v ersion LRM supp orts dynamic Qualit y adjustmen t p olicy A new thread m ust rst request its CPU QoS in the form of p erio d and r e queste d CPU usage in p er c entage during the reserv ation phase Once it is accepted a r eserve of CPU pro cessing time is setup and it is b ound to this new thread An y computation time done on b ehalf of this pro cess including all service time from v arious system threads is c harged to this reserv e The reserv e is replenished p erio dically b y its requested CPU usage time This concept is similar to the T oken Bucket The accurate accoun ting of system service time is a sup erior but costly feature Y au and Lam YL implemen ted the Adaptiv e Rate Con trolled Sc heduling whic h is a mo di cation of the Virtual Clo ck Algorithm Eac h pro cess sp eci es a reserv e rate and a p erio d for its admission con trol phase During its execution phase the reserv e rate is adjusted up w ard or do wn w ard to matc h its actual usage rate in a gradual fashion It is called r ate adaptation Gopalakkrishnan Gop implemen ted the R e al Time Up c al l R TU on the NetBSD UNIX to supp ort p erio dic tasks Eac h R TU is similar to a pro cess it con tains an ev en t handler that registers to the k ernel its execution time and p erio d The k ernel dispatc her is mo di ed to sc hedule the R TUs using the Rate Monotonic algorithm In order to increase the predictabilit y and e ciency the k ernel dispatc her disallo w preemptions during the middle of the R TU execution called delay pr e emption and no async hronous preemption Kamada Y uhara and Ono aMYO implemen ted the User level R T Sche duler URsc hed in the SUN Solaris The URsc hed approac h is based on the POSIX xed priorit y extension and its priorit y sc heduling rule C Memory The SUN Solaris Op erating System pro vides a set of system calls that allo w a pro cess to lo c k certain regions of its address space in ph ysical memory Mic The mlock addr len munlock addr len system calls lo c k or unlo c k for the address space region addr addr len The mlockall munlockall lo c ks or unlo c ks all the segmen ts in the address space in ph ysical memory The plock op system call lo c ks or unlo c ks the text or data segmen ts in memory These memory lo c king system calls ha v e problems Unlimited and unconstrained use of these system calls are dangerous to the system giv en that memory is a shared and scarce system resource A fault y pro cess can p oten tially lo c k out a great p ortions of the ph ysical memory and it can degrade the p erformance of other real time or non real time pro cesses The memory lo c king system calls require pro cesses with sup eruser privilege but running video applications should not require sup eruser privileges Lynx Op erating System Sys supp orts the priority thr eshold in its Demand Page d Virtual Memory managemen t Non real time pro cesses running at priorit y lo w er than the priority thr eshold will get sw app ed out while real time pro cesses running at higher priorit y will not This priorit y based p olicy has problems F or example a fault y high priorit y real time pro cess can p oten tially blo c k out great p ortions of the memory in the system and degrade other lo w er priorit y real time pro cesses or the non real time pro cesses It lac ks a protection mec hanism D Multime dia Communic ation Pr oto c ols Ov er the last couple of y ears there w as a n um b er of fast and real time transp ort proto cols for m ultime dia transmission considering net w ork QoS managemen t Examples are ST I I T op T enet Proto col Suite BFM BM Lancaster T ransp ort Subsystem CCH Cam Heidelb erg T ransp ort Subsystem DHH DHVW DHH VHN Nativ e A TM Proto col Stac k KS User Space TCP implemen tation GP OMEGA arc hitecture Nah and others Because of our A TM consideration for the comm u nication serv er to pro vide a m ultimedia e cien t transp ort proto col whic h will bring out the QoS guaran tees pro vided b y the A TM net w ork to the application w e will compare from the ab o v e list of the proto cols related w ork only transp ort subsystems whic h rely on A TM net w orks The Native A TM pr oto c ol stack KS is a no v el proto col stac k whic h is optimized sp eci cally to w ork w ell o v er an A TM net w ork running on PC platform attempts to pro vide QoS indep enden t of the op erating system en vironmen t whic h is p ossible due to the PC s OS sp eci cs exploits services of an underlying AAL la y er uses a new retransmission sc heme SMAR T Simple Metho d to Aid ReT ransmissions KM whic h p erforms signi can tly b etter and pro vides reliable and unreliable data deliv ery with a c hoice of feedbac k and leaky buc k et o w con trol This framew ork is implemen ted and optimized for a PC en vironmen t where part of the transp ort proto col resides in the k ernel Therefore this proto col di ers from our goal to design a loadable comm unicatio n serv er as part of the middlew are whic h means to ha v e the framew ork op erate in the user space Ho w ev er w e applied sev eral lessons learned from this proto col stac k and w e expanded its functionalit y of reliabilit y proto cols as men tioned in section The User Space TCP implemen tatio n GP pro ject is a no v el attempt to pro vide supp ort for m ultimedia pro cessing using existing proto cols instead of designing new proto cols It uses an op erating system feature called R e al Time Up c al ls to pro vide QoS guaran tees to net w ork ed applications It pro vides zero cop y op eration based on shared User Kernel memory and using o the shelf adaptors eliminates all concur rency con trol op erations in the critical proto col pro cessing path a v oids virtual memory op erations during net w ork I O and uses the least amoun t of system calls and con text switc hes The c hanges to supp ort up calls w ere done in k ernel whic h again di ers from our ob jectiv e for loadable comm unication serv er Similar to nativ e A TM proto col stac k w e applied their lessons learned to our proto col functions to optimize our p erformance The OMEGA arc hitecture NS is an end p oin t arc hitecture whic h extends net w ork QoS services to w ards the applications Via the QoS brok er it in tegrates the application requiremen ts with the proto col stac k and OS and supp orts translation of uncompressed streams and negotiation b et w een end p oin ts The OS and transp ort QoS supp ort are m uc h simpler than in the QualMan w ork without an y resource brok er protection and explicit QoS enforcemen t Similar to the ab o v e transp ort subsystems w e applied v arious lessons learned from this end p oin t arc hitecture and expanded the QoS brok er capabilities as w ell as the QoS enforcemen t functions p erformed b y the resource serv ers X Conclusion In this pap er w e ha v e presen ted a QoS a w are resource managemen t whic h allo ws the application to sp ecify system QoS parameters in terms of CPU memory and comm unication QoS parameters and therefore to con trol the resource allo cation according to the qualit y desired b y the application W e p oin ted out that in order to giv e an application suc h con trol the resource managemen t needs to b e extended with brok erage and reserv ation capabilities Our new resource mo del for shared resources includes the resource brok er whic h pro vides negotiation admission and reserv ation capabilities o v er the shared resource It is an imp ortan t assistan t to the resource sc heduler to mak e the p erformance o v er this resource more predictable and to impro v e the qualit y guaran tees giv en to the application This mo del is esp ecially b ene cial to m ultimedia distributed applications whic h ha v e timing constrain ts during the pro cessing and comm unicatio n of con tin uous media W e sho w ed through n umerous exp erimen ts and results that the in tegrated system la y er arc hitecture QualMan consisting of CPU memory and comm u nication serv ers is feasible These serv ers are implemen t able and load able on a general purp ose platform whic h supp orts real time extensions Our results ha v e sho wn that QualMan pro vides acceptable and desirable end to end QoS guaran tees for v arious m ultim edia applications suc h as the MPEG pla y er and video on demand application P erceptually it mak es a h uge di erence in user acceptance if one w atc hes displa y of jitter full video audio streams v ersus smo othed out streams References aMYO J Kamada ab d M Y uhara and E Ono User lev el Realtime Sc heduler Exploiting Kernel lev el Fixed Priorit y Sc hed uler T ec hnical rep ort T oshiba Inc T oky o Japan June BFM A Banerjea D F errari B A Mah M Moran D C V erma and H Zhang The Tenet Real Time Proto col Suite Design Implemen tation and Exp eriences A CM T r ansaction on Networking F ebruary BM A Banerjea and B Mah The Real Time Channel Administration Proto col In nd International Workshop on Network and Op er ating System for Digital A udio and Vide o Heidelb erg German y No v em b er Cam A Campb ell A Quality of Servic e A r chite ctur e PhD thesis Lancaster Univ ersit y Lancaster England CCH A Campb ell G Coulson and D Hutc hison A Multimedia Enhanced Transp ort Service in a Qualit y of Service Arc hitecture In Workshop on Network and Op er ating System Supp ort for Digital A udio and Vide o Lancaster England No v em b er CN H Ch u and K Nahrstedt A soft real time serv er in unix op erating system In IDMS Eur op e an Workshop on Inter active Distribute d Multime dia Systems Septem b er DHH L Delgrossi Ch Halstric k D Hehmann R G Herrt wic h O Krone J Sandv oss and C V ogt Media Scaling for Audio visual Comm unication with the Heidelb erg Transp ort System T ec hnical Rep ort IB ENC Heidelb erg Heidelb erg German y DHH L Delgrossi R G Herrt wic h and F O Ho mann An Implemen tation of ST II for the Heidelb erg Transp ort System Internetworking R ese ar ch and Exp erienc e DHVW L Delgrossi R G Herrt wic h C V ogt and L C W olf Reserv ation Proto cols for In ternet w orks A Comparison of ST II and RSVP T ec hnical Rep ort IBM Europ ean Net w orking Cen ter Heidelb erg German y GGV P Go y al X Guo and H Vin A Hierarc hical CPU Sc heduler for Multimedia Op erating System In Se c ond USENIX Symp osiun on Op er ating System Design and Implementation Octob er Gop R Gopalakrishn an E cient Quality of Servic e Supp ort Within Endsystems for High Sp e e d Multime dia Networking PhD thesis Departmen t of Computer Science W ashington Univ ersit y St Louis MI GP R Gopalakrishn an and G M P arulk ar E cien t User Space Proto col Implemen tation with QoS Guaran tees using Real Time Up calls T ec hnical rep ort Departmen t of Computer Science W ashington Univ ersit y St Louis Gro Ob ject Managemen t Group The Common Ob ject Request Brok er Arc hitecture and Sp eci cation Version OBG August F ramingham Massac h ussetts KM S Kesha v and S P Morgan SMART Retransmission P erformance with Random Losses and Ov erload In INF O COM KN K Kim and K Nahrstedt QoS Translation and Admission Con trol for MPEG Video In th IFIP International Workshop on Quality of Servic e Ma y KS S Kesha v and H Saran Seman tics and Implemen tation of a Nativ e Mo de ATM Proto col Stac k In ternal tec hnical memo A T T Bell Lab oratories Murra y Hill NJ Jan uary LMB I M Leslie D McAuley R Balc T Rosco e P Barham D Ev ers R F airbairns and E Hyden The design and Implemen tation of an Op erating System to Supp ort Distributed Multimedia Applications IEEE Journal on Sele cte d A r e as in Communic ations Septem b er LRM Ch Lee R Ra jkumar and C Mercer Exp eriences with pro cessor reserv ation and dynamic qos in real time mac h In IEEE Multime dia Systems Hiroshima Japan June Mic Sun Microsystems Solaris man ual Answ erBo ok Sun Microsystems Inc MT C W Mercer and S Sa v age H T okuda Pro cessor Capacit y Reserv es Op erating System Supp ort for Multimedia Applications In IEEE International Confer enc e on Multime dia Computing and Systems Ma y Nah K Nahrstedt A n A r chite ctur e for End to End Quality of Servic e Pr ovision and its Exp erimental V alidation PhD thesis Univ ersit y of P ennsylv ania August NS a K Nahrstedt and J M Smith The QoS Brok er IEEE Multime dia Spring NS b K Nahrstedt and R Steinmetz Resource managemen t in net w ork ed m ultimedia systems IEEE COMPUTER pages Ma y NS K Nahrstedt and J M Smith Design Implemen tation and Exp eriences of the OMEGA End Poin t Arc hitecture IEEE JSA C Sp e cial Issue on Distribute d Multime dia Systems and T e chnolo gy Septem b er PH D P atterson and H Hennessy Computer Ar chite ctur e a Qualitative Appr o ach Morgan Kaufmann Publishers Inc SG A Silb ersc hatz and P B Galvin Op er ating System Conc epts Addison W esley th edition edition Sys Lynx Real Time Sys tems LynxOS Hard Real Time OS F eatures and Capabiliti es h ttp www Lynx com pro ducts ds lynxos h tml T op C T op olo cic Exp erimen tal In ternet Stream Proto col Version ST II In ternet Net w ork W orking Group RF C Octob er VHN C V ogt R G Herrt wic h and R Nagara jan HeiRAT The Heidelb erg Resource Administration Tec hnique Design Philosoph y and Goals In Pr o c e e dings of Confer enc e on Communic ation in Distribute d Systems M unc hen German y Also published in Informatik aktuel Springer YL D Y au and S S Lam Adaptiv e Rate con trolled Sc heduling for Multimedia Applications In A CM Multime dia Confer enc e Boston MA No v em b er