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!proxad.net!newsfeed.icl.net!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: High CPU in tasking Date: Wed, 30 Jun 2004 12:26:21 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <2k0fllF160eotU1@uni-berlin.de> <2k1114F15uoj8U1@uni-berlin.de> <2k346nF16pckjU1@uni-berlin.de> <2kdn1gF169huU1@uni-berlin.de> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1088598381 4698 217.17.192.37 (30 Jun 2004 12:26:21 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Wed, 30 Jun 2004 12:26:21 +0000 (UTC) User-Agent: slrn/0.9.8.0 (Linux) Xref: g2news1.google.com comp.lang.ada:2006 Date: 2004-06-30T12:26:21+00:00 List-Id: * Nick Roberts wrote: > "Lutz Donnerhacke" wrote in message >> 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/ Thanx. >> package Ringbuffers is > > 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). Nope. "Put" is a procedure and therefore will not wait for any reader. The readers call an entry (and are identified by the parameter of the entry family, in order to access there current read positions) to wait for new data. If the reader is too slow, it gets a positive "missed" value back. > Do you need to explicitly unregister positions? I do register readers, because entry families are limited in the number of distince values possible. So a level of indirection is necessary is provided by registration. > I suspect the data itself ('buffer') doesn't need to go into the protected > object, only registrations. Currently the data is protected. It's an interesting idea to keep it out and use a protected type for the positions only. This seems to result in explicit semaphores. > 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. It's not that easy, because the write process can overwrite slow readers.