Central Queensland Univeristy

MyInfocom

Faculty of Informatics and Communication

Olive - 85349 Home RealAudio Previous Slide Lecture Home Previous Slide 85349 Help 85349 Study Schedule

You are here: 85349 -> Resources -> Lectures -> 6 -> 25

Search | Site Map

[ Questions or Comments ]

Lecture 6: Slide 25 of 61

Deadlock and Starvation
  • Deadlock - two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes.
  • Let S and Q be two semaphores initialized to 1
    P0

    wait(S);
    wait(Q);
    .
    .
    .
    signal(S);
    signal(Q);

    P1

    wait(Q);
    wait(S);
    .
    .
    .
    signal(Q);
    signal(S);

  • Starvation - indefinite blocking. A process may never be removed from the semaphore queue in which it is suspended.

[ Questions or Comments ]

You are here: 85349 -> Resources -> Lectures -> 6 -> 25

Search | Site Map

Olive - 85349 Home RealAudio Previous slide Lecture home Next slide 85349 Help 85349 Study Schedule
Edit | © Central Queensland University
Last modified: Mon Apr 2 15:57:06 2001 by webmaster