[concurrency-interest] Lock-free mania

David Holmes dcholmes at optusnet.com.au
Mon Apr 16 18:30:43 EDT 2007


Szabolcs Ferenczi wrote:
> On 16/04/07, David Holmes <dcholmes at optusnet.com.au> wrote:
>
> > .... Taking threads off processors and placing them back later
> > incurs a lot of overheads, cools caches etc and can greatly lower
> > concurrency.
>
> It depends on the hardware. For instance, if a processor is especially
> designed for multi-tasking, context switch can be very inexpensive. An
> example was the Transputer

You asked why people use lock-free algorithms and I explained it to you.
Nobody on this list in running Java on a transputer, so its irrelevant. When
I discuss Java SE and the JDK I'm assuming we're considering the platforms
where Java SE runs. I'm not trying to make comments that cover every
conceivable piece of computing hardware. I suggest you go and read a lot of
literature on the subject to understand where the motivation comes from.


Many forms of optimization induces some coupling with the hardware - but
these are not things that change overnight. If it turns out that lock-free
doesn't work as well on future architectures then we'll replace it with
something else as needs be. That's how the real world works: there's a need,
then a solution, and if the need changes or the solution stops working, we
adapt and come up with a new solution. It's called "engineering".

Cheers,
David Holmes



More information about the Concurrency-interest mailing list