19-Deadlock

19-Deadlock - Deadlock Learning Objectives Deadlock and...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Copyright ©: Nahrstedt, Angrave, Abdelzaher Deadlock Learning Objectives Deadlock and starvation definitions Examples of deadlock Conditions Resource Allocation Graphs
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright ©: Nahrstedt, Angrave, Abdelzaher Deadlock & Starvation Definitions What is a deadlock? A process is deadlocked if it is waiting for an event that will never occur. Typically, but not necessarily, more than one process will be involved together in a deadlock (the deadly embrace ). Is deadlock the same as starvation ' indefinitely postponed'? A process is indefinitely postponed if it is delayed repeatedly over a long period of time while the attention of the system is given to other processes. i.e., logically the process may proceed but the system never
Background image of page 2
Copyright ©: Nahrstedt, Angrave, Abdelzaher Using Semaphore to Share Resource Process P(); { A.Wait(); B.Wait(); use both resources B.Post(); A.Post(); } Process Q(); { A.Wait(); B.Wait(); use both resources B.Post(); A.Post(); } 4 2 3 External Semaphore A(1), B(1); External Semaphore A(0), B(1); 2 External Semaphore A(0), B(0); 3 External Semaphore A(0), B(1); 4 External Semaphore A(1), B(1); 5 5 0 6
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright ©: Nahrstedt, Angrave, Abdelzaher Scenario #2 Process P(); { A.Wait(); B.Wait(); use both resources B.Post(); A.Post(); } Process Q(); { B.Wait(); A.Wait(); use both resources A.Post(); B.Post(); } 3 2 1 1 External Semaphore A(1), B(1); 1 External Semaphore A(0), B(1); 2 External Semaphore A(0), B(0); 3
Background image of page 4
Copyright ©: Nahrstedt, Angrave, Abdelzaher Deadlock Mechanism for Deadlock Control
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright ©: Nahrstedt, Angrave, Abdelzaher Seems simple enough …?
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 27

19-Deadlock - Deadlock Learning Objectives Deadlock and...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online