P & V Algorithms needed

Geoffrey Cooper geof at imagen.UUCP
Tue Mar 11 03:30:37 AEST 1986


Mutex locking among N processors can be implemented using N single bit
variables.  The only restriction is that it be possible to write any
one variable without affecting the others.  It is not necessary that
reads and writes be atomic.

The algorithm works by having one variable associated with each
processor.  Each processor writes to its own variable and reads the
variables of all others.  Fairness is assumed not to be at issue.

I leave the details to you.

- Geof Cooper
  Imagen



More information about the Comp.sources.unix mailing list