comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Multitasking and containers
Date: Wed, 29 Nov 2006 19:43:52 +0100
Date: 2006-11-29T19:43:44+01:00	[thread overview]
Message-ID: <1n5e3el4so5e4.isypc4vxqcu3$.dlg@40tude.net> (raw)
In-Reply-To: 1164741453.397227.86070@h54g2000cwb.googlegroups.com

On 28 Nov 2006 11:17:33 -0800, Matthew Heaney wrote:

> The issue with hash tables is not the computation of the hash value,
> but rather if the hash function is poor and there are many collisions.
> If that's the case then the time to compare the key to items already in
> that bucket will be large compared to the cost of computing the hash
> value itself.

Yes. This is why one should look into the container, as I said before. You
lock not the container as a whole, but the bucket. The advantage is that in
this case you can lock buckets in a preemptive way, lifting the problem of
too long waits, while loosing little: doubled overhead of a protected
action. This is how our middleware works. Actually it is just a specialized
hash table of process variables. Because it were too expensive to maintain
a lock per bucket, I grouped them into a lesser number of "access
channels."

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2006-11-29 18:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-24  8:51 Multitasking and containers Maciej Sobczak
2006-11-24 10:11 ` Georg Bauhaus
2006-11-24 10:19 ` Dmitry A. Kazakov
2006-11-24 10:35   ` Maciej Sobczak
2006-11-24 11:14     ` Dmitry A. Kazakov
2006-11-24 12:13       ` Matthew Heaney
2006-11-27  4:17         ` Jeffrey R. Carter
2006-11-27 10:30           ` Georg Bauhaus
2006-11-27 18:41             ` Jeffrey R. Carter
2006-11-27 18:57               ` Dmitry A. Kazakov
2006-11-27 19:45               ` Matthew Heaney
2006-11-27 21:15                 ` Simon Wright
2006-11-28  1:43                 ` Dr. Adrian Wrigley
2006-11-28  2:19                   ` Matthew Heaney
2006-11-28  8:50                     ` Dmitry A. Kazakov
2006-11-28 10:31                       ` Georg Bauhaus
2006-11-28 11:24                         ` Dmitry A. Kazakov
2006-11-29  8:51                           ` Georg Bauhaus
2006-11-28 17:12                       ` Matthew Heaney
2006-11-28 18:21                         ` Dmitry A. Kazakov
2006-11-28 19:17                           ` Matthew Heaney
2006-11-29 18:43                             ` Dmitry A. Kazakov [this message]
2006-11-29 10:14                       ` Maciej Sobczak
2006-11-29 15:50                         ` Matthew Heaney
2006-11-24 12:12     ` Matthew Heaney
2006-11-24 12:05   ` Matthew Heaney
2006-11-24 12:02 ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox