1 / 12

Priority Inheritance Protocols An Approach to Real Time Synchronization

Priority Inheritance Protocols An Approach to Real Time Synchronization. LUI SHA ,RAGUNATHAN RAJKUMAR ,JOHN P.LEHOCZKY IEEE TRANSACTIONS ON COMPUTERS, VOL. 39, NO. 9, SEPTEMBER 1990 Repesent : Shu Wei Ho. Outline. Motivation Simple solution Basic priority inheritance protocol(BIP) Deadlock

emil
Download Presentation

Priority Inheritance Protocols An Approach to Real Time Synchronization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Priority Inheritance Protocols An Approach to Real Time Synchronization LUI SHA ,RAGUNATHAN RAJKUMAR ,JOHN P.LEHOCZKY IEEE TRANSACTIONS ON COMPUTERS, VOL. 39, NO. 9, SEPTEMBER 1990 Repesent : Shu Wei Ho

  2. Outline • Motivation • Simple solution • Basic priority inheritance protocol(BIP) • Deadlock • Chain blocking • Priority ceiling protocol(PCP) • Conclusion

  3. Motivation • Data Synchronization • Ex.

  4. Simple solution • Critical section(nonpreempt) • Ex.

  5. Basic priority inheritance protocol (BIP) • Chain blocking PCP .. t0 : J0 -> X J1 -> X J2 -> P2 (exe) t1 : J0 -> X J1 -> P1 (exe) J2 -> P2 ta : J0 -> X J1 -> P1 (exe) J2 -> P2 t2 : J0 -> P0 (exe) J1 -> P1 J2 -> P2 t3 : J0 -> blocked by J2(S1) J1 -> P1 J2 -> P2 -> inherit -> P0 (exe) t4 : J0 -> P0 (exe) J1 -> P1 J2 -> P0 -> P2 t5 : J0 -> blocked by J1(S2) J1 -> P1-> inherit -> P0 (exe) J2 -> P2 t6 : J0 -> P0 (exe) J1 -> P0 -> P1 J2 -> P2 t7 : J0 -> X J1 -> P1 (exe) J2 -> P2 t8 : J0 -> X J1 -> X J2 -> P2 (exe)

  6. Deadlock 'Thread 1 SyncLock LeftVal SyncLock RightVal 'Perform operations on LeftVal and RightVal that require read and write. End SyncLock End SyncLock 'Thread 2 SyncLock RightVal SyncLock LeftVal 'Perform operations on RightVal and LeftVal that require read and write. End SyncLock End SyncLock PCP

  7. Priority ceiling protocol(PCP) • Set priority to each critical section Use S0-> J0(H)-> priority of S0 = P0(J0) S1-> J2 J1(H)-> priority of S1= P1(J1) S2-> J2 J1(H)-> priority of S2= P1(J1)

  8. Priority ceiling protocol(PCP) • Terminology • Task priority ( Jn -> Pn) • Resource Ceiling /System Ceiling (SC) • Inheritance Priority • Protocol • Priority driven scheduling • Lock/Unlock • Block/Unblock

  9. Example .. t0 : J0 -> X J1 -> X J2 -> P2 (exe) SC -> Lowest ta : J0 -> X J1 -> X J2 -> P2(attempt to lock S2)>SC (Lowest)(exe) SC -> Lowest->(P1, J2(S2)) t1 : J0 -> X J1 -> P1 (preempt) (exe) J2 -> P2 SC -> (P1, J2(S2)) t2 : J0 -> X J1 -> P1 (attempt to lock S2)≯SC(P1) J2 -> P2->inherit->P1 (exe) SC ->(P1, J2(S2)) t3 : J0 -> X J1 -> P1 J2 ->(attempt to lock S1)P1≯SC(P1) but self (exe) SC -> (P1, J2(S2)) t4 : J0 -> P0(preempt) (exe) J1 -> P1 J2 -> P1 SC -> (P0, J2(S1)) t5 : J0 -> (attempt to lock S0) P0≯SC(P0) J1 -> P1 J2 -> P1->inherit J0 -> P0 (exe) SC -> (P0, J2(S1)) t6 : J0 -> (attempt to lock S0) P0>SC(P1) (exe) J1 -> P1 J2 -> P1 SC -> (P0, J2(S1))->(P1, J2(S2))->(P0, J0(S0)) tb : J0 -> (attempt to lock S1) P0 >SC(P1) (exe) J1 -> P1 J2 -> P1 SC -> (P1, J2(S2))->(P0, J1(S1)) t7 : J0 -> end J1 -> P1( attempt to lock S2)≯SC(P1) J2 -> P1 (exe) SC -> (P1, J2(S2)) t8 : J0 -> end J1 -> P1(attempt to lock S2)>SC(lowest) (exe) J2 -> P2 SC -> (P1, J2(S2))->Lowest -> (P1, J1(S2)) t9 : J0 -> end J1 -> end J2 -> P2 (exe) SC -> Lowest Priority of S0 = P0 S1 = P1 S2 = P1

  10. Example • Deal with deadlock BIP

  11. Example • Deal with chain blocking BIP ta : J0 -> X J1 -> (attempt to lock S2)P1< SC(P0) J2 -> J2 -> inherit -> P1 (exe) SC -> (P0, J2(S1))

  12. Conclusion • It showed that both protocols solve the uncontrolled priority inversion problem. • In particular, the priority ceiling protocol prevents deadlocks and reduces the blocking to at most one critical section.

More Related