begin quoting Darren New as of Wed, May 02, 2007 at 05:38:25PM -0700: > 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. Well, eliminating starvation gets trickier.
> Stewart Stremler wrote: > >A sort of cooperative token-ring? > > Sorta. It's sort of sort of a cooperative token-ring? What does that mean? > >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's sounding like it's less and less a good general-purpose approach and more and more a specific-problem approach. > >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 True, true. Good point. > point was to prove you don't need test-and-set or any other atomic > mechanism. Well, you need atomic reads and writes of memory. That's how you get the non-corruption of your memory. So while you don't have test-and-set, you still get atomic. Hm. If each CPU communicated with memory via shared ethernet... > >>I think they call that an "interrupt disable". > >Which is not something you typically have access to in a HLL. > > Well, only one, AFAIK. ? -- It's hard to disable interrupts in a multiprocessor machine. Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
