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 -> 10

Search | Site Map

[ Questions or Comments ]

Lecture 6: Slide 10 of 61

Algorithm 1
  • Shared variables: -


    int turn; //turn can have a value of either 0 or 1
    //if turn = i, P(i) can enter it's critical section
  • Process Pi

     do      
    {
    while (turn != i)
    {
    /*do nothing*/
    }
    critical section
    turn = j;
    remainder section
    }
    while (true)
  • Satisfies mutual exclusion, but not progress.

[ Questions or Comments ]

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

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:56:51 2001 by webmaster