From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3e3949298ed3b36 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: High CPU in tasking Date: Tue, 29 Jun 2004 18:26:07 +0100 Message-ID: <2kdn1gF169huU1@uni-berlin.de> References: <2k0fllF160eotU1@uni-berlin.de> <2k1114F15uoj8U1@uni-berlin.de> <2k346nF16pckjU1@uni-berlin.de> X-Trace: news.uni-berlin.de gf2u1vXeOXpRoyJzwKWdVQqknnNhOMxoMmrW1JBky5nRVCSlw= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Xref: g2news1.google.com comp.lang.ada:1999 Date: 2004-06-29T18:26:07+01:00 List-Id: "Lutz Donnerhacke" 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