[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flame on Processes Documentation

Processes (and networks, but that's another story) are nasty things
to work with at best, and when you are making up your own vocabulary
and you can't communicate the distinctions easily, it makes working
with them much worse.  The Book 14 manual secion 1.3, Scheduler Concepts,
is the proper place to lay the groundwork for this ontology, and
Figure 1. Process States on p. 7 should have reinforced this and
made it perfectly clear.  It does the opposite.
  We start out:  A process can be in one of several states.
Fine, O.K., this means they are mutually exclusive.  Actually,
since the states form a hierarchy of types, a process can be
in many states at once (e.g. both RUNNABLE and ACTIVE), but this
is easily understood by the reader.
..Figure 1 should therefore have an uncircled entry, Process States,
at the top of the drawing, that has lines that split between Alive
and Dead. (this assumes the following:)
  We next learn about Alive and Dead states, and we learn that all
Dead processes are Frozen, and consume very few resources.
>From the previous line, we can safely assume that Alive and Dead
are mutually exclusive (they normally are).
  "Live processes" [binds to Alive processes] are further subdivided
into Active and Stopped processes.
  A quick glance at the figure shows that Stopped processes are
classified under Dead, that is, they are on the Dead side.  However,
there is clearly an arc going from Alive (which for some reason
is not circled) to Stopped.  Thus, a Stopped process is both Alive
and Dead.  But these were supposed to be mutually exclusive.
  Stopped processes can either be Suspended or Frozen.
So if they are, draw a picture with two more arcs, just like Active
splitting into Runnable and Blocked!  Don't stack them up!
  However, we previously learned that "A Dead process consumes very
little resources--it is Frozen."  e.g. all dead processes are frozen.
Presumably, all stopped processes are Dead (it's on that side of
the drawing), and we already know all Frozen processes are Stopped.
Some people would call this a "non-transitive relationship".
However, this does not leave room for the Suspended processes, which
presumably are also Dead and therefore Frozen...
  Suspended processes are "ready to run", as are Runnable processes.
This quality is not shown on the diagram, but it could be a box,
or a label without a border, above and pointing to runnable and suspended.
  "The internal state of a frozen process is the same as that of a
Dead process except that the Frozen process is still accessible..."
So Frozen processes and Dead processes are similar but not
supersets or restrictions one of the other.
  Both Active and Stopped processes have other names, but these
are not shown (perhaps inside parenthises, in smaller case) in
the drawing.
  Waiting processes are not shown at all, and yet the next section
says that Waiting and Blocked are two different states.

  The apparently significant difference between Suspended processes
and Blocked processes is never discussed.  I still don't understand this.
If I want a process to be not running, but ready to start, should
I try to make it Blocked, or make it Suspended?  What considerations
should I use in my decision?  process:disable is used to Stop a process--
what commands Freeze or Suspend a process?

Where are Aborted processes and Killed processes on the diagram?

Documentation for the sleep command says it waits, when actually
sleep Blocks.

Let's keep those descriptions tight!
  John Myers~~