comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Multiple entry tasks
Date: Wed, 18 Apr 2001 16:16:24 -0400
Date: 2001-04-18T20:16:25+00:00	[thread overview]
Message-ID: <9bksmp$ang$1@nh.pace.co.uk> (raw)
In-Reply-To: 8slD6.1888$D4.184457@www.newsranger.com

If multiple rendezvous become active before you hit the select, I'd imagine
that they would have to be queued according to the priority of the tasks
that called the entries. It is a marginal case but probably worth thinking
about for a minute anyway...

If two tasks of the same priority were calling, say, Entry2 - then its a
coin toss as to which gets there first.

If two tasks of the same priority were calling different entries, then the
priority of the entry would decide which got to run.

If two tasks of different priority call the same entry, then the higher
priority task gets it.

If two tasks of different priorities call different entries, then you might
get a priority inversion - if both Entry2 and Entry3 have callers, then
Entry3 is blocked when you get to evaluating it.So even if the task calling
Entry3 is of higher priority, it gets blocked until Entry2 finishes.

So there's only one case that is ill-defined - except that in a single
processor environment, one of them would have to have arrived there first.
In a multiple-processor environment, one starts to imagine true simultaneous
arrival - which I guess is going to get somehow arbitrated by the hardware.
(Unless the Indivisible Instruction finally meets the Unmaskable Interrupt!
:-) You'll probably at least have a deterministic answer - if not the answer
you wanted. Some other mechanism needs to decide the
same-priority-same-entry case. The priority inversion is a consequence of
entry priority having preference over task priority. Presumably, you're
design needed to consider that when you dreamed up the notion of
prioritizing the entries. (I think that case is in the ARM under the "I Weep
For You!" rule of task design. ;-)

Truly an interesting state of affairs, eh?

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Ted Dennison" <dennison@telepath.com> wrote in message
news:8slD6.1888$D4.184457@www.newsranger.com...
> In article <vOkD6.1839$D4.178910@www.newsranger.com>, Ted Dennison says...
> Doh! I misread the conditionals. If waiting occurs, all the guards will be
> *open*. That should work fine (assuming the "or" is added, of course). If
> multiple rendezvous become active before this task gets around to
accepting one,
> I suppose the priority principle could be violated. But that's a pretty
marginal
> case.






  reply	other threads:[~2001-04-18 20:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-18 14:57 Multiple entry tasks Lutz Donnerhacke
2001-04-18 16:22 ` Marin David Condic
2001-04-18 18:12   ` Ted Dennison
2001-04-18 18:57     ` Ted Dennison
2001-04-18 20:16       ` Marin David Condic [this message]
2001-04-19 14:02         ` Ted Dennison
2001-04-19 14:28           ` Marin David Condic
2001-04-18 19:46     ` Marin David Condic
2001-04-19 21:52       ` Robert A Duff
2001-04-24  9:19         ` Lutz Donnerhacke
2001-04-19  8:17   ` Jean-Pierre Rosen
2001-04-19 14:42     ` Ted Dennison
2001-04-19 15:01       ` Marin David Condic
2001-04-19 15:02       ` Jean-Pierre Rosen
2001-04-19 19:12         ` Ted Dennison
2001-04-20 14:17           ` Jean-Pierre Rosen
2001-04-20 19:04             ` Ted Dennison
2001-04-23  6:55               ` Jean-Pierre Rosen
2001-04-23 13:50                 ` Ted Dennison
replies disabled

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