DataMuseum.dk

Presents historical artifacts from the history of:

CR80 Wang WCS documentation floppies

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CR80 Wang WCS documentation floppies

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦ade484c64⟧ Wang Wps File

    Length: 48490 (0xbd6a)
    Types: Wang Wps File
    Notes: CPS/SDS/002 SYS. FUNCT.   
    Names: »1058A «

Derivation

└─⟦5a07e954e⟧ Bits:30006038 8" Wang WCS floppy, CR 0062A
    └─ ⟦this⟧ »1058A « 

WangText

5…00……00……00……00…;…0a……00……00…;…0b…;…00…;…05…:…0a…:…0e…:…02…:…05…9…09…9…0e…9…02…9…07…8…0e…8…05…7…08…7…09…7…0a…7…0b…7…0d…7…01…7…06…6…08…6…0b…6…0f……86…1                                             …02…          
 …02…   …02…        

…02…CPS/SDS/002

…02…OKH/810801…02……02…
CAMPS SYSTEM FUNCTIONS
…02……02…CAMPS







4.2.4.1.2.11  S̲a̲v̲e̲ ̲V̲i̲e̲w̲

         Input:  View Reference
                 Recovery Level
                 Dismantle Flag
             
         Output: Completion Code

         Waiting point in SEND TO CSF PROCESS

         Waiting point before function completion.

         Checks OWNERSHIP and TYPE.

         Sends a save request to CSF process by calling SEND
         TO CSF PROCESS.

         Upon return of answer it waits for function completion.



4.2.4.1.2.12  S̲a̲v̲e̲

         Input:  VCB ID
                 Recovery Level
                 Dismantle Flag
                 Buffer Address, Buffer Length

         Output: Completion Code

         Waiting point in SEND TO MMS.

         Waiting point before function completion.

         a)  Checks that calling process is allowed to call
             this function.

         b)  Checks that Recovery Level  = 1.

         c)  Set VCB RL to Recovery Level.

         d)  If Dismantle Flag set then dismantle the QEL by
             calling EXCLUDE QEL.

         e)  Go through the chain of VCBs and see, if there
             are any VCBs which are alive and have RL  = 1.
              If not, Recovery Level is set to zero.  This assures
             that the last checkpoint is on level zero, cf g)
             below.



         f)  Go through the chain of VCBs and do the following
             on each VCB:

             1)  If Recovery Level  = RL  = 1, then RL is set
                 to Recovery Level.  If not, omit step 2.

             2)  If QEL COUNT   0, the VCB and all referencing
                 QELs with CS (checkpoint status) equal to true
                 are copied into the checkpoint buffer.

         g)  Send a SAVE command to MMS with Recovery Level.
              If the checkpoint buffer is empty, this is automatically
             the final checkpoint for the CIF.

         h)  Upon return of answer from MMS, it is checked if
             the VCB referenced in the SAVE function call has
             QEL COUNT = 0.  If so, it is removed by EXCLUDE
             VCB.

         i)  Wait for function completion.



4.2.4.1.3    S̲t̲o̲r̲a̲g̲e̲ ̲a̲n̲d̲ ̲R̲e̲t̲r̲i̲e̲v̲a̲l̲



4.2.4.1.3.1  S̲t̲o̲r̲e̲

         Input:  View reference

         Output: CIF Id., CIF Version
                 View Id.
                 Completion Code

         Waiting point in SEND TO MMS

         Waiting point before function completion.

         Checks OWNERSHIP and TYPE.  Checks that calling application
         has the right to call Store.

         Sends a STORE request to MMS.

         Upon return, it waits for function completion.


4.2.4.1.3.2  R̲e̲t̲r̲i̲e̲v̲e̲

         Input:  Type
                 Dump File Reference
                 Dump Segment Id
                 View Attributes
                 Destination Queue

         Output: View Reference
                 View Attributes
                 Completion Code

         Waiting point in GENERATE VCB.

         Waiting point before function completion.

         The input parameter "View Attributes" is empty except
         for the fields:

         -   CIF ID
         -   CIF VERSION
         -   VIEW ID

         identifying the view to be retrieved.  The complete
         attributes for the retrieved view are filled in upon
         return.  Checks that calling application has the right
         to call Retrieve.  Checks input parameter address.
          Then sends a CREATE VIEW request to MMS by calling
         GENERATE VCB.

         Upon return the received QUEUE PROFILE is inserted
         into VCB and function completion is awaited.

         Function completion changes VCB STATUS to ALIVE and
         returns the View Reference parameter.



4.2.4.1.3.3  D̲u̲m̲p̲ ̲C̲I̲F̲ ̲S̲e̲q̲u̲e̲n̲c̲e̲

         Input:  Dump File Reference
                 CIF Id. List

         Output: Number of Dumped CIFs
                 Updated CIF ID List
                 Completion Code

         Waiting point in SEND TO MMS.



         Waiting point before function completion.

         Checks that calling application is allowed to call
         the function.  Sends a DUMP CIF SEQUENCE to MMS.

         Upon return it waits for function completion.



4.2.4.1.3.4  C̲l̲e̲a̲r̲

         Input:  Clear Time

         Output: Completion Code.

         Waiting point in SEND TO MMS.

         Waiting point before function completion.

         Checks that the calling application is allowed to call
         this function.  Sends a CLEAR request to MMS.

         Upon return it waits for function completion.



4.2.4.1.3.5  I̲n̲i̲t̲ ̲D̲u̲m̲p̲

         Input:  Dump File Ref

         Output: Dump Segment Id
                 Completion Code

         Waiting point in SEDN TO MMS.

         Waiting point before function completion.

         Completes that calling application is allowed to call
         the function. Then sends an Init Dump command to MMS.

         Upon return it waits for function completion.





4.2.4.1.3.6  T̲e̲r̲m̲i̲n̲a̲t̲e̲ ̲D̲u̲m̲p̲

         Input:  Dump File Reference

         Output: Completion Code

         Waiting point in SEND TO MMS.

         Waiting point before function completion.

         Checks that calling application is allowed to call
         the function. Then sends a Terminate Dump command to
         MMS.

         Upon return it waits for function completion.



4.2.4.1.4    I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲



4.2.4.1.4.1  S̲e̲t̲ ̲S̲e̲c̲u̲r̲i̲t̲y̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲s̲

         Input:  Security Interrogation Profile
                 Security Warning Profile

         Output: Completion Code

         Checks that calling process is allowed to call this
         function.  Then inserts the security parameters as
         specified.



4.2.4.1.4.2  S̲t̲a̲r̲t̲ ̲S̲y̲s̲t̲e̲m̲

         Input:  Recovery Level.

         Output: Completion Code.

         Checks that calling process is allowed to call this
         function.  Then restores system state according to
         specified recovery level.





4.2.4.1.4.3  S̲e̲t̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲ ̲V̲a̲l̲u̲e̲s̲

         Input:  Threshold Values

         Output: Completion Code.

         Waiting point in SEND TO MMS.

         Waiting point before function completion.

         Checks that calling application is allowed to call
         the function. Then sends the command to MMS. Upon return,
         it waits for function completion.



4.2.4.1.4.4  G̲e̲t̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲ ̲W̲a̲r̲n̲i̲n̲g̲

         Output: Warning Type
                 Completion Code.

         Processing as 4.2.4.1.4.3.



4.2.4.1.4.5  G̲e̲t̲ ̲S̲t̲o̲r̲a̲g̲e̲ ̲O̲c̲c̲u̲p̲a̲n̲c̲y̲

         Output: Occupancy Figures
                 Completion Code.

         Processing as 4.2.4.1.4.3.



4.2.4.1.5    V̲i̲e̲w̲ ̲I̲/̲O̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲





4.2.4.1.5.1  R̲e̲a̲d̲ ̲V̲i̲e̲w̲

         Input:  View Reference
                 Buffer Address
                 Buffer Size
                 Field List.

         Output: Updated Field List
                 Completion Code.

         Waiting point in Send to MMS.

         Waiting point before function completion.

         Checks QEL for:

         -   OWNERSHIP and TYPE
         -   OPEN STATUS is set.

         Checks that calling process has write access to specified
         buffer, and the buffer is locked in memory.

         If checks are OK, a Read View command is sent to MMS.

         Upon return of answer from MMS, the buffer is unlocked,
         and function completion is awaited.



4.2.4.1.5.2  W̲r̲i̲t̲e̲ ̲V̲i̲e̲w̲

         Similar to Read View, except that:

         -   QEL must have Write Access set in View Control
             Information.

         -   The calling process must have read access to specified
             buffer.





4.2.4.1.6    I̲n̲t̲e̲r̲n̲a̲l̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲



4.2.4.1.6.1  G̲e̲n̲e̲r̲a̲t̲e̲ ̲V̲C̲B̲

         Input:  View Attributes
                 Predecessor VCB Pointer
                 Destination Queue

         Output: Completion Code

         Waiting point in SEND TO MMS.

         Allocates a VCB and chains it to predecessor VCB, if
         this was not NIL.  Then initializes it with data from
         View Attributes.  The STATUS is set to UNDER CREATION,
         QEL COUNT set to zero, and QEL LIST to NIL.  The VCB
         ID is inserted into the MMS parameter block, and a
         command is sent to MMS by calling SEND TO MMS.

         Upon return from MMS, the result is checked.  If negative,
         the VCB STATUS is set to free and the VCB released.
          Otherwise:

         -   The view ref. returned from MMS is inserted into
             VCB MMS VIEW REF.

         -   The VCB STATUS is set to COMPLETE CREATION.

         -   A referencing QEL is allocated by calling the QMON
             procedure CREATE QEL.  If result of call is negative,
             a DELETE VIEW request is sent to MMS, and the VCB
             is released.  Otherwise, the QEL is chained to
             VCB by calling INCLUDE QEL.  The return is made
             to calling procedure.



4.2.4.1.6.2  E̲x̲c̲l̲u̲d̲e̲ ̲V̲C̲B̲

         Input:  VCB Pointer

         The VCB STATUS is set to FREE and the VCB is removed
         from its current chain and released.  Then return is
         made to calling procedure.



4.2.4.1.6.3  I̲n̲c̲l̲u̲d̲e̲ ̲Q̲E̲L̲

         Input:  VCB Pointer
                 QEL Pointer

         Chains the QEL to the VCB QEL LIST and increases QEL
         COUNT.  The QEL shall be inserted as the first element
         of the list.



4.2.4.1.6.4  C̲h̲e̲c̲k̲ ̲O̲w̲n̲e̲r̲s̲h̲i̲p̲

         Input:  QEL Reference

         Output: QEL Pointer
                 Completion Code

         Converts the QEL reference to a QEL pointer and checks
         the QEL for:

         -   OBJECT TYPE is VIEW
         -   Calling subprocess is owner of QEL



4.2.4.1.6.5  Q̲E̲L̲ ̲C̲o̲p̲i̲e̲d̲

         Input:  QEL Pointer

         Inserts a new referencing QEL into the view by calling
         INCLUDE QEL.  Resets the OPEN FLAG in QEL.



4.2.4.1.6.6  E̲x̲c̲l̲u̲d̲e̲ ̲Q̲E̲L̲

         Input:  QEL Reference
                 QEL Pointer

         Removes the QEL from the referenced VCB and decreases
         the VCB QEL COUNT, using QEL Pointer.  Calls the QMON
         function DISMANTLE QEL, using QEL Reference.



4.2.4.1.6.7  S̲e̲n̲d̲ ̲t̲o̲ ̲M̲M̲S̲

         Prepares an info block and sends a request to the MMS
         synchronization element.  Then returns to System Call
         Monitor.  Resumed by Answer Received and then returns
         to calling procedure.



4.2.4.1.6.8 S̲e̲n̲d̲ ̲t̲o̲ ̲C̲S̲F̲ ̲P̲r̲o̲c̲e̲s̲s̲

         Prepares an info block and sends a SAVE request to
         CSF process synchronization element.  Then continues
         as 4.2.4.1.6.7.



4.2.4.1.6.9 S̲e̲n̲d̲ ̲t̲o̲ ̲P̲a̲r̲e̲n̲t̲

         Prepares an info block and sends it to the parent synchronization
         element, the object index of which is found in the
         Kernel Process Parameter Page.



4.2.4.2  S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲

         Message Monitor is implemented as four main procedures
         called by System Call Monitor:

         -   MMON Init Function
         -   MMON Answer Received
         -   MMON Function Completion
         -   MMON Cancel Function



         System Call Monitor Interface is as specified in section
         4.1.6.2.6.  The MMON Cancel has no effect and returns
         immediately to System Call Monitor.

         Each of the other procedures enters a Message Monitor
         procedure as follows:

         -   M̲M̲O̲N̲ ̲I̲n̲i̲t̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲

             The Function Parameter delivered by System Call
             Monitor is used to select one of the external Message
             Monitor procedures described in 4.2.4.1.1-4.  The
             selected procedure is entered.  When it reaches
             the point where answer from MMS, CSF process or
             parent process shall be awaited (ref. figure 4.1.6.2.4-1),
             it places the address of the continuation point
             in the SOCB and returns to System Call Monitor.

         -   M̲M̲O̲N̲ ̲A̲n̲s̲w̲e̲r̲ ̲R̲e̲c̲e̲i̲v̲e̲d̲

             Uses the continuation address in SOCB to resume
             the procedure which has initiated the operation
             represented by SOCB.  When the answer has been
             processed, the procedure now saves in SOCB the
             continuation address for function completion and
             returns to System Call Monitor.

         -   M̲M̲O̲N̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲ ̲C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲

             The continuation address of SOCB is used to resume
             the procedure which recently processed the answer
             from MMS.  The procedure completes its work and
             returns output parameters to calling application
             as specified in interface description for the procedure.
              Return is made via System Call Monitor.

         C̲S̲F̲ ̲P̲r̲o̲c̲e̲s̲s̲

         The CSF process described in section 4.2.1 performs
         a queuing of SAVE VIEW requests.  Each SAVE VIEW function
         call results in a request sent to CSF process.  It
         will then process one request at a time by calling
         the MMON SAVE function.      





4.2.4.3  D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲



4.2.4.3.1    L̲o̲c̲k̲i̲n̲g̲ ̲a̲n̲d̲ ̲S̲y̲n̲c̲h̲r̲o̲n̲i̲z̲a̲t̲i̲o̲n̲ ̲M̲e̲c̲h̲a̲n̲i̲s̲m̲s̲

         All Message Monitor functions must be executed with
         interrupts disabled and with exclusive access to the
         complete CSF data space.  This is ensured by locking
         the CSF hardware semaphore before entering Message
         Monitor.  The locking and unlocking is done by System
         Call Monitor.

         In addition to this locking mechanism there is a special
         synchronization mechanism for the SAVE function.  Only
         one SAVE may be in progress at a time.  This is ensured
         in the following way:

         The SAVE function must only be called by the CSF process.
          All other processes shall call the SAVE VIEW or DISMANTLE
         VIEW functions, which will only send a request to the
         CSF process and await the answer.  The CSF process
         will queue the requests and serve one at a time.  The
         control flow is shown on figure 4.2.4.3-2.

         The CSF process must not use any Message Monitor function
         which can result in checkpoint generation.



4.2.4.3.2    C̲o̲n̲t̲r̲o̲l̲ ̲F̲l̲o̲w̲

         Figure 4.2.4.3-1 shows the control flow between external
         and internal procedures of Message Monitor.

         The two waiting points for "answer received" and "function
         completion" are placed as follows:

         -   The procedures SEND TO MMS, SEND TO PARENT and
             SEND TO CSF PROCESS each contains the waiting point
             "answer received".  They shall save their return
             address and possibly other variables in SOCB. 
             No other procedures contain an "answer received"
             waiting point.



         -   Each of the external procedures contain a "function
             completion" waiting point.  The SAVE VIEW function
             requires special consideration, as it can be called
             internally from DISMANTLE VIEW and it can also
             be entered from System Call Monitor.  In the first
             case, it shall return directly to calling procedure.
              In the second case, it shall make a "function
             completion" waiting point.



4.2.4.3.3    S̲e̲c̲u̲r̲i̲t̲y̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲F̲l̲o̲w̲

         The security procedure mechanism is described in section
         4.2.4.1.1.c.  The control flow is shown in figure 4.2.4.3-3.
















































       Fig. 4.2.4.3-1…01…MESSAGE MONITOR CONTROL FLOW

















































        Fig. 4.2.4.3-2…01…SAVE FUNCTION CONTROL FLOW

















































      Fig. 4.2.4.3-3…01…SECURITY PROCEDURE CONTROL FLOW


4.2.4.4  M̲e̲s̲s̲a̲g̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲D̲a̲t̲a̲

         Message Monitor data are located partly within CSF
         shared data and partly within each process.  All Message
         Monitor data are protected by "no access" in user mode.


4.2.4.4.1    V̲i̲e̲w̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲ ̲F̲o̲r̲m̲a̲t̲

         Each View is in Message Monitor described by a VCB
         of this format:


          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     NEXT
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                   PREVIOUS
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


                QUEUE PROFILE
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

               MMS VIEW REF
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

         RL  R       S   QEL COUNT
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             QEL LIST
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         RL:     Recovery Level

                 0 or 1:  Checkpointed at this level
                 2:       Not checkpointed
                 4:       Not recoverable

         R:      Recovery Status

                 1:       Recovered (Possible duplicate)

         S:      Status

                 0:       Free
                 1:       Under creation
                 2:       Complete creation
                 3:       Under deletion
                 3:       Alive

         View Control Blocks are located in a VCB array within
         CSF shared data, indexed by VCB Id.



4.2.4.4.2    Q̲u̲e̲u̲e̲ ̲E̲l̲e̲m̲e̲n̲t̲ ̲F̲o̲r̲m̲a̲t̲

         The complete QEL format is shown in section 4.2.2.4.5.
          The part used by Message Monitor has the following
         format:

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             OWNER      O W C …0f…AP…0e… P …0f…OT…0e…
                        S A S    C
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 OBJECT POINTER
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 OBJECT LINK
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         AP: Application Profile   (Bits 29-30 of profile is
             
                                   specific for each QEL)

         CS: Checkpoint Status     1  Shall be included in
                                      checkpoint.

                                   0  Shall not be included
                                  in
                                      checkpoint.

         WA:                      Write Access

         PC: Profile Check Status  Set by QMON in receive 
                                   function if profile check
                                  is 
                                   passed.

         OT: Object Type           Must be "View".

         OS: Open Status           1  The calling subprocess
                                  has
                                      opened the view.

         OWNER:                    The id of the subprocess
                                  
                                   having received the QEL.

         OBJECT POINTER:           Pointer to a VCB.

         OBJECT LINK:              All QELs referencing the
                                   same view are linked into
                                  a  
                                   single chained list.


4.2.4.4.3    V̲C̲B̲ ̲a̲n̲d̲ ̲Q̲E̲L̲ ̲L̲i̲s̲t̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲s̲

         The View Control Blocks for views referencing the same
         CIF are linked in a doubly chained list without a list
         header.  The QELs referencing a view are linked in
         a single chained list headed from VCB QEL LIST.  The
         principle is shown in the following figure.











































4.2.4.4.4    C̲o̲n̲s̲t̲a̲n̲t̲s̲ ̲a̲n̲d̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲



4.2.4.4.4.1  G̲l̲o̲b̲a̲l̲ ̲C̲o̲n̲s̲t̲a̲n̲t̲s̲ ̲a̲n̲d̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲

         These are shared by all processes calling Message Monitor.

         a)  G̲l̲o̲b̲a̲l̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲ ̲R̲e̲c̲o̲r̲d̲

              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             SECURITY INTERROGATION PROFILE
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             SECURITY WARNING PROFILE
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         b)  G̲l̲o̲b̲a̲l̲ ̲W̲o̲r̲k̲i̲n̲g̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             CURRENT SOCB POINTER
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             CURRENT VCB POINTER
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             CURRENT QEL POINTER
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


             INFO AREA FOR.

             - SEND TO MMS
             - SEND TO CSF PROCESS
             - SEND TO PARENT
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



4.2.4.4.4.2  L̲o̲c̲a̲l̲ ̲C̲o̲n̲s̲t̲a̲n̲t̲s̲ ̲a̲n̲d̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲

         This is a separate record for each process using Message
         Monitor.


                  ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲     

                 MMS REQUEST SYNCH EL ID
                  ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 MMON ANSWER SYNCH EL ID
                  ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 CSF PROCESS SYNCH EL ID
                  ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 FUNCTION CAPABILITIES
                  ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         The Synchronization Element Ids are object indices
         as defined by Kernel.

         Function Capabilities are a function mask with a bit
         for each of the functions:

         -   Store
         -   Retrieve
         -   Dump CIF Sequence
         -   Clear CIF Sequence
         -   Save
         -   Set Security Parameters
         -   Start System

         In addition Message Monitor uses the following constants
         and variables from CSF Shared Procedures:

         -   Subprocess Id.



4.2.4.4.5    I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲ ̲B̲l̲o̲c̲k̲s̲



4.2.4.4.5.1  V̲i̲e̲w̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲ ̲B̲l̲o̲c̲k̲


          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 QUEUE PROFILE
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             KERNEL SECURITY PROFILE
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 CIF ID
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             CIF VERSION    VIEW ID
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             RECOVERY INFORMATION
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     FIELD
                   INFORMATION
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         A View Attributes parameter always has this format.

         A Field Information parameter has the same format as
         the Field Information part of the attributes.



         I̲n̲f̲o̲ ̲B̲l̲o̲c̲k̲ ̲F̲o̲r̲m̲a̲t̲ ̲f̲o̲r̲ ̲O̲p̲e̲n̲ ̲R̲e̲q̲u̲e̲s̲t̲ ̲t̲o̲ ̲C̲O̲P̲S̲Y̲

              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
                              S S
              ̲ ̲ ̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲ ̲ ̲ ̲W̲ ̲I̲ ̲ ̲
                        
              ̲ ̲ ̲ ̲ ̲S̲E̲N̲D̲E̲R̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
                 

              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
             
              ̲ ̲ ̲S̲O̲C̲B̲ ̲R̲E̲F̲E̲R̲E̲N̲C̲E̲ ̲ ̲ ̲

         FUNCTION:   Has the value "Open Request".

         SW:         Security Warning Flag.

         SI:         Security Interrogation Flag.

         SENDER:     Subprocess Id. for sending subprocess.



         I̲n̲f̲o̲ ̲B̲l̲o̲c̲k̲ ̲F̲o̲r̲m̲a̲t̲ ̲f̲o̲r̲ ̲O̲p̲e̲n̲ ̲C̲o̲n̲f̲i̲r̲m̲a̲t̲i̲o̲n̲ ̲f̲r̲o̲m̲ ̲C̲O̲P̲S̲Y̲


              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 COMPLETION CODE
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                                  
                                  
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 SOCB REFERENCE
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         FUNCTION:   Has the value "Open Confirmation".

         CC:         Completion Code
                     0  OK
                     1  ERROR



4.2.4.5  S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲

         Message Monitor interface to other subpackages is shown
         on figure 4.2.4.5-1.

















































   Fig. 4.2.4.5-1…01…MESSAGE MONITOR SUBPACKAGE INTERFACES


4.2.5    C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲



4.2.5.1  F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲



4.2.5.1.1    C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲

         This group of functions interface to System Call Monitor.
          It consists of four procedures which may be called
         from application program.

         The coroutine System Call procedure is a simple combination
         of coroutine Initiate System Call and Coroutine Wait.
          It has the parameters:

         Input.  Function
                 Parameters

         Output. Return Parameters from System Call
                 Completion code
                 Exit condition

         The procedure is always a waiting point for the calling
         coroutine.


















































        Fig. 4.2.5.1-1…01…COROUTINE MONITOR FUNCTIONS


4.2.5.1.1.1  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲I̲n̲i̲t̲i̲a̲t̲e̲ ̲S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲

         Input:  Function
                 Parameters
                 Operation Pointer (External Operation)

         Output: Completion Code
                 Exit Condition

         The procedure has no waiting point.

         Calls the System Call Monitor function INIT SYSTEM
         CALL with the parameters delivered.  Upon return, the
         external operation is initialized as follows:

         a)  SYSTEM OPERATION REFERENCE is set to the value
             received from System Call Monitor.

         b)  ACTIVATION is set to SET DONE STATUS

         c)  STATUS is set to PENDING.

         d)  ACTIVATION POINTER is set to NIL.



4.2.5.1.1.2  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲W̲a̲i̲t̲

         Input:  Operation Pointer (External Operation)

         Output. Return Parameters from System Call
                 Completion Code
                 Exit Condition

         Waits for completion of a System Call which is described
         in the external operation referenced by Operation Pointer.
          The System Call return parameters are delivered unchanged.

         The action depends upon STATUS of the operation.  In
         case a), the procedure contains a waiting point.

         a)  STATUS = PENDING

             ACTIVATION field of operation is set to ACTIVATE
             - COROUTINE, and ACTIVATION - POINTER is set to
             running coroutine.  The running coroutine is then
             paused.  When resumed, it will continue in c) below.



         b)  STATUS = SENT-TO-SEMAPHORE

         The operation is then removed from semaphore, and the
         procedure continues in c).

         c)  Other values.

             The System Call Monitor function Wait will then
             be called, and return to calling coroutine is done
             with the parameters delivered by the Service System.



4.2.5.1.1.3  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲C̲a̲n̲c̲e̲l̲

         Input:  Operation Pointer (External Operation)

         Output: Completion Code
                 Exit Condition

         The function shall cancel a previously initiated System
         Call, described by the operation.  The action depends
         upon status of the operation.  Case a) contains a waiting
         point for the calling process.

         a)  Status = PENDING

             The System Call Monitor function CANCEL is called.

         b)  Other values.

             No action.

         Note that even if the operation has been cancelled,
         it must be waited for by COROUTINE WAIT.





4.2.5.1.2    W̲a̲i̲t̲ ̲S̲e̲m̲a̲p̲h̲o̲r̲e̲

         Input:  Semaphore Pointer

         Output: Completion Code

         If semaphore counter is not positive, the procedure
         contains a waiting point.

         The semaphore counter is decreased by one.  If the
         resulting value is smaller than zero, the running coroutine
         is linked to the semaphore list and paused.  Otherwise,
         the procedure returns immediately.



4.2.5.1.3    W̲a̲i̲t̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲ ̲S̲e̲m̲a̲p̲h̲o̲r̲e̲

         Input:  Semaphore Pointer

         Output: Operation Pointer
                 Completion Code

         If the semaphore counter is not positive, the procedure
         contains a waiting point.

         The semaphore counter is decreased by one.  If the
         resulting value is smaller than zero, the running coroutine
         is linked to the semaphore list and paused.  Otherwise,
         the first operation is chained out from the semaphore
         list and the operation address is returned in a register.

         If the operation is of type EXTERNAL, the STATUS FIELD
         is set to DONE.



4.2.5.1.4    S̲i̲g̲n̲a̲l̲ ̲S̲e̲m̲a̲p̲h̲o̲r̲e̲

         Input:  Semaphore Pointer

         Output: Completion Code

         The procedure contains no waiting point.



         The semaphore counter is increased by one.  If the
         resulting value is zero or negative, the first waiting
         coroutine is chained out from the semaphore list and
         made ready.



4.2.5.1.5    S̲i̲g̲n̲a̲l̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲ ̲S̲e̲m̲a̲p̲h̲o̲r̲e̲

         Input:  Semaphore Pointer
                 Operation Pointer

         Output: Completion Code

         The procedure contains no waiting point.

         The semaphore counter is increased by one.  If the
         resulting value is positive, the operation is chained
         into the semaphore list according to its priority.
          Otherwise, the first coroutine is chained out from
         the semaphore list and made ready, and the operation
         address is placed in a saved register of the ready'ed
         coroutines.  In the latter case, the STATUS field is
         set to DONE, if the operation is external.



4.2.5.1.6    A̲s̲s̲o̲c̲i̲a̲t̲e̲

         Input:  Operation Pointer (External Operation)
                 Semaphore Pointer

         Output: Completion Code
                 Exit Condition

         The procedure contains no waiting point.

         The external operation is associated with the semaphore.
          The operation will be sent to the semaphore when the
         system call described by operation has been completed.

         The operation fields are set as follows:

         a)  ACTIVATION is set to SIGNAL-TO-SEMAPHORE



         b)  ACTIVATION-POINTER is set to the Semaphore-Pointer
             parameter.

         c)  If STATUS is different from PENDING, the operation
             is signalled to the semaphore, and the status is
             then changed to SENT TO SEMAPHORE.



4.2.5.1.7    I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲

         Contains a procedure to initialize the Coroutine Monitor
         and two procedures used to introduce a new coroutine
         or a new semaphore to the Coroutine Monitor.  The calling
         application shall itself supply the necessary memory
         area for the coroutine record and semaphore record
         respectively, but the memory areas will be initialized
         by Coroutine Monitor.



4.2.5.1.7.1  I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲

         Input:  Coroutine Pointer
                 Coroutine Priority
                 Subprocess Id.
                 Start Address

         Output: Completion Code

         The data area pointed to by Coroutine Pointer is initialized
         as a coroutine record, using the parameters supplied.

         The new coroutine will be made ready and will thus
         eventually start running at the program location specified
         as start address.





4.2.5.1.7.2  I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲S̲e̲m̲a̲p̲h̲o̲r̲e̲

         Input:  Semaphore Pointer
                 Semaphore Count

         Output: Completion Code

         The data area pointed to by Semaphore Pointer is initialized
         as a semaphore record.  The semaphore list is set empty,
         and the semaphore count is set as prescribed.  If the
         semaphore is to be used as an operation semaphore,
         the count should be initialized to zero.



4.2.5.1.7.3  I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲

         Input:  Coroutine Pointer
                 Coroutine Priority
                 Subprocess Id.

         Output: Completion Code.

         Initializes the internal data structure of Coroutine
         Monitor.  The Ready list is set in empty state.  Running
         Coroutine is set to specified coroutine pointer and
         Current-Subprocess Id to the specified subprocess id.
          The data area pointed to by coroutine pointer is initialized
         as a coroutine record.

         This procedure shall be called before any other Coroutine
         Monitor procedure.



4.2.5.1.8    R̲e̲m̲o̲v̲e̲ ̲F̲r̲o̲m̲ ̲S̲e̲m̲a̲p̲h̲o̲r̲e̲

         Input:  Operation Pointer (External Operation)

         Internal procedure called by Coroutine Cancel and Coroutine
         Wait.  It removes the operation from the operation
         list of a semaphore and decreases the semaphore count
         by one.  The semaphore pointer is found in the activation
         pointer field of the operation.





4.2.5.1.9    P̲a̲u̲s̲e̲

         Internal procedure called from the "wait" procedures
         when a coroutine encounters a waiting point.

         The link register is saved in the Register 7 location
         of the coroutine record.  When the coroutine is eventually
         readied and then selected as running coroutines, it
         will be resumed in the location after call of Pause.

         If the list of ready coroutines is empty, the System
         Call Monitor function Wait Next Operation is called,
         as the process must now wait for the next external
         event.  The return parameter "user operation reference"
         is a pointer to an external operation (Coroutine Init
         System call), and the system call described by this
         operation is now done.

         The subsequent actions depend upon the activation field
         of the operation:

         a)  SIGNAL TO SEMAPHORE

             The STATUS is set to SENT TO SEMAPHORE, and the
             operation is sent to the semaphore pointed to by
             ACTIVATION POINTER.

         b)  ACTIVATE COROUTINE

             The coroutine pointed to by ACTIVATION POINTER
             is made ready and STATUS is changed to DONE.

         c)  Other values

             STATUS is changed to DONE.

         The Wait Next Operation and subsequent steps are repeated
         until the ready list is not empty.

         The first coroutine is chained out from ready list.
          The Coroutine Monitor variable "current coroutine
         pointer is updated, and the CSF Common Procedure "Change
         Subprocess Id" is called, if the subprocess id of this
         coroutine is different from that of the previous one.
          Finally, the coroutine is entered at the program location
         defined by saved register R7.



4.2.5.1.10  R̲e̲a̲d̲y̲

         Input:  Coroutine Pointer

         Internal procedure which is called when a waiting coroutine
         shall be activated again.  The coroutine is chained
         into the ready list according to its priority.



4.2.5.1.11   G̲e̲t̲ ̲R̲u̲n̲n̲i̲n̲g̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲

         Output: Coroutine Pointer

         Returns a pointer to the coroutine record of running
         coroutine.



4.2.5.2  S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲

         The Coroutine Monitor is a set of shared procedures
         executing in user mode of the calling process.



4.2.5.3  D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲

         Figure 4.2.5.3-1 shows the control flow in coroutine
         monitor.  The arrows indicate procedure calls.  Except
         from calls to System Call Monitor and CSF Common Functions,
         which are MON calls, the procedure calls are realized
         by normal procedure statements.

         Figure 4.2.5.3-2 shows the rules for use of the System
         Call functions alone and together with semaphores.
          The following details should be noted:

         a)  An external operation will only be sent to a semaphore
             if ASSOCIATE is called after the INIT SYSTEM CALL.

         b)  If one coroutine waits for completion of a system
             call in COROUTINE WAIT, it is not allowed for another
             coroutine to issue a CANCEL for the awaited operation.



         c)  The arrival of an external operation to a semaphore
             does only indicate that the corresponding system
             call has been performed.  After that, COROUTINE
             WAIT must be called in order to get the return
             parameters from the system call.

             In this case COROUTINE WAIT is not a waiting point.

         d)  Even if a system call has been done, and the external
             operation has been signalled to a semaphore, it
             is allowed to "change one's mind" and wait for
             the operation by COROUTINE WAIT without having
             first received the operation from the semaphore.

         e)  When an external operation has been received from
             a semaphore, it is allowed to signal it to another
             semaphore before COROUTINE WAIT is called.  It
             may also be signalled to semaphores after COROUTINE
             WAIT.

         f)  The COROUTINE CANCEL function does only force the
             system call to terminate abnormally, if it is not
             already terminated.  Completion of the operation
             must be awaited as usual by COROUTINE WAIT.


















































      Fig. 4.2.5.3-1…01…COROUTINE MONITOR CONTROL FLOW

















































       Fig. 4.2.5.3-2…01…USE OF SYSTEM CALL FUNCTIONS


4.2.5.4  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲D̲a̲t̲a̲

         All Coroutine Monitor data are located in the user
         area of the process.  The coroutine monitor itself
         contains only three variables.  The other data used
         are supplied by the using process.



4.2.5.4.1    I̲n̲t̲e̲r̲n̲a̲l̲ ̲V̲a̲r̲i̲a̲b̲l̲e̲s̲



4.2.5.4.1.1  L̲i̲s̲t̲ ̲o̲f̲ ̲R̲e̲a̲d̲y̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲s̲

         A doubly chained list of coroutine records.  The list
         is sorted according to the priority of the coroutines.
         


                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     FIRST READY COROUTINE
                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         READYLIST:
                     LAST READY COROUTINE
                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲




4.2.5.4.1.2  R̲u̲n̲n̲i̲n̲g̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲

         A pointer to the coroutine record of the running coroutine.


         RUNNING COROUTINE:

                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     COROUTINE POINTER
                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



4.2.5.4.1.3  C̲u̲r̲r̲e̲n̲t̲ ̲S̲u̲b̲p̲r̲o̲c̲e̲s̲s̲ ̲I̲d̲.̲

         An integer identifying the subprocess to which the
         running coroutine belongs.  This variable is not used
         by coroutine monitor itself, but maintained on behalf
         of CSF COMMON FUNCTIONS.



4.2.5.4.2    R̲e̲c̲o̲r̲d̲ ̲F̲o̲r̲m̲a̲t̲s̲

         This section describes the formats of the records worked
         upon by coroutine monitor.



4.2.5.4.2.1  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲R̲e̲c̲o̲r̲d̲


              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 NEXT
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 PREVIOUS
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             SUBPROCESS ID        PRIORITY
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


                     REGISTER 0-7
                     SAVE AREA







              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



                     USER DATA


              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



         SUBPROCESS ID: Identification of subprocess to which
                        this coroutine belongs.

         PRIORITY:      Used to sort ready list and semaphore
                        lists.

         REGISTER SAVE: Contains the saved registers when the
                        coroutine is waiting.

         USER DATA:     Contains the private data for this coroutine.
                         The length and detailed format of this
                        field is defined entirely by the application.
                         May differ among different coroutines.


4.2.5.4.2.2  I̲n̲t̲e̲r̲n̲a̲l̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲ ̲F̲o̲r̲m̲a̲t̲



          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 NEXT
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 PREVIOUS
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     T   PRIORITY
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         
                 USER DATA

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



         T:          Type
                     Has the value INTERNAL

         PRIORITY:   Used to sort a list of operations in a
                     semaphore.

         USER DATA:  Length and format of this field is defined
                     entirely by application.  May differ among
                     different operations.



4.2.5.4.2.3  E̲x̲t̲e̲r̲n̲a̲l̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲ ̲F̲o̲r̲m̲a̲t̲

         External operations are used to represent pending system
         calls.  They may also contain a data field if appropriate.



          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     NEXT
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     PREVIOUS
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     S   A   T   PRIORITY
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             ACTIVATION POINTER
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             SYSTEM OPERATION REFERENCE
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 OPTIONAL USER DATA

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



         T:             Type
                        Has the value EXTERNAL

         A:             Activation
                        Determines the action when the associated
                        event has happened.
                        Values are:    SIGNAL-TO-SEMAPHORE
                                       ACTIVATE-COROUTINE
                                       SET-DONE-STATUS

         S:             Status
                        Values are:    PENDING
                                       SENT-TO-SEMAPHORE
                                       DONE

         ACT. POINTER:  Pointer to a semaphore or a coroutine.
                         Nil if Activation = SET-DONE-STATUS.
                        The pointer is used when event has happened.

         SYSTEM OPERA-
         TION REF.:     Ref. to system operation.



4.2.5.4.2.4  S̲e̲m̲a̲p̲h̲o̲r̲e̲ ̲R̲e̲c̲o̲r̲d̲ ̲F̲o̲r̲m̲a̲t̲



              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                     SEMAPHORE COUNTER
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 FIRST IN SEMAPHORE LIST
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                 LAST IN SEMAPHORE LIST
              ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



4.2.5.5  I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲

         Coroutine Monitor calls System Call Monitor and CSF
         Common Functions as shown below:





                     
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ I̲N̲I̲T̲ ̲S̲Y̲S̲T̲E̲M̲ ̲C̲A̲L̲L̲ ̲        ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
                                       ̲

         COROUTINE   W̲A̲I̲T̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲         SYSTEM CALL
                     
         MONITOR     C̲A̲N̲C̲E̲L̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲         MONITOR
                                                           
                                       

                     W̲A̲I̲T̲ ̲N̲E̲X̲T̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲       
                                             ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
                                       ̲
                                                                 
                                                                 
                                                                 
                                                                 
                                                                 
                                                                 
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲
                                                                 ̲

                     C̲H̲A̲N̲G̲E̲ ̲S̲U̲B̲P̲R̲O̲C̲E̲S̲S̲ ̲T̲D̲      CSF COMMON
                                               FUNCTIONS
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲                         ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲




4.2.6    S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲n̲i̲t̲o̲r̲



4.2.6.1  F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The functions of System Call Monitor are shown on Figure
         4.2.6.1-1.

         The five upper level main functions are MONITOR procedure
         entries which may be called directly from user mode.
          The System Call function is simply a combination of
         the two other functions Initiate System Call and Wait.

         The following sections describe input- and output parameters
         and main tasks of each function.



















































       Fig. 4.2.6.1-1…01…SYSTEM CALL MONITOR FUNCTIONS



4.2.6.1.1    I̲n̲i̲t̲ ̲S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲

         Input:  Function
                 System Call Parameters
                 User Operation Reference

         Output: System Operation Reference
                 Completion Code
                 Exit Condition

         A free SOCB is allocated and initialized with:

         a)  FUNCTION taken from input parameters

         b)  USER OPERATION REFERENCE taken from input parameters

         c)  SYSTEM CALL STATUS is set to PENDING

         d)  PROCESS WAIT STATUS is set to NOT WAITING

         Function is then used to select a SSCB where the SOCB
         is chained to the list of pending operations. The appropriate
         Service System is then entered in its INIT FUNCTION
         entry point, which is found in the SSCB entry point
         list.

         Upon return from Service System, the SYSTEM CALL STATUS
         of SOCB is inspected. If it is DONE, the SOCB is chained
         to the list of ready operations. If it is ERROR, the
         SOCB is released.

         Finally return is made with the completion code and
         exit condition received from Service System, and with
         the System Operation Reference return parameter set
         to OWN ID of the SOCB.



4.2.6.1.2    W̲a̲i̲t̲

         Input:  System Operation Reference

         Output: Return Parameters
                 Completion Code
                 Exit Condition



         Waits for completion of the system call identified
         by System Operation Reference.

         The SOCB is located by means of System Operation Reference.
         If its System Call Status is PENDING, the internal
         procedure Wait event is called. This is repeated until
         the System Call Status of SOCB has changed to DONE.
         Then the Service System is entered in the COMPLETE
         FUNCTION entry point.

         Upon return from Service System, the SOCB is released,
         and the output parameters from Service System are then
         returned to calling application.



4.2.6.1.3    S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲

         Input:  Function
                 Parameters

         Output: Return Parameters
                 Completion Code
                 Exit condition

         The function is a combination of Init System Call and
         Wait.



4.2.6.1.4    C̲a̲n̲c̲e̲l̲

         Input:  System Operation Reference

         Output: Completion Code
                 Exit Condition

         Requests a previously initiated operation to be cancelled.
         Locates SOCB by means of System Operation Reference.
         If System Call Status of SOCB is PENDING, the Service
         System procedure cancel Function is entered. The Service
         System may change status to DONE before return to System
         Call Monitor. If so, the operation is chained to the
         list of ready operations.

         Note that the operation must be "waited for" by the
         calling application even after it has cancelled the
         operation.


4.2.6.1.5    W̲a̲i̲t̲ ̲N̲e̲x̲t̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲

         Output: User Operation Reference
                 System Operation Reference

         If there are elements in the System Call Monitor "List
         of Ready Operation", the first SOCB is chained out
         from the list and the parameters from this SOCB is
         returned to calling application.

         Otherwise, the internal procedure Wait Event is called
         repeatedly until an element appears in the list.



4.2.6.1.6    W̲a̲i̲t̲ ̲E̲v̲e̲n̲t̲

         This is an internal System Call Monitor procedure containing
         the central waiting point for the process. It is called
         when the process cannot proceed further until some
         external event has occurred.

         The list of SSCBs is used to collect a parameter list
         for the IO system procedure General Await. Each SSCB
         having a non-empty list of pending SOCBs is included
         in the General Await parameter.

         The General Await may result in info from more than
         one synchronization element in addition to completion
         of one IO System operation. Upon return form General
         Await the parameter list is then inspected in order
         to locate SSCBs for which info is received. For each
         such SSCB, the corresponding Service System is entered
         in the entry point Answer Received. The Service System
         shall use received info to locate items in SOCB list
         for which the operation is now complete. For each such
         SOCB the Service System shall then change the System
         Call Status to DONE. Upon return from Answer Received
         the Wait Event procedure shall move all SOCBs with
         DONE status from the list of pending SOCBs to the common
         "List of Ready Operations".

         If a Service System uses IO System instead of a special
         synchronization element, the info parameter in Answer
         Received shall be the operation reference returned
         by IO System.





4.2.6.1.7    A̲l̲l̲o̲c̲a̲t̲e̲ ̲S̲O̲C̲B̲

         Allocates an SOCB from the list of free SOCBs.



4.2.6.1.8    R̲e̲l̲e̲a̲s̲e̲ ̲S̲O̲C̲B̲

         Returns an SOCB to the list of free SOCBs. The status
         of the SOCB is set to FREE.



4.2.6.1.9    D̲e̲f̲i̲n̲e̲ ̲S̲y̲n̲c̲h̲r̲o̲n̲i̲z̲a̲t̲i̲o̲n̲ ̲E̲l̲e̲m̲e̲n̲t̲

         Input:  Service System Id
                 Synchronization Element Object Index

         Output: Completion Code

         Defines the synchronization element associated with
         the specified Service System.



4.2.6.1.10   I̲/̲O̲ ̲S̲y̲s̲t̲e̲m̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲

         The I/O System Interface is a Service System used to
         interface to the I/O System via System Call Monitor.

         If a process has coroutines and wants to let coroutines
         access the I/O System, it must be done via this interface.

         If a process calls other Service Systems via System
         Call Monitor, it must also use the I/O System Interface
         to access the I/O System.

         In all other cases a process may as well access the
         I/O System directly.

         The I/O System Interface has the same parameter conventions
         as the I/O System "Init-Wait" mechanism except for
         one difference:



         -   The function code in I/O System Init is a constant
             parameter in the MON call while the function code
             is delivered in R6 in the corresponding call via
             I/O System Interface.

         The return parameters and exit conditions of WAIT will
         be the same as for the I/O System WAITOPERATION function.



4.2.6.1.11   P̲C̲F̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲

         The PCF interface is a Service System used by processes
         which shall make direct use of info received at a synchronization
         element.

         The PCF interface allows the application process to
         call the Kernel function AWAIT via System Call Monitor.

         If a process shall wait in more than one synchronization
         element, it shall allocate an incarnation of PCF interface
         for each of the synchronization elements.



4.2.6.2  S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲

         The five main functions of figure 4.2.6.1-1 are entries
         in a MONITOR procedure.

         The bottom level functions of the figure are internal
         procedures in System Call Monitor. As MONITOR procedure
         entries the functions are all logically executed in
         the calling process.



4.2.6.3  D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲









                     FIGURE 4.2.6.3-1


4.2.6.4  S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲D̲a̲t̲a̲



4.2.6.4.1    L̲i̲s̲t̲ ̲o̲f̲ ̲S̲e̲r̲v̲i̲c̲e̲ ̲S̲y̲s̲t̲e̲m̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲s̲

         A doubly chained list of SSCBs:

                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

         SSCBLIST:    ̲ ̲ ̲ ̲ ̲F̲I̲R̲S̲T̲ ̲S̲S̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                      ̲ ̲ ̲ ̲ ̲L̲A̲S̲T̲ ̲S̲S̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



4.2.6.4.2    L̲i̲s̲t̲ ̲o̲f̲ ̲R̲e̲a̲d̲y̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲s̲

         A doubly chained list of System Operation Control Blocks,
         which describe ready operations.

                      ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

         READYLIST:   ̲ ̲ ̲F̲I̲R̲S̲T̲ ̲R̲E̲A̲D̲Y̲ ̲S̲O̲C̲B̲ ̲ ̲ ̲ ̲ ̲

                      ̲ ̲ ̲L̲A̲S̲T̲ ̲R̲E̲A̲D̲Y̲ ̲S̲O̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲



4.2.6.4.3    L̲i̲s̲t̲ ̲o̲f̲ ̲F̲r̲e̲e̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲s̲

         A doubly chained list of free System Operation Control
         Blocks:

                         ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

         FREE ̲SOCBLIST:  ̲ ̲F̲I̲R̲S̲T̲ ̲F̲R̲E̲E̲ ̲S̲O̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                         ̲ ̲ ̲L̲A̲S̲T̲ ̲F̲R̲E̲E̲ ̲S̲O̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲





4.2.6.4.4    W̲o̲r̲k̲ ̲L̲o̲c̲a̲t̲i̲o̲n̲s̲

         A set of memory areas used by the procedures to save
         data and intermediate results. There are the following
         areas:

         a)  Common working area for Init System Call and Wait

         b)  Common working area for System Call, Cancel and
             Wait Next Operation.

         c)  Common working area for Wait event, Release SOCB,
             and Allocate SOCB.



4.2.6.4.5    S̲y̲s̲t̲e̲m̲ ̲O̲p̲e̲r̲a̲t̲i̲o̲n̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲ ̲A̲r̲r̲a̲y̲

         An array of records used for SOCBs. The record format
         of element is:

         SOCB:

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲N̲E̲X̲T̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲P̲R̲E̲V̲I̲O̲U̲S̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲U̲S̲E̲R̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲ ̲R̲E̲F̲E̲R̲E̲N̲C̲E̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲S̲O̲C̲B̲ ̲I̲D̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲S̲ ̲ ̲C̲S̲ ̲ ̲ ̲ ̲ ̲ ̲

         S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲ ̲I̲D̲ ̲ ̲S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲ ̲F̲C̲T̲ ̲

                 SERVICE SYSTEM DATA

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


         OWN ID: Index of this SOCB in SOCB array

         S:      SOCB Status:        Free
                                     Allocated

         CS:     System Call Status: Pending
                                     Done
                                     Error


         SERVICE SYSTEM DATA         Working area for the service
                                     system. Used for data which
                                     must survive between the
                                     processing steps of a system
                                     call.

         The array length shall be the maximum number of concurrent
         system calls that the process may need.



4.2.6.4.6    S̲e̲r̲v̲i̲c̲e̲ ̲S̲y̲s̲t̲e̲m̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲ ̲A̲r̲r̲a̲y̲

         An array of records used to control the Service Systems.
         The arraylength shall be the number of service system
         or service system incarnations that the process needs
         to access.

         The record format of each element is:

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲N̲E̲X̲T̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲P̲R̲E̲V̲I̲O̲U̲S̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲T̲Y̲P̲E̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲L̲O̲C̲K̲ ̲I̲N̲F̲O̲R̲M̲A̲T̲I̲O̲N̲ ̲ ̲ ̲ ̲

          ̲ ̲ ̲ ̲ ̲ ̲L̲O̲C̲K̲ ̲S̲E̲M̲A̲P̲H̲O̲R̲E̲ ̲A̲D̲D̲R̲E̲S̲S̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲


          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲P̲C̲F̲ ̲S̲I̲N̲G̲L̲E̲ ̲P̲A̲R̲A̲M̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲E̲N̲T̲R̲Y̲ ̲I̲N̲I̲T̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲E̲N̲T̲R̲Y̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲E̲N̲T̲R̲Y̲ ̲C̲O̲M̲P̲L̲E̲T̲E̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲E̲N̲T̲R̲Y̲ ̲C̲A̲N̲C̲E̲L̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲F̲I̲R̲S̲T̲ ̲S̲O̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

          ̲ ̲L̲A̲S̲T̲ ̲S̲O̲C̲B̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



         TYPE:

         Specifies communication type of service system:

         -   Direct IOS Interface
         -   Via IOS
         -   Via associated synch. element

         LOCK INFORMATION

         Specifies if hardware semaphore shall be locked and
         interrupts disabled before entry to Service System

         PCF SINGLE PARAM:

         Used to await answers to this service system

         ENTRY POINTS:

         Address of the four entry points of the service system



4.2.6.4.7    A̲c̲c̲e̲s̲s̲ ̲R̲i̲g̲h̲t̲s̲ ̲a̲n̲d̲ ̲L̲o̲g̲i̲c̲a̲l̲ ̲A̲d̲d̲r̲e̲s̲s̲i̲n̲g̲

         The System Call Monitor data shall be protected from
         access in user mode and shall thus be mapped in with
         "No access".

         All System Call Monitor data are private for one process.
         So each process using System Call Monitor has its own
         incarnation of System Call Monitor data. None of those
         data are shared between processes:

         The System Call Monitor Data are located as follows
         in the logical address space of the process:



         64K

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

                       KERNEL DATA
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲     ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

                                                         CSF
                                                        COMMON
                                                         DATA

          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲     ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

                SYSTEM CALL MONITOR DATA
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



                       USER DATA


          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲



4.2.6.5  I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲

         System Call Monitor is called by Coroutine Monitor,
         and it calls Queue Monitor and Message Monitor as Service
         Systems. The interface functions are shown in figure
         4.2.6.5-1.









                     FIGURE 4.2.6.5-1


4.3      M̲e̲m̲o̲r̲y̲ ̲L̲a̲y̲o̲u̲t̲

         See section 2.3.5.