lkml.org 
[lkml]   [1999]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: AVL trees vs. Red-Black trees
Oliver Xymoron wrote:
> > The self-adjusting property
> > should theoretically provide cache-like behaviour when most of the
> > lookups are to relatively few nodes in the tree. The downside is that
> > the tree is modified by lookups.
>
> Unfortunately, that means that there's no way it can even begin to scale
> on SMP - all "readers" need exclusive locks unless you can somehow
> guarantee that there'll only ever be one reader/writer. In some instances,
> it might make sense to have completely unlocked per-processor trees
> mapping onto shared structures, but it seems a little painful.

I didn't investigate, but I have a feeling it's possible to do shared
readers on these trees if the pointer changes are done in the right
order.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.644 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site