comp.lang.ada
 help / color / mirror / Atom feed
From: brodax <matteo.bordin@gmail.com>
Subject: Re: Ravenscar and run-time program parameters
Date: Wed, 29 Aug 2007 03:23:53 -0700
Date: 2007-08-29T03:23:53-07:00	[thread overview]
Message-ID: <1188383033.308933.199070@22g2000hsm.googlegroups.com> (raw)
In-Reply-To: <1ao01z574sm2n.1wopkc52jx009.dlg@40tude.net>

On 29 Ago, 11:02, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
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




      reply	other threads:[~2007-08-29 10:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29  7:48 Ravenscar and run-time program parameters Maciej Sobczak
2007-08-29  8:41 ` Jean-Pierre Rosen
2007-08-29 16:17   ` Jeffrey R. Carter
2007-08-30  6:52     ` Maciej Sobczak
2007-08-31  2:01       ` Jeffrey R. Carter
2007-08-31  9:01         ` Xavier Nicollin
2007-09-03  9:29           ` Maciej Sobczak
2007-08-30  9:49     ` Colin Paul Gloster
2007-08-31  1:29       ` Jeffrey R. Carter
2007-08-29  9:02 ` Dmitry A. Kazakov
2007-08-29 10:23   ` brodax [this message]
replies disabled

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