Peterson's Algorithm

Peterson's algorithm is a concurrent programming algorithm for mutual exclusion that allows two processes to share a single-use resource without conflict, using only shared memory for communication.
  f0   := 0;  f1   := 0;  last := 0;    p0: f0 := 1;                    p1: f1 := 1      last := 0;                      last := 1      REPEAT                          REPEAT      UNTIL f1 = 0 OR last != 0;      UNTIL f0 = 0 OR last != 1;        { critical section }            { critical section }        f0 := 0;                        f1 := 0; 

See also

Dekker's algorithm
    

 

<< PreviousWord BrowserNext >>
schnews
equal rites
national indoor football league
libre society
drywall
gordon cooper
black woodpecker
libre manifesto
bleaching agent
kon tiki
howard cosell
sholom aleichem
selby
university of essex
adipocere
mahavir jayanti
lactate dehydrogenase
wrasse
prime counting function
john bowker
john hope, 1st marquess of linlithgow
history of new york
trick (movie)
ferdinand foch
particle horizon
attacks on humanitarian workers
zhongnanhai
upper providence township, pennsylvania
united front
archerfish
list of national basketball association players
the haunted
qualitative psychological research
morcar, earl of northumbria
common name
bakewell
brazing
spiced bun
adam loftus
music of iowa
jude
lizard (comics)
pvo
dore