From: Dale Stanbrough <dstanbro@bigpond.net.au>
Subject: Re: Complexity of protected objects
Date: Sun, 03 Mar 2002 04:13:35 GMT
Date: 2002-03-03T04:13:35+00:00 [thread overview]
Message-ID: <dstanbro-DD061F.15085703032002@mec2.bigpond.net.au> (raw)
In-Reply-To: 5ee5b646.0203021711.2c64c56d@posting.google.com
Robert Dewar wrote:
> Remember that the key point about protected objects is the
> ceiling priority protocol, which ensures that higher priority tasks
> can still freely interrupt the lower priority tasks inside a PO with a
> lower CP.
Just to clarify - the sentence above seems to imply that a low
priority task inside a PO can be forceably removed from the PO
by a higher priority task that want the -same- PO.
Of course this is impossible (if you want correct programs!).
The reason you have POs is so that you can atomically modify
the state of an object. If you kick a task out 1/2 through, the
invariants for he PO (or the object it is protecting) could
easily be left in a corrupt state. Ceiling priority protocal
allows the high priority task to ensure it will be the -next-
task to get access to the PO, and to ensure that low priority
tasks "hurry up and get out of the way" when working inside
a PO.
On the other hand if the higher priority task is resources
other than the PO used by the low priority tasks, then I agree.
> Thus it is
> quite reasonable to use complex PO's with a low CP for
> communication between low priority tasks without any
> danger of intefering with high priority tasks (even in
> an implementation that has no locks).
Another name for POs/semaphores are "bottlenecks". If you
want to increase the natural parallelism of a program, you
should make the code inside them as short as possible.
Dale
next prev parent reply other threads:[~2002-03-03 4:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-25 16:28 Complexity of protected objects tony gair
2002-02-25 16:45 ` Marin David Condic
2002-03-03 1:11 ` Robert Dewar
2002-03-03 4:13 ` Dale Stanbrough [this message]
2002-03-03 19:50 ` Robert Dewar
2002-02-25 17:35 ` Jim Rogers
2002-02-28 22:09 ` Nick Roberts
2002-02-28 23:32 ` Dale Stanbrough
2002-03-01 5:45 ` Jim Rogers
2002-03-03 0:59 ` Robert Dewar
2002-03-01 17:42 ` Jeffrey Carter
2002-03-03 1:06 ` Robert Dewar
2002-03-03 6:53 ` Jeffrey Carter
2002-03-03 19:36 ` Robert Dewar
2002-03-04 20:04 ` Jeffrey Carter
2002-03-03 0:54 ` Robert Dewar
2002-03-03 0:32 ` Robert Dewar
2002-02-25 22:01 ` Ted Dennison
2002-03-03 1:08 ` Robert Dewar
2002-03-04 9:33 ` Dmitry A. Kazakov
2002-03-04 16:44 ` 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