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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ce6fddc56263182 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!22g2000hsm.googlegroups.com!not-for-mail From: brodax Newsgroups: comp.lang.ada Subject: Re: Ravenscar and run-time program parameters Date: Wed, 29 Aug 2007 03:23:53 -0700 Organization: http://groups.google.com Message-ID: <1188383033.308933.199070@22g2000hsm.googlegroups.com> References: <1188373703.936484.105650@w3g2000hsg.googlegroups.com> <1ao01z574sm2n.1wopkc52jx009.dlg@40tude.net> NNTP-Posting-Host: 151.70.159.159 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1188383033 20183 127.0.0.1 (29 Aug 2007 10:23:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 29 Aug 2007 10:23:53 +0000 (UTC) In-Reply-To: <1ao01z574sm2n.1wopkc52jx009.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 22g2000hsm.googlegroups.com; posting-host=151.70.159.159; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1588 Date: 2007-08-29T03:23:53-07:00 List-Id: On 29 Ago, 11:02, "Dmitry A. Kazakov" wrote: > On Wed, 29 Aug 2007 00:48:23 -0700, Maciej Sobczak wrote: > > As I understand, the Ravenscar profile forbids dynamically created > > tasks - all tasks have to be created at the library level. > > I guess you mean no task allocation per new (directly or indirectly). That > is not equivalent to library level tasks. For example: > > procedure Main is > task type Worker; > type Brigade is array (Positive range <>) of Worker; > Workers : Brigade (1..Get_No); -- This is not static > begin > loop > ... > end loop; > end Main; > > But yes Ravenscar is very limiting for many things. Free cheese is only in > a mouse trap. > > -- > Regards, > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de Actually you cannot create tasks local to procedures (or other tasks), but only in the declarative part of a library level package. The usual approach is declaring all tasks you need and let some of them suspend on an entry waiting, for example, for an execution mode change. If you need to build a Ravenscar compliant system, I would suggest always thinking in terms of 3 kinds of building blocks: cyclic tasks, sporadic tasks and entry-less protected objects. Each sporadic task would suspend on a "private" entry (in the sense it is visible to that task only), whose barrier is opened by (potentially) several interrupts or sw invocations (potentially carrying parameters). In this manner, some Ravenscar constraints (size of entry queue) are always verified by construction. And the concurrency model is overly simplified and allows a very precise static timing analysis. Regards, Matteo Bordin