comp.lang.ada
 help / color / mirror / Atom feed
* task states?
@ 1996-04-03  0:00 Sam Harbaugh
  0 siblings, 0 replies; only message in thread
From: Sam Harbaugh @ 1996-04-03  0:00 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-04-03  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-03  0:00 task states? Sam Harbaugh

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