This month's Dobbs has an interesting article on lock free queues. Basically, The philosophy is : A pop and an insert should not be race-condition-ing each other. Most Queue implementations would lock the underlying data store (list or array) and hence causing the race between get() and put(). The article goes on to define how you can make your high contention programs less contending, by simply reducing the lock range. Its an interesting read. The article used C++ for examples. I was keen on a Java implementation.
Java 5 introduced a BlockingQueue interface. The default implementations provided, viz. ArrayBlockingQueue, DelayQueue, LinkedBlockingDeque, LinkedBlockingQueue, PriorityBlockingQueue, SynchronousQueue. But they dont seem to be lock free, are they? OR do we see another implementation coming in JDK 7?
There are other articles.. Read here..
Java 5 introduced a BlockingQueue interface. The default implementations provided, viz. ArrayBlockingQueue, DelayQueue, LinkedBlockingDeque, LinkedBlockingQueue, PriorityBlockingQueue, SynchronousQueue. But they dont seem to be lock free, are they? OR do we see another implementation coming in JDK 7?
There are other articles.. Read here..