Re: Lock Free -- where to start
- From: David Butenhof <david.butenhof@xxxxxx>
- Date: Wed, 28 Sep 2005 17:21:12 GMT
Joe Seigh wrote:
David Schwartz wrote:Let me just give you my general caveat about lock free code. First, lock free code is generally non-portable and extremely complex. Such code can easily contain bugs that are extremely difficult even for experts to spot. The complexity is almost always unnecessary.[...]
Lock free algorithms work great in kernels and low level threading libraries for a variety of reasons. Portability is not that important. The probability that there are other things to do is lower in core code (because everything passes through it). But for application code, or even most libraries on top of threading libraries, it's a pure loss.
So Java isn't portable or they shouldn't have put support for lock-free in Java or what?
Java isn't just a language, or a compiler, or a runtime library. It's also the MACHINE -- or at least the portable definition of a Virtual Machine. It can specify its own rules, and the engineers who PORT the Java VM have to do whatever is necessary (easy, hard, fast, slow, whatever) to follow those rules for the target machine.
POSIX, on the other hand, can specify only "tweaks" on the language, place loose requirements on the compiler, and provide a specification for part of a runtime library... and can't say anything at all about the machine.
The two cases are exactly the same except that everything is different.
-- Dave Butenhof, David.Butenhof@xxxxxx HP Utility Pricing software, POSIX thread consultant Manageability Solutions Lab (MSL), Hewlett-Packard Company 110 Spit Brook Road, ZK2/3-Q18, Nashua, NH 03062 .
- References:
- Lock Free -- where to start
- From: Imre Palik
- Re: Lock Free -- where to start
- From: David Schwartz
- Re: Lock Free -- where to start
- From: Joe Seigh
- Lock Free -- where to start
- Prev by Date: Re: Linux NPTL anomally
- Next by Date: Re: Proxy GC
- Previous by thread: Re: Lock Free -- where to start
- Next by thread: Re: Lock Free -- where to start
- Index(es):
Relevant Pages
|