M/G//GD/ / System! Pollcze-Khnchn (PK) Equton L q 2 2 λ σ s 2( + ρ ρ! Stedy-stte probbltes! π 0 ρ! Fndng L, q, ) 2
2 M/M/R/GD/K/K System! Drw the trnston dgrm! Derve the stedy-stte probbltes:! Fnd L,L q,, q R repr people K mchnes + + K R R R R K R K R 2,...,,,!! 0,,...,, 0 0 π ρ π ρ π
Exmple! The Gothm Townshp Polce Deprtment hs 5 ptrol crs. A ptrol cr bres down nd requres servce once every 30 dys. The polce deprtment hs two repr worers,ech of whom tes n verge of 3 dys to repr cr. Bredown tmes nd repr tmes re exponentl.! E(# polce crs n good condton)! E(down tme for cr needng reprs)! Frcton of tme prtculr repr worer s dle 3
Queues n Seres s,µ s 2,µ 2 s,µ Jcson s Theorem: If! Interrrvl tmes re exponentl, rte λ! Servce tme t ech server s exponentl! Ech stge hs nfnte cpcty wtng room Interrrvl tmes for ech stge exponentl, rte λ If λ < s µ, ech stge s M/M/s /GD/ / system. 4
Exmple 2! The lst two thngs tht re done to cr before ts mnufcture s complete re nstllng the engne nd puttng on the tres. An verge of 54 crs per hour rrve requrng these two tss. One worer s vlble to nstll the engne nd cn servce 60 crs per hour. After the engne s nstlled, the cr goes to the tre stton nd wts for ts tres to be ttched. Three worers serve t the tre stton. Ech wors on one cr t tme nd cn put tres on cr n n verge of 3 mnutes. Both nterrrvl tmes nd servce tmes re exponentl. Determne:! E(queue length t ech wor stton)! Totl E(tme cr spends wtng for servce) 5
Open Queung Networs s,µ s 2,µ 2 r r 2 p r 3 s 3,µ 3 s,µ! If λ < s µ for ll sttons, r! ech stge s M/M/s /GD/ / system.! L L + L 2 + + L! λ r + r 2 + + r, L/λ 6
Exmple 3! TO servers: An verge of 8 customers rrve from outsde t server, nd n verge of 7 customers per hour rrve from outsde t server 2. Interrrvl tmes re exponentl. Server cn serve t n exponentl rte of 20 customers per hour, nd server 2 cn serve t n exponentl rte of 30 customers per hour. After completng servce t server, hlf of the customers leve the system, nd hlf go to server 2. After completng servce t server 2, ¾ of the customers complete serve, nd ¼ return to server.! ht frcton of the tme s server dle?! Fnd E(# customers t ech server)! Fnd E(tme customer spends n the system)! ht f server 2 could serve only 20 customers per hour? 7
M/G/s/GD/s/ System! L,L q,, q re of lmted nterest! Queue never forms so L q q 0! s /µ! Frcton of rrvls turned wy λπ s! L L s λ( π s )/µ! Erlng s Loss Formul: π s depends only on λ /µ 8
Exmple 4! An verge of 20 mbulnce clls per hour re receved by Newport Hosptl. An mbulnce requres n verge of 20 mnutes to pc up ptent nd te the ptent to the hosptl. The mbulnce s then vlble to pc up nother ptent. How mny mbulnces should the hosptl hve to ensure tht there s t most % probblty of not beng ble to respond mmedtely to n mbulnce cll? Assume tht nterrrvl tmes re exponentlly dstrbuted. 9
Queung Dscplnes! FCFS Frst Come Frst Serve! SIRO Servce In Rndom Order! LCFS Lst Come Frst Serve! E( FCFS ) E( SIRO ) E( LCFS )! Vr( FCFS ) < Vr( SIRO ) < Vr( LCFS ) 0
Prorty Queues! q E(type customer s wtng tme)! E(type cust tme n system)! L q E(# type customers n lne)! L E(# type customers n system)
2 M /G //NPRP/ / System q q q n q L L S E λ µ λ λ +,, ) )( 2( ) ( Then 2 If < n ρ 0, 0, ρ µ λ ρ
Prorty Queue Exmple! A copyng fclty gves shorter obs prorty over long obs. Interrrvl tmes for ech type of ob re exponentl, nd n verge of 2 short obs nd 6 long obs rrve ech hour. Let type ob short ob nd type 2 ob long ob. Then we re gven tht E(S)2 mn, Vr(S)2, E(S2)4 mn, Vr(S2)2. Determne the verge length of tme ech type of ob spends n the copyng fclty. 3
Prorty Q E.g. 2! Gothm Townshp hs 5 polce crs. The polce dept receves two types of clls: emergency (type ) nd nonemergency (type 2) clls. Interrrvl tmes re exponentlly dstrbuted, wth n verge of 0 emergency nd 20 nonemergency clls ech hour. Ech cll type hs exponentl servce s, wth men of 8 mnutes (ssume tht, on the verge, 6 of the 8 mnutes s trvel tme from the polce stton to the cll nd bc to the stton). Emergency clls re gven prorty over nonemergency clls. On verge, how much tme wll elpse between the plcement of nonemergency cll nd the rrvl of polce cr? 4
Customer-Dep tng Costs! Assgn prorty such tht! c µ c 2 µ 2 c n µ n! Shortest Processng Tme (SPT) Dscplne:! Let c! µ µ 2 µ n! /µ /µ 2 /µ n 5
6 M /G /s/nprp/ / System q q q q L L s s P λ µ λ µ +,, ) )( ( ) ( Then If < n ρ ρ s 0, 0, ρ µ λ ρ
Prorty Queue E.g. 3! Consder computer system to whch two types of computer obs re submtted. The men tme to run ech type of ob s /µ. The nterrrvl tmes for ech type of ob re exponentl, wth n verge of λ type obs rrvng ech hour. Consder the followng three stutons:! Type obs hve prorty over type 2 obs, preempt! Type obs hve prorty over type 2 obs, no preempt! All obs re servced on FCFS bss.! Under whch system re type obs best off? orst off? ht bout type 2 obs? 7
M /G //PRP/ / System Preemptve resume vs. preemptve repet ( / µ )( ), 0 0, λ µ 8