> From: Ronald Landheer-Cieslak [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 23, 2003 1:14 PM
> On Wed, Oct 22, 2003 at 07:26:07PM -0700, > [EMAIL PROTECTED] wrote: > > If you want to update [a reference counter], I don't see how you can > > guarantee updates will not collide [without locking], but I'm willing > > to be educated, if you can provide a link to a web resource. > "High Performance Dynamic Lock-Free Hash Tables and List-Based Sets" by > Maged M. Micheal. Requires a compare-and-swap (CAS) primitive (or load-linked/store-conditional, or some equivalent). Is one available on every architecture Xerces might be ported to? And if it is, who's going to code to each variant? How many processor families is Xerces running on now? If CAS were universally available, in itself it'd be sufficient to implement a thread-safe reference counter. No need to implement Michael's algorithm, nifty though it is. (There seems to be some interesting work going on with lockless or minimally-locking shared data structures lately, though. I just recently read the piece on IBM's DeveloperWorks site about Doug Lea's minimal-locking ConcurrentHashMap, which uses Java's garbage collection to avoid having to lock the list during deletions. Nice.) -- Michael Wojcik Principal Software Systems Developer, Micro Focus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]