I read but did not respond to the original post of this thread. The job of
explaining multitasking ab initio seemed more appropriate to a book than a post.
Some lacunæ have, however, appeared as the thread has developed.
One of the chief uses of a subtask is to delegate to it a function that is in
some sense perilous, may fail/ABEND. Such a subtask ABEND leaves the parent
task alive in circumstances that would have killed it if it had undertaken this
function itself.
Another important use of subtasks is for asynchronous, concurrent/overlapped
processing, which can abbreviate the residence time or improve the response
times of an application dramatically.
Finally, subtasking is often used to implement precedence constraints. Task S
may wait on task P if S cannot start its work until P has finished its work.
Or again, it may be appropriate for S to proceed after only m < n attached
subtasks have been posted complete; and there are facilities available for
doing this.
There are metabolic issues too. The usage count for a reentrant module that is
incremented by ATTACH and decremented by DETACH largely controls whether that
module remains in storage and thus immediately available for use by some other
(sub)task without the delay asssociated with a (synchronous) LOAD.
The OP's questions are certainly not bad or inappropriate. They are radically
naif. He has so much to learn that it is diffficult to know where to begin to
teach him what he needs to know.
John Gilmore Ashland, MA 01721-1817 USA
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html