Unit 4
Unit 4
Tyand suppose T; starts execution at Ame ft Toeks Sy Asn
157i intated_ and it peeps T, ong to is higher priority. At time 1,7,
locks $- At me 1,7 altempl 19 lock S, bu is blocked because, has
finished with it Ty 5 which now inherits the prioity of Ty starts executing
ioweve, when atime res o lock Sit eanot do so since has Tock nit
Both, and T, are now deadlocked.
“There is anaher drawback of priority inheritance. It is possible forthe high
Fniorty tsk to be blocked once by every ober tsk executing, on the sam
processor.
‘To get around both problems, we define the priority eiling protocol. T|
plot cling ofa semaphore i the highest priority of any task that may look
Lat PT) denote the prioity of task T and P(S) the priority elling ofthe seman
oferta eatin,
=
late
sen
Baer
ee
eet
le
ei
ey eng OUD 8 ae we ay
ask 638 al80 be blocked frm eeqng et i
corre held by sme other at ya Ca
i, hone
1 the priority of T ony cigs gra
y ropa Fh ry in a sing,
“re pity cling protocol prevents desde
et B, be the st ofall ei
sections hal can ease te
‘and 1(2 be the time ten for seston to beeen ene
mx ted. The, Tw
tHocked frat most" ),
‘The highest pron
the processor (Le. it is blocked) whene
a er seeks 10 ack the
semaphoisgurdng «citi secon whichis aeay ey
some ther tke Q (in hich case itis nid we ae
‘or when there exists a semaphore $! Hosked by tsk),
sk Tsai
POcessr.Telngies
locked by
ory exling eon
whose priority ecling or gett than or ql the pty off
er uote aera
pore tow oaety weer ta oon re
i tly ua cmay sua er
‘Suppose. blocks one or mare sks. Then it aber the pity
task that it" is cumently. blocking, The operons of pity
inheritance and resumption of previous pray rind,
Priori ineritanee is transitive,
‘A task Ty can preempt another tsk T, iT, oe ot ol el
seotion which T, curently needs and ithe cures ity of
rater than that ofthe curetpioity oT
Fig, 4.10, Priori cling preaem alin FeSBTD
ements wing He rin ling pes
6:2.2. Pamemtn Eatin Denti FZ IE Bigot
fs gcsne slong, See TOF sprites io
oninte tative is ie extice. EDF in 2 Grate perky Sebo wipers,
so Gna spe Sep, ee ech
piecing der
‘Soe ade UD) ie lit Se aie et
‘exargie
‘Comite te folowing vt of (asin eave to ween.
[Teme
| “Fork | Arrival Vine | Execution Time | Absolute Deadline |
o w 3
2 3 10
7 fs w as]
Tin oly ak wing ran wn vo as er
latipes pty an 1
wna Ty ave
immcditely Y aives atime 4
vce tT, aives a tne 3; however since dy > a, slower privity Ua
fr Fk finish. When T iiss (at time 7). T start (sine
at which point ean resume aot a)
11 and must
has higher pony dT). run un 1
to completion
& EDF ts an opti! wigrocessor Seheduling algorithm, That is, i EF
cannot feasibly schedule task se on # uniprovessr, there is 19 ot
setedangalgovitin that ean.
& Ifa the tks are periodic and have relative deadline equal 1 te
pets the test fr tak, Set schedulabity i particulary simple
the total ilzation ofthe task set no greater than 1, de ask et
‘be easily schedule on a ingle processor by the EDF algoritun.
Scheduling Test for EDF
Define U= Ee, 7P.) daar ™ 2H, {dl} and P= LEM (ys Pa
Zo wth increased service RIS) a,
Mie reward funtion associated with a0 TS skier
se given tit Typically the reward function isos fan
ib the ote
0 ite