Carl Lowenstein wrote:
> You lost me somewhere. How is "whoever's turn it is" determined?
As long as everyone can look at the shared state and come to the same
conclusion, it doesn't matter.
Stewart Stremler wrote:
A sort of cooperative token-ring?
Sorta.
It falls over if there's nobody waiting for that memory. The process
that has it can't give it to anyone, as there's no-one who wants the
access.
Well, I gave an off-hand description of the process. Obviously you can
(for example) limit it to two processes that are frequently ready (say,
producer and consumer). If you want something more complex, there are of
course ways of doing it.
It seems like it would be slow. And consume a lot of memory.
Depends on how many processes you have, etc.
The point wasn't that this was necessarily a good way of working it. The
point was to prove you don't need test-and-set or any other atomic
mechanism.
I think they call that an "interrupt disable".
Which is not something you typically have access to in a HLL.
Well, only one, AFAIK.
--
Darren New / San Diego, CA, USA (PST)
His kernel fu is strong.
He studied at the Shao Linux Temple.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg