From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6836833a86328acd,start X-Google-Attributes: gid103376,public From: Sam Harbaugh Subject: task states? Date: 1996/04/03 Message-ID: <199604031448.JAA00614@bb.iu.net>#1/1 X-Deja-AN: 145787392 sender: Ada programming language x-sender: harbaugh@iu.net comments: Gated by NETNEWS@AUVM.AMERICAN.EDU content-type: text/plain; charset="us-ascii" mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Windows Eudora Light Version 1.5.2 Date: 1996-04-03T00:00:00+00:00 List-Id: I am dialoging on the Unified Method (otug@rational.com) list about the possible states of an object. The example object message diagram that Booch and Rumbaugh have in their free booklet (order via www.rational.com) shows an object state designated as "Active". It seems to me that the states of an object in Unified Method should be the same as for an Ada task for two reasons. It seems to me that it would make sense in terms of the real world and also make code generation easier by using an Ada task for each object in the design representation. Soooo, the question is, what are the states of an Ada95 task? RM section 9 under Dynamic Semantics says "Over time, tasks proceed through various states. A task is initially inactive; upon activation, and prior to its termination it is either blocked (as part of some task interaction) or ready to run. While ready, a task competes for the available execution resources that it requires to run." Working from what I remember about Ada83 I construct the following task life cycle: The task is elaborated, a task control block is created but it may wait for something like other elaborations to take place and until then it is in the INACTIVE state. When activation semantics are satisfied the task control block is linked into the ready-to-run queue according to some priority semantics. The task is now in the READY substate of the ACTIVE state. The task eventually receives resources and may (probably will) move between the READY substate and the BLOCKED substate of the ACTIVE state during its working career. When termination semantics are satisfied the task moves to the COMPLETE state where it still exists but it can never again receive resources. When the task is de-elaborated the task control block is destroyed and there is no memory of the task ever having existed. State-wise I have: State Substates INACTIVE ACTIVE READY BLOCKED COMPLETE -- not mentioned in RM section 9 If this is correct then I will worry about the correspondence between what causes the state transitions in Ada95 and for objects in the Unified Method. Thanks in advance for any corrections. sam harbaugh harbaugh@acusys.com