From: Moti Ben-Ari <ntbenari@wis.weizmann.ac.il>
Subject: Semantics of requeue
Date: 1996/09/08
Date: 1996-09-08T00:00:00+00:00 [thread overview]
Message-ID: <3232697C.2A5C@wis.weizmann.ac.il> (raw)
I have a question on the semantics of requeue:
When a requeue is done on an "internal" entry of a protected object,
it is clear that the caller is queued as part of the
"on-going protected action" (LRM 9.5.4(10)).
This prevents nasty race conditions, as shown in many
published examples of concurrent programs written in Ada 95.
However, I am uncertain exactly what is supposed to happen when
a requeue is done on an entry of another protected object or
on an entry of a task.
Specifically, suppose task T1 executing PO.E requeues on entry T2.E.
Is it possible that between the end of the
protected action PO.E, and the (re-)queueing of the caller T1
on the entry T2.E, another task T3 could execute T2.E and
"jump the queue" (assuming default FIFO scheduling)?
LRM 9.5.4(7-8) says:
7 ... The entry_body or accept_statement enclosing the
requeue_statement is then completed, finalized, and left (see 7.6.1).
8 For the execution of a requeue on an entry of a target task,
after leaving the enclosing callable construct, ...
the requeued call is either selected immediately or queued,
as for a normal entry call (see 9.5.3).
Thus I am asking: are paragraphs 7-8 part of a single atomic
statement, or can the scheduler preempt a task between 7 and 8.
Thanks
Moti Ben-Ari
Dr. Mordechai (Moti) Ben-Ari
Dept. of Science Teaching, Weizmann Institute of Science
Rehovot 76100 Israel, Tel: 972-8-934-2940. Fax: 972-8-934-4174.
ntbenari@wis.weizmann.ac.il
next reply other threads:[~1996-09-08 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-08 0:00 Moti Ben-Ari [this message]
1996-09-09 0:00 ` Semantics of requeue Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox