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vB]J0BcO?u[@HG3nyWXBXP[@hWXnJN\a^eJ3\'@h^UMKOQBXh@M_YmM_BXIeJ3>UM_JLV5IiF\[V5IjAC@HA¢g5GNBE\KG3BEJonZBXIu[@HGNO3BE\KIUOM[G3BcO3@y`>5@hI§J3GTM[ACBEJ3BX\[IjM_WJ3@HST>UI5BXmV5@dOw|}\KGaO3>UM[G3BXI5Y I5\KICz{g5G3@H@h^MKO?OQ@H^<M[g5>5\KG3@dOq\[G^<\[I5BEJ3\KGNO?M[G3@AC@hg5WX\ln[@dABXIbGN@HM_WEzJ3BX^a@ M_gUg5WEBcShM_J3BX\[IUOHr\KONOQBXi5WXnLJN>5@ OQBX^az
r
Version 2 CSE, IIT Kharagpur
lock(CR) T1 needs non−preemptable resource CR being held by T5 T1 T1 undergoing unbounded priority inversion T2
T1 gets non−preemptable resource CR held by T5
T5 preempted by T4
T3 T4
unlock(CR) lock(CR)
T5 t1
t2
t3
t4
t5
time
tn
; BXY[V5GN@ !Z tImiF\[VUIUAC@HA&G3BX\[GNB]Jon£IuK@hGTOQBX\[I g5WX@HOQJ0`?MnyJ3\yMuK\[BcAyg5GNBX\[GNB]JonyBXIu[@HGNO3BE\KIUO?BcO?J3\g5GN@huK@hImJ0g5GN@h@H^ag5J3BX\[Ie¥~|}GN\[^f& VUONM_YK@d¦\_|J3>U@WE\l`g5GNBE\KG3BEJonJNMKOQP>5\[WcACBXI5YM ShG3BEJ3BcShM[W!G3@dOQ\KV5GNSh@tinyBXImJ3@hGN^<@HACBcMlJN@ g5G3BX\[GNBEJon<JNM[O3PCOhr=?>5BcOShM[IiF@M[ST>5BX@huK@HAbimnbGNM[BXO3BEIUYJN>5@g5GNBE\KG3BEJon<WE@Hu[@hW!\[|JN>5@WE\l`¤g5G3BX\[GNBEJon JTM[O3PJN\iF@<@HmVUM[WJN\bJN>UMlJ \_|qJN>5@a`M[B]JNBEI5Y>5BXY[>Zg5G3BX\[GNBEJonbJTM[O3PFr£IZ\_JN>5@hG`\KGN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