|
From: Bryan T. <br...@sy...> - 2010-02-21 12:47:48
|
FYI, Here is an interesting thread from concurrency-interest. I believe that [1] is the AtomicMarkableReference suggestion referenced below. It is worth thinking about whether this might be a tool to solve some of our bottlenecks. I have not dug into the archives further, but I suspect that the context was striped queues drained by different threads sharing AtomicMarkableReference wrappers in order to achieve non-blocking takes. E.g., there is no need to synchronize across the queues for each thread since the mark (or timestamp) is atomically updated so you just take() in a loop until you can CAS the bit or timestamp and then you own that reference. However, I must say that I have observed high contentioon on CAS in some contexts. I expect that such designs will do less and less well as we move into many core computing. Bryan [1] http://cs.oswego.edu/pipermail/concurrency-interest/2006-September/003214.html -----Original Message----- From: con...@cs... [mailto:con...@cs...] On Behalf Of David Walend Sent: Friday, February 19, 2010 11:20 PM To: con...@cs... Subject: Re: [concurrency-interest] Use of j.u.c. constructs in open source projects > From: kedar mhaswade <ked...@gm...> > > Someone asked me if I knew open source projects where j.u.c. > constructs are > used heavily. > Her intent was to check out (study thoroughly) how these constructs > are put to (good) use. > > Does anyone on the list have any recommendation for such a project > (open source)? > SomnifugiJMS makes heavy use of BlockingQueues, a few Locks and Conditions, and this diabolical use of AtomicMarkableReferences that Tim Peierls suggested -- it does JMS message selectors without a database. I'm not sure I'd call it "good," but the code has been kicked around for about ten years. New bug reports have gotten pretty rare. https://somnifugijms.dev.java.net/ Hope that helps, Dave _______________________________________________ Concurrency-interest mailing list Con...@cs... http://cs.oswego.edu/mailman/listinfo/concurrency-interest |