comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nick.roberts@acm.org>
Subject: Re: High CPU in tasking
Date: Tue, 29 Jun 2004 18:26:07 +0100
Date: 2004-06-29T18:26:07+01:00	[thread overview]
Message-ID: <2kdn1gF169huU1@uni-berlin.de> (raw)
In-Reply-To: slrncdvlt6.nt.lutz@taranis.iks-jena.de

"Lutz Donnerhacke" <lutz@iks-jena.de> wrote in message
news:slrncdvlt6.nt.lutz@taranis.iks-jena.de...

> ...
> Honestly, I do not understand your pragraph, but I will try to read
> about caching techniques. Thanks for the hint.

I think you might find this web page interesting:

   http://linux0.cs.uaf.edu/als_proceedings/papers/sears/sears_html/

> > If you would be willing to show the relevant code, and describe
> > your application's goals and design in a bit more detail, I'd be
> > very interested.
>
> package Ringbuffers is
> ...

Looking at this briefly, I can make some comments based on a guess at the
design and required functionality.

I suspect that one thing you need to do is to make Register an entry, and
allow the writer to wait for space in the buffer if necessary (because it
has got too advanced on the readers).

Do you need to explicitly unregister positions? If you registered with an
initial count (which would always be the number of readers), Notify could
decrement the count, and when the count goes down to 0, you assume the
position is unregistered.

I suspect the data itself ('buffer') doesn't need to go into the protected
object, only registrations. Then I don't think you would need to have Get or
Put (and so no need for a family of entries for Get); just have a shared
array.

If these suggestions make any sense, I'd be happy to suggest more detailed
code, if you wish!

-- 
Power to your elbow,
Nick Roberts





  reply	other threads:[~2004-06-29 17:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 15:43 High CPU in tasking Lutz Donnerhacke
2004-06-24 17:00 ` Nick Roberts
2004-06-24 20:25   ` Lutz Donnerhacke
2004-06-24 21:56     ` Nick Roberts
2004-06-25  7:34       ` Lutz Donnerhacke
2004-06-25 17:03         ` Nick Roberts
2004-06-28  8:32           ` Lutz Donnerhacke
2004-06-29 17:26             ` Nick Roberts [this message]
2004-06-30 12:26               ` Lutz Donnerhacke
2004-06-30 23:39                 ` Randy Brukardt
2004-07-01  7:02                   ` Lutz Donnerhacke
2004-06-25 21:15 ` Mark Lorenzen
2004-06-26  8:01 ` Wojtek Narczynski
2004-06-28  8:17   ` Lutz Donnerhacke
replies disabled

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