Table of Contents

DMTASK Abstract

Statistics

Type ASSEMBLE
Source Lines : 361
Fixes Applied : 0
Most Recent Version : Thursday, December 7, 1978
Last Fix ID : [Unmodified]

Synopsis

Module

       DMTASK

Function

        THE DMTASK  MODULE IS  THE SERVICE  ROUTINE WHICH
        CREATES  NEW  TASKS  AND  DELETES  EXISTING  TASKS
        EXECUTED BY MSUP. THE ENTRY TO DMTASK IS BY MEANS
        OF A  BRANCH AND LINK  FROM TASK  PROGRAMMING. ANY
        ENTRY  TO   DMTASK  CAUSES  THE   CALLING  TASK'S
        EXECUTION TO  BE SUSPENDED THROUGH THE  FREEZE SVC
        FUNCTION.

Attributes

       REUSABLE, NON-INTERRUPTABLE

Operation

       ON A REQUEST TO GENERATE  A NEW TASK,  DMTASK GETS
       A SUPERVISOR  STATUS QUEUE  ELEMENT BY  A CALL  TO
       DMTQRQ,   BUILDS  A  NEW  TASK  ELEMENT  FROM  THE
       INFORMATION PROVIDED  BY THE  CALLING TASK,  FINDS
       A ONE BYTE TASK ID  WHICH IS NOT IN USE BY ANOTHER
       TASK,  AND ENQUEUES  THE NEW  TASK ELEMENT.   WHEN
       PROCESSING IS COMPLETE,  DMTASK  EXITS TO THE MSUP
       DISPATCHER.  SINCE  THE NEW  TASK  IS  INITIALIZED
       DISPATCHABLE,  THE NEW  TASK  CAN RECEIVE  CONTROL
       BEFORE THE CALLING (CREATING) TASK IS REDISPATCHED
       ON RETURN FROM THE CREATE REQUEST.

       ON A REQUEST  TO TERMINATE  A TASK,  DMTASK BEGINS
       BY SETTING THE "LIMBO" FLAG IN THE TASK ELEMENT OF
       THE TASK TO  BE TERMINATED, UNLESS THE  TASK TO BE
       TERMINATED  IS  THE  SAME  AS  THE  CALLING  TASK.
       SETTING  OF THE  "LIMBO" FLAG  MARKS  THE TASK  AS
       BEING    PERMANENTLY   NOT    DISPATCHABLE.    THE
       TERMINATION PROCESSING CONTINUES BY THE PURGING OF
       ALL  INACTIVE  I/O  REQUESTS  FOR  THE  TASK,  ALL
       ASYNCHRONOUS EXIT  REQUESTS FOR THE TASK,  AND ALL
       PENDING GIVE  REQUESTS FOR  THE TASK.  ALL PENDING
       GIVE REQUESTS  ADDRESSED TO  THE TERMINATING  TASK
       ARE  PURGED, AND  EACH  ASSOCIATED  GIVE TABLE  IS
       POSTED WITH  A X'FF'  CODE. A  SEARCH IS  MADE FOR
       ACTIVE I/O  PROCESSING WHICH WAS INITIATED  BY THE
       TASK  BEING  TERMINATED;  IF SUCH  I/O  IS  FOUND,
       PROCESSING IS TERMINATED AND  CONTROL IS PASSED TO
       THE DISPATCHER  WITH AN  ERROR RETURN  CONTROL AND
       THE TASK TO BE TERMINATED COMPLETELY DISABLED, BUT
       STILL IN  EXISTENCE. (IT IS THE  RESPONSIBILITY OF
       THE CALLING  TASK TO  CAUSE THE  ACTIVE I/O  TO BE
       TERMINATED AND TO RETRY THE TERMINATE REQUEST.)

       IF NO I/O IS ACTIVE  FOR THE TERMINATING TASK, THE
       MAIN STORAGE RESERVED BY THE TASK IS RELEASED, THE
       TASK'S TASK  ELEMENT IS  DEQUEUED AND  FREED BY  A
       CALL  TO DMTQRQ,  AND CONTROL  IS RETURNED  TO THE
       DISPATCHER.

Calls to Other Routines

       DMTQRQ -   TO RESERVE AND RELEASE SUP QUEUE ELEMENTS