From stt@camb.inmet.com Wed Apr 2 10:29:38 1997 Return-Path: Received: from inmet.com by camb.inmet.com (SMI-8.6/SMI-SVR4) id KAA09060; Wed, 2 Apr 1997 10:29:38 -0500 Received: from sw-eng.falls-church.va.us by inmet.com (SMI-8.6/SMI-SVR4) id KAA21076; Wed, 2 Apr 1997 10:31:46 -0500 Received: from inmet.camb.inmet.com by sw-eng.falls-church.va.us (8.7.1/) id PAA24568; Wed, 2 Apr 1997 15:26:43 GMT Received: from camb.inmet.com (dsd.camb.inmet.com) by inmet.camb.inmet.com (4.1/SMI-4.1) id AA09804; Wed, 2 Apr 97 10:30:18 EST Received: from houdini.i2ada by camb.inmet.com (SMI-8.6/SMI-SVR4) id KAA09057; Wed, 2 Apr 1997 10:29:30 -0500 Received: by houdini.i2ada (SMI-8.6/SMI-SVR4) id KAA00761; Wed, 2 Apr 1997 10:29:29 -0500 Date: Wed, 2 Apr 1997 10:29:29 -0500 From: stt@camb.inmet.com (Tucker Taft) Message-Id: <199704021529.KAA00761@houdini.i2ada> To: ada-comment@sw-eng.falls-church.va.us, ntbenari@wis.weizmann.ac.il Subject: Re: requeue from P.O. to task content-length: 1708 !topic requeue from protected object to task !reference RM95-9.5.4 !reference RM95-9.5.1(7) !reference 97-15739.a Moti Ben-Ari 97-04-01 !from Tucker Taft 97-04-02 <> !discussion > Subparagraphs 7-8 (my emphasis): > > (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, ... > > seem to imply that the protected operation is terminated before > the attempt is made to call the entry. The entry body is left, but the protected action is not completed. Per RM95 9.5.1(7), completing a protected operation does *not* imply completing the protected action. That happens only after servicing all entry queues. > If the lock on the protected object is released, > a race condition could ensue when another task preempts the > requeueing task, enters the protected object and requeues > on the called task entry. > > I would like this interpretation to be ruled out, > so that the lock is held until the requeued call is > selected or safely queued. > Otherwise, external requeues become meaningless for synchronization. The interpretation you fear is incorrect. The protected action does not complete until after the requeuing operation is complete, and all entry queues have been serviced. > Prof. Mordechai (Moti) Ben-Ari Department of Science Teaching > Weizmann Institute of Science Rehovot 76100 Israel > ntbenari@wis.weizmann.ac.il benari@acm.org > http://wgst.weizmann.ac.il/benari/home.htm -Tucker Taft stt@inmet.com