Aar1   0` @  @p p  HH $ @d HHHH̀̀̀ff@  d Footnote TableFootnote**.\t.\t/ - :;,.!?9  cN1dTOCHeading1Heading2   PEquationVariableseH ;`<<=7=P=i=;B;D;F;H?c <$lastpagenum><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear>J<$hour>:<$minute00> <$ampm> on <$dayname>, <$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear> <$fullfilename> <$filename> <$paratext[Title]> <$paratext[Heading1]> <$curpagenum> <$marker1> <$marker2> (Continued)+ (Sheet <$tblsheetnum> of <$tblsheetcount>)Heading & Page <$paratext> on page<$pagenum>Pagepage<$pagenum>See Heading & Page%See <$paratext> on page<$pagenum>. Table All7Table<$paranumonly>, <$paratext>, on page<$pagenum>Table Number & Page'Table<$paranumonly> on page<$pagenum>Heading <$paratext>HTML Headings++A33557[A<<>>@@A ;b;d;f;h;j;l;n;p;r;t;v;x;z;|;~;;;;;;;;;;;;;;;;;;;;;EE;;;;;;;;;;EE;;;;;;;;;;;;;;;;;;;;EE;;;;;;;;;;<<<<<< < <<<<<<<<F;F=< <"<$<&<(<*<,<.<0<2<4<6<8<:<<FoFq<@HH  W,eH* }H ;=?H  W-eN }H ;>@H  W.eN } H ;?A H  W/a }H(;@BH(  W0e P:Numbered }HH(;ACHH(( 3eP 1e Parent = OL Q2e Depth = 0 }H(;BDH(  W4eN }H(;CEH(  W5eY } H(;DF H(  W6a }H ;EGH  W7e P:CellBody }HH ;FHHH  W8eP }H ;GIH  W9eN }H ;HJH  W:eN } H ;IK H  W;a }H ;JLH  W<eP:CellHeading }HH ;KMHH  W=eP }H ;LNH  W>eN }H ;MOH  W?eN } H ;NP H  W@a }H ;OQH  WAe P:Footnote }HH ;PRHH  WBeP }H ;QSH  WCeN }H ;RTH  WDeN } H ;SU H  WEa }H(;TVH( WFe P:Bulleted }HH(;UWHH((IeLI Ge Parent = UL QHe Depth = 0 }H(;VXH( WJeN }H(;WYH( WKeN } H(;XZ H( WLa }H ;Y[H WMe P:Heading2 }HH ;Z\HH WNeH* }H ;[]H WOeN }H ;\^H WPeN } H ;]_ H WQa }H;^`HR% P:HeadingRuPEnIn }HH;_aHH WSeP }H<`bH WTeN }H<acH WUeN } H<bd H WVa }7H <ce7H WWe P:Indented }H7H < dfH7H WXeP }7H < eg7H WYeN }7H < fh7H WZeN } 7H <gi 7H W[a }CH<hjCH\% P:TableFootPEnote }HCH<ikHCH W]eP }CH<jlCH W^eN }CH<kmCH W_eN } CH<ln CH W`a }]H(<mo]H( Wae P:TableTitle }H]H(<npH]H((deLI be Parent = OL Qce Depth = 0 }]H( H "W4a }©H <=?©H #W5e P:BodyIndent }H©H <>@H©H #W6eP }©H <?A©H #W7eN }©H <@B©H #W8eN } ©H <A ©H #W9a }»d <DvF»d F$W:aHTML Options Table }D»d <DD»d F$W;a }D»d <DD»d F$W<a }D <DCGD F%W=eControl }DH <DFHDH F%W>eValue }H <DGIH F%W?e Comments }D6<DHJD6 F&W@e Image Format }DH6<DIKDH66F&A% 0001IMAGGIF p MACP0001GIEF }H6<DJLH6 F&WBa }D <DKMD F'WCeBanners }DH <DLNDH F'WDeN }H <DMOH F'WEa }D<DNPDF(F% Banner ReferPE ence Frame }DH<DOQDH F(WGe }H<DPRH F(WHa }D(<DQSD((F)I$% Copy Files  Imported by PE Rerefernce }DH(<DRTDH( F)WJe }H(<DSUH( F)WKa }DD(<DTVDD((F*L% Copy Files  Imported by PE Reference }DDH(<DUWDDH( F*WMeN }DH(<DVDH( F*WNa }Vd <D[Vd F+WOaSystem Macros }?Vd <D?Vd F+WPa }Vd <DVd F+WQa }f? <DX\f? F,WRe Macro Name }?fH <D[?fH F,WSe Replace With }fH <D^fH F,WTe Comments }r? =D]_r? F-WUe StartOfDoc }?rH =D^?rH F-WVa }rH =DarH F-WWa }~? =D`b~? F.WXe EndOfDoc }?~H = Dan?~H F.WYa }~H = Dnd~H F.WZa }?= Dce?F/[% StartOfSubPEDoc }?H=Ddo?H F/W\a }H=DogH F/W]a }?=Dfh?F0^% EndOfSubPEDoc }?H=Dgp?H F0W_a }H=DpjH F0W`a }?=Dik?F1a% StartOfFirstPESubDoc }?H=Djq?H F1Wba }H=DqmH F1Wca }?=Dln?F2d% EndOfFirstPESubDoc }?H=!Dmr?H F2Wea }H=#DrpH F2Wfa }?=%Doq?F3g% StartOfLastPESubDoc }?H='Dps?H F3Wha }H=)DssH F3Wia } ?=+Drt ?F4j% EndOfLastPESubDoc }? H=-Dst? H F4Wka } H=/Dty H F4Wla }H GKD{wH F5Gme C:Emphasis }H GMDvxH F5GneEM }H GODwuH F5GoeN },d =8Du|,d F6WpaCross-Reference Macros }?,d =:D?,d F6Wqa },d =<D,d F6Wra }<? =>Dy}<? F7Wse Macro Name }?<H =@D|~?<H F7Wte Replace With }<H =BD}<H F7Wue Comments }H?=DD~H? F8Wve See Also }?HH=FD?HHF8w% See Also: PE <$paratext> }HH=HDHH F8Wxa }Vd DDVd F+Wye }fH DD\]fH F,WzeHead }rH DD_`rH F-W{e }hd =QD hd F:WaGeneral Macros }?hd =SD?hd F:Wa }hd =UDhd F:Wa }hd =WDhd F:Wa }x? =YD"x? F;We Macro Name d= d= d l d= d WBm }d = d  <W|aHeadings Table }Hd = Hd  <W}a }Hd = Hd  <W~a }H= H  =WeHeading Level }HH= HH =%Paragraph ForPEmat }H= H  =We Comments }H= H >W e5 }HH= HH >We CodeComment }H= H  >Wa }KH = KH  ?We2 }HKH = HKH  ?We Heading1 }KH = KH  ?Wa }WH = WH  @We3 }HWH = HWH  @W e Heading2 }WH = WH  @W a }cH = cH  AW e4 }HcH = HcH  AW e Lettereda }cH = cH  AW a }?fP Q BW `batch }?hP!Q BW0 ` interactive }?jP 8Q BW1 ` real-time }?xH =[D #?xH F;We Replace With }xH =]D"$xH F;W eHead }xH =_D#%xH F;W!e Comments }? =aD$&? FCW"a }?H =cD%'?H FCW#a }H =eD&(H FCW$a }H =gD')H FCW%a }d =jD(.d FDW&aCharacter Macros HHˆ;"HHˆ+Ge HHˆ;$3HHˆ**l}?d =lD?d FDW'a }d =nDd FDW(a }? =pD)/? FEW)e Character }?H =rD.0?H FEW*e Replace With }H =tD/1H FEW+e Comments }? =vD0B? FFW,e HUV ;.HUV 3Ge HUV ;05+HUV 22l H$ ;1H$ 5Ge H$ ;33H$ 44l HHˆ;4HHˆ9X7P `Process Scheduling T qGoal: What characterizes a fair internal policy? Which process is given the CPU next? This is the province of  @ schedulers. WBt` Schedulers X` long-term Q[D>` medium-term R` short-term Zs`'Scheduling Considerations and Overview [`Smetrics: throughput, turnaround, response, resource use, waiting time, consistency 1S jdistingishing characteristics of processes such as priority, anticipated resource need (including running otime), running time, resources used so far, interactive/non-interactive, frequency of I/O requests, time spent @waiting for service `*`The Scheduling Algorithms b` First Come, First Served (FCFS) we`OShortest Job Next (SJN), Shortest Job First (SJF), Shortest Process Next (SPN) a`GShortest Remaining Time (SRT), Preemptive Shortest Process Next (PSPN) `(Highest Response Ratio Next (HRRN, HRN) W`%Round Robin (RR) with Quantum  q Pd`pMultilevel Feedback Queues (MLF, MLFB) with  n  different priority levels each of priority  T p YUU;`External Priority Methods  b`worst service next \b`response ratio guarantee _`deadline scheduling Aa`fair-share scheduling HHˆ;6HHˆR66 l}HH?lP!9HHQ GW2 ` long-term }?nP8:Q G3`job admission based on qU characteristics and resource @needs }?pP9GQ G4 sessions and processes pnormally accepted unless @capacity reached d;;<@H$ ;<;>H$ == l H$ ;=;H$ <Wl8January 25, 2000ECS 150 Winter 2000Page 1  HUV ;>;<@HUV ?? l HUV ;?;HUV >Wl@Last modified at  2:49 pm on Monday, January 24, 2000  HHˆ;@;>HHˆAA l HHˆ;A;HHˆ@W` }?H =xD1C?H FFW-e¢ }H =zDBkH FFW.a d=~EEd=DdFF l d=Dd%aE%|wvCFILORUX[^adgjmpsy| %).1kheb_\}?rP:HQ G5 processes either permanent or P@accepted at once }HH?tPGIHHQ HW6 ` medium-term }?vPHJQ H7 usually nonejobs remain in P@storage until done }?xPIKQ H8 processes swapped when P@ necessary }?zPJLQ HW9`processes never swapped }HH?|PKMHHQ IW: ` short-term }?~PLNQ I; processes scheduled by ppriority; continue until wait voluntarily, request service, @or are terminated }?PMOQ I< processes scheduled on rotatping basis; continue until service requested, time quantum @expires, or pre-empted }?PNQ I= scheduling based on strict ppriority with immediate pre-emption; may time-share pro@cesses with equal priorities d@RR HHˆ@PHHˆ OR `Types of Schedulers ,` Introduction  tThis chart shows the function of each of the three types of schedulers (long-term, short-term, and medium-term) for I@Neach of three types of operating systems (batch, interactive, and real-time). W>b@h Chart  HHˆ@PHHˆ7UQQ ld@UU HHˆ@SHHˆx,,U? `Job Scheduling Algorithms @,` Introduction A`CThis handout shows how the various job scheduling algorithms work. BV`First Come, First Serve (FCFS) Ch`4This policy services jobs in the order they arrive. D t`=jobarrivalservicestartfinishturnaroundwaitingresponse E`)nametimetimetimetimetimetimeratio F`A0100101001.0 G`B12910393891.3 H`C233942403713.3 I`D37424946396.6 J`E412496157454.8 K `mean 38265.4 L`Shortest Job Next (SJN) M`,This policy services the shortest job next. N `=jobarrivalservicestartfinishturnaroundwaitingresponse O`)nametimetimetimetimetimetimeratio P`A0100101001.0 Q`B129326160312.1 R`C2310131183.7 S`D37132017102.4 T`E412203228162.3 U `mean 25132.3 Vl`%Pre-emptive Shortest Job Next (PSJN) W~`;This policy services the shortest job next, pre-emptively. X `=jobarrivalservicestartfinishturnaroundwaitingresponse Y`)nametimetimetimetimetimetimeratio Z`!A01002 pre-empted by C [`8122020102.0 \`B129326160312.1 ]`C2325301.0 ^`D37512921.3 _`E412203228162.3 ` `mean 24121.7 a`"Highest Response Ratio Next (HRN) b`CThis policy services the job with the highest response ratio next. c !`=jobarrivalservicestartfinishturnaroundwaitingresponse d`)nametimetimetimetimetimetimeratio e`A0100101001.0 f`B129326160312.1 g`C2310131183.7 h`D37132017102.4 i`E412203228162.3 Cj `mean 25132.3 HHˆ@!SHHˆRXTT ld@"XX HHˆ@#VHHˆ„33Xk`Round Robin (RR) l`9This policy services jobs for a fixed quantum (here, 5). m `=jobarrivalservicestartfinishturnaroundwaitingresponse n`)nametimetimetimetimetimetimeratio o`2A01005e nd of quantum; B starts  p`5232828182.8 q`+B129510 end of quantum; C starts r`*242833 end of quantum; D starts s`*194045 end of quantum; E starts t`14476160312.1 u`C2310131183.7 v`+D371318 end of quantum; E starts w`2333532254.6 x`,E4121823 end of quantum; A starts y`)73540 end of quantum; B starts z`2454743313.5 { `mean 35233.3 |`Multilevel Feedback (MLFB) `FThe variant of this class of scheduling algorithms uses three levels:  qprocesses at level 1 are scheduled round robin; the relevant quantum is 2, and when a quantum expires the job is @moved to level 2. " rprocesses at level 2 are scheduled round robin; the quantum is 4, and processes are allowed 2 quanta before being .@moved to level 3. =`:processes at level 3 are serviced first come first serve. 1I qThe jobs A, B, C, D, and E have been augmented by F, a 1-second job arriving at time 13, and G, an 11-second job @barriving at time 50. These are to demonstrate that quanta are usually  not  interrupted. `kIn what follows, the number in parentheses in the comment field is the remaining service time for the job. `- timelevel 1level 2level 3comments `0AA(10) arrives, runs  `-1ABB(29) arrives, A continues quantum !`J2BCAC(3) arrives, A's quantum expires (8), moves to level 2, B runs "`-3BCDAD(7) arrives, B continues quantum #`H4CDEABE(12) arrives, B's quantum expires (27), moves down, C runs $`86DEABCC's quantum expires (1), moves down, D runs %`88EABCDD's quantum expires (5), moves down, E runs !& T10ABCDEE's quantum expires (10), moves down, A runs from level 2 (level 1 is @empty) '`213FABCDEF(1) arrives, A's quantum continues (`;14FABCDEA's quantum expires (4), F runs (at level 1) )`A15ABCDEF finishes, B runs from level 2 (level 1 is empty) *`/19ABCDEB's quantum expires (23), C runs +` 20ABDEC finishes, D runs ,`-24ABDED's quantum expires (1), E runs -`-28ABDEE's quantum expires (6), A runs .`32BDEA finishes, B runs /`836DEBB's quantum expires (19), moves down, D runs 0`37EBD finishes, E runs !1 T41BEE's quantum expires (2), moves down, B runs from level 3 (since there is @nothing in higher levels) 2`-50GBEG arrives(11), B continues to run A3`@60GEB finishes, G runs (since it is in the highest level) HHˆ@%VHHˆU[WW ld@&[[ HHˆ@'YHHˆh[} `(timelevel 1level 2level 3comments 4`C62GEG's quantum expires (9), moves down, G runs from level 2 5`*66GEG's quantum expires (5), G runs 6`770EGG's quantum expires (1), moves down, E runs 7`72GE finishes, G runs 8`73G finishes 9`;The relevant numbers (ignoring start and finish time) are: : `=jobarrivalservicestartfinishturnaroundwaitingresponse ;`)nametimetimetimetimetimetimeratio <` A01002 preempted by B =`81014 preempted by F >`4283232223.2 ?` B12924 preempted by C @` 271519 preempted by C A` 233236 preempted by D B`19416059302.0 C`C2346 preempted by D D`1192018156.0 E`D3768 preempted by E F`52024 preempted by E G`1363734274.9 H`!E412810 preempted by A I` 102428 preempted by A J`63741 preempted by B K`2707268565.7 L`F1311415212.0 M`#G50116070 preempted by E N`1727323122.1 O `mean 33.723.33.7 S e` HHˆ@)YHHˆXZZ l}? D]? JW~e }?H D\^?H JWe... }H D]H JWe }? DDd`? FKWe }?H D!D_a?H FKWe- }H D#D`H FKWe }? D%Dgc? FLWe }?H D'Dbd?H FLWe-- }H D)Dc_H FLWe }? D+Djf? FMWe }?H D-Deg?H FMWe° }H D/DfbH FMW e }? D1Dmi? FNW e }?H D3Dhj?H FNW e® }H D5DieH FNW e }? D7DCl? FOWe }?H D9Dkm?H FOWe© }H D;DlhH FOWe }~H DDbc~H F.We }HDDefH F/We }HDDhiH F0We }HDDklH F1We }HDDnoH F2We }HDDqrH F3We } HDDtu H F4We }H GQDxvH F5GVeN }H GSDuCH F5G]e }H GUDxH F9G^e C:Computer }H GWDwyH F9GceEM }H GYDxzH F9GdeN }H G[Dy{H F9GeeN }H G]DzvH F9Gfe }H G_D}H FPGgeP:Line }H GaD|~H FPGheP }H GcD}H FPGieN }H GeD~H FPGjeN }H GgDwH FPGke }H GiDH FQGle P:Lettereda }H GkDH FQGmeH* }H GmDH FQGneN }H GoDH FQGoeN }H GqD|H FQGpe }H(GsH( RGqe P:Lettered }H(GuH((RreLI e Parent = OL Ae Depth = 0 }H(Gw H( RGseN }H(Gy H( RGteN }H(G{ H( RGue }HG} HSgv% P:CodeComEment }HG H SGweH* }HG H SGxeN }HG H SGyeN }HGH SGze }H GBH TG{e P:CodeASM }H GH TG|eP }H GH TG}eN }H GH TG~eN }H G H TGe }DH-DDFUg% CSS Export E Encoding }HH/DH FUGe }HH1DXH FUGe }DH3DWDFVg% Export EnEcoding }HH5DH FVGe }HH7DH FVGe dHE dHFd(\^\dHHdE l}HH H  WGe1 }HH  H WG  eTitle }HH H  WG e dLeftd;Rightd ReferenceddHTMLd DHTMLd Headingsd Pd Sd Vd YdHTML @@ QMapping Table Title. @@ QBody.  f@PQTitleBody. f@T QHeading1Body. @@ QFooter. f@T Q TableTitleT:Table : . @@ QMapping Table Cell. @@QMapping Table Cell. f@ Q H ....D...Body. f@ QH ....D...Body. f@ QBody. @@ QHeader Double Line. f@ Q CellFooting. f@ Q CellHeading. f@ Q CellBody. @@ QMapping Table Cell. f@ Q Bulleted\t. @@/Mapping Table Cell. f@ Q.$.Q.~...Body. @@ /Mapping Table Cell. @@ QMapping Table Cell. f@ Q H....D...Body. f@ QBody. f@ QH....D...Body. f@ QCellBody. f@ QCellBody. f@ Q CellBody. f@ Q BodySpaced. f@ Q Bulleted\t. f@ Q...Date. mf@ Ql. DateProject. @@ QHeader Double Line. f@T QHeading1Body. f@ Q NumberedSpaced.\t. f@ Q.Reading.  f@PQTitleBody. f@$Q.Line Single Line. f@ Q CellHeading. f@ Q Footnote. f@T QHeading2Body. f@T Q HeadingRunInBody. f@ Q Indented. f@ Q TableFootnote. f@T Q TableTitleT:Table : . f@NE Q Numbered1 N:.Numbered. f@NE Q Numbered1 N:.Numbered. $f@L Q$. Lettereda L:.. $f@L Q$. LetteredL:.. L̀Lf@N Q Numbered N:.< =1>. L̀Lf@N Q Numbered N:.< =1>. $f@L Q$. Lettereda L:.. $f@L Q$. LetteredL:..  Hf@ QH.. CodeComment. f@ Q BodyIndent. f@  $.6.Z.u..CodeASM. Hf@ QH.. CodeComment.  Q QQ Q / Q ڝQQEmphasis Q Q QQEquationVariables ڝQ /  BoldItalic QItalic QBold Q/ QQ  ComputerZZThinMediumDoubleThick@ Very Thin HHHHHFormat A HHHHHFormat AH Mapping Table HHHHHFormat BH Mapping Tableh65HHHHH$UDHH+4?HHH68?HH :C?HHHTDJ?HH*H ? @ h( A B C D E h  F G H I J h  K L M N O h  P Q R S T h( UVWXYh Z[\]^h_`abc7h defghChijklm]h(nopqrh stuvwh xyz{|h(}~h h    h  h h h)h  !"#$5h%&'()Oh  *+,-.[h!/ 0 1 2 3 uh "4!5!6!7!8!h!#9":";"<"="©h "T>#?#@#A#B#» %FC$D$E$ $&FF%G%H%6%'FI&J&K& &(FL'M'N'')FO(P(Q(((*FR)S)T)D()VFU*V*W*Vd ,FX+Y++Z+f +-F[,\,,],r ,.F^-_--`-~ -/Fa.b.n.c..0Fd/e/o/f//1Fg0h0p0i002Fj1k1q1l113Fm2n2r2o224Fp3q3s3r3 3Fs4t4t4u4h 9Fv5w5x5u5v5,d 7Fy6z6{6< 68F|7}7~7H7F888h P5Fw9x9y9z9{9hd ;F::::x :CF ;";#;$; =  <<<<> ====? >>>K >@ ???W ?A @@@c @W AAAHGQBB B!B ;F%C&C'C(Cd EF)D,D-D DFF.E/E0E EOF1FBFCFHBHQ8G9G:GGGHGIQHHIHJHKHHHQLIMINIOI K\J]J^J LJF_K`KaK MKFbLcLdL NLFeMfMgM OMFhNiNjN FNFkOlOmOh Q9F|P}P~PPPh RPFQQQQQh(SQRRR R RhTR S S SSSh #STTTTTVFUUU*UFVVVA WW WComment ;C ;Gd BlackT!WhiteddARedddGreendd BluedCyandMagentad YellowHeader/Footer $1Header/Footer $1Header/Footer $2Header/Footer $2IndexIndexCommentCommentSubjectSubjectAuthorAuthorGlossaryGlossaryEquationEquation Hypertext Hypertext  Cross-Ref Cross-Ref Conditional TextConditional TextPositionFMPrivatePositionFMPrivateRangeEndFMPrivateRangeEndFMPrivate HTML Macro HTML Macro M.Times.P Times-Roman FrameRoman M.Times.B Times-Bold FrameRoman M.Times.I Times-Italic FrameRoman M.Helvetica.BHelvetica-Bold FrameRoman M.Courier.PCourier FrameRomanM.Helvetica.BIHelvetica-BoldOblique FrameRoman FrameRomanbCourier. HelveticaPTimes!Regular$Roman MediumBoldRegular ObliqueItalic?ǶjU.|pWֈ,ʐ@Y*Z) ѽɦb(Wx°\ǎϾ*QZ abR}USSdX~lW |) C1XGM] KlRG~?4G|W:]>x !