From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: task-safe hash table?
Date: Thu, 1 Jun 2006 22:07:41 +0200
Date: 2006-06-01T22:07:28+02:00 [thread overview]
Message-ID: <edjojeeb1lwl$.gqavpe4tqkfp.dlg@40tude.net> (raw)
In-Reply-To: NZqdnY-dor_w3eLZnZ2dnUVZ_s-dnZ2d@comcast.com
On Thu, 01 Jun 2006 14:30:53 -0500, tmoran@acm.org wrote:
>>> I think you might be able to get part way by consulting the original
>>> Booch components.
>>
>> The 95 BCs were going to have Synchronized and Guarded extensions, but
> The app I had in mind was the k-nucleotide shootout benchmark, which
> uses a hash table, running on a multi-core cpu. If lookups are read-only,
> and are much more frequent than writes, one should be able to do them
> concurrently. Since a lookup in a hash table is, presumably, pretty fast,
> the overhead of making it Protected would probably kill the gain.
Functions on protected objects could potentially run in parallel on a
multi-core CPU. Does anybody know if GNAT does this?
> But one
> ought to be able to arrange things so a concurrent lookup that comes back
> with a hit is correct, ie most of the time, while one that comes back "we
> need to add this" would be rare enough that interlocking for a second
> check and possible add wouldn't cancel the wall clock savings.
What about a window in which each task makes, say, n searches. n is the
window size. All misses are postponed till the window end. At that point
the tasks synchronize on a protected object (the entry count = number of
tasks) and here all insertions are made (some of them could be duplicates).
Then the next windows starts.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2006-06-01 20:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 21:42 task-safe hash table? tmoran
2006-05-29 22:56 ` John
2006-05-30 0:18 ` tmoran
2006-05-30 3:50 ` John
2006-05-30 4:35 ` tmoran
2006-05-30 9:50 ` Georg Bauhaus
2006-06-01 6:32 ` Simon Wright
2006-06-01 19:30 ` tmoran
2006-06-01 20:03 ` Ludovic Brenta
2006-06-01 20:07 ` Dmitry A. Kazakov [this message]
2006-06-02 4:31 ` Jeffrey R. Carter
2006-06-02 10:36 ` Stephen Leake
2006-06-03 6:50 ` tmoran
2006-06-03 20:40 ` tmoran
2006-06-02 10:35 ` Stephen Leake
2006-06-02 20:19 ` tmoran
2006-06-03 21:10 ` M E Leypold
2006-06-04 0:23 ` tmoran
2006-06-04 12:55 ` Stephen Leake
2006-06-04 17:22 ` tmoran
2006-06-08 1:10 ` Stephen Leake
2006-06-11 13:29 ` Georg Bauhaus
2006-06-04 17:48 ` Simon Wright
2006-06-05 0:23 ` tmoran
2006-06-05 21:57 ` Steve Whalen
2006-06-06 11:10 ` Ole-Hjalmar Kristensen
2006-05-30 15:00 ` 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