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

⟦7703c57f7⟧ Wang Wps File

    Length: 60197 (0xeb25)
    Types: Wang Wps File
    Notes: CPS/SDS/024               
    Names: »1477A «

Derivation

└─⟦d26bbd021⟧ Bits:30005813 8" Wang WCS floppy, CR 0120A
    └─ ⟦this⟧ »1477A « 

WangText

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

…02…CPS/SDS/024

…02…850901…02……02…
CAMPS SYSTEM FUNCTIONS
DETAILED DESIGN ISSUE 2…02…CAMPS






4.2.4.4.5    M̲M̲O̲N̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲s̲



4.2.4.4.5.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  MMON RECEIVE Coroutine

             The coroutine receives SAVE and MFT messages sent
             from MMON in other processes.

             Each MFT message is formatted to an MFT record
             and written to the MFT file.

             Each SAVE message is sent to the save Semaphore,
             to be processed by the save Coroutine.

         b)  MMON SAVE coroutine

             The coroutine receives SAVE messages sent by RECEIVE
             coroutine.

             If the CIF in question is about to be deleted,
             an automatic deletion Log record is produced and
             sent to LOG.

             The coroutine produces a checkpoint by calling
             the MMON SAVE function.

         c)  MMON LOGSAVE COROUTINE as SAVE COROUTINE. Used
             by saving requests from the LOG package to prevent
             DEAD LOCK.



4.2.4.4.5.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  MMON RECEIVE Coroutine

             Activation:

             -   The MMON receive coroutine is invoked via the
                 CSF Request Synchronization Element (refer
                 fig. 4.2.4.4.5-1)

         b)  MMON SAVE Coroutine

             Activation:

             -   The MMON SAVE coroutine is invoked via the
                 SAVE Semaphore (refer fig. 4.2.4.4.5-1).





4.2.4.4.5.3 C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         cf. fig. 4.2.4.4.5-2

         C̲o̲r̲o̲u̲t̲i̲n̲e̲s̲

         CSF ̲RECEIVE ̲COROUTINE              4.2.4.4.5.5.a
         CSF ̲SAVE ̲COROUTINE                 4.2.4.4.5.5.b
         CSF ̲LOG ̲SAVE ̲COROUTINE             4.2.4.4.5.5.f

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

         PERFORM ̲MFT                        4.2.4.4.5.5.c
         INIT ̲DELETION                      4.2.4.4.5.5.d
         SEND ̲LOG                           4.2.4.4.5.5.e



4.2.4.4.5.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  Data references

             COROUTINE ̲OPERATION            refer 4.1.6.1.5.2
             COROUTINE ̲RECORD               refer 4.1.6.1.5.1
             COROUTINE ̲SEMAPHORE            refer 4.1.6.1.5.3
             LOG ̲RECORD                     TBD

         b)  External Data

             CSF ̲RECEIVE ̲SYNCEL
             SAVE ̲SEMAPHORE
             OPERATION             (m)

         c)  Local Data

             CSF receive coroutine record:

             VAR     RECEIVE ̲CO ̲RECORD:

                        RECORD

                          HEAD:    COROUTINE ̲RECORD;
                          RETURN:  INTEGER;

                        END;

             VAR     SAVE ̲CO ̲RECORD:  COROUTINE ̲RECORD;





4.2.4.4.5.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

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

         GET ̲BUFFER                         refer 4.2.1.7.8
         WRITE ̲BUFFER                       refer 4.1.7.2.1.3
         SEND ̲REQUEST                       refer 4.1.7.2.2.6
         DISMANTLE ̲BUFFER                   refer 4.1.7.2.1.7
         RECEIVE ̲FIRST ̲QEL                  refer 4.1.7.2.2.1
         DISMANTLE                          refer 4.1.7.2.2.4
         WAIT ̲OPSEM                         refer 4.1.7.2.5.7
         AWAIT ̲SYNCEL                       refer 4.1.7.2.6.7
         SIGNAL ̲OPSEM                       refer 4.1.7.2.5.8
         PCF ̲SEND                           refer (d) 4.1.6.1
         INIT ̲AWAIT                         refer (d) 4.1.6.7

         a)  C̲S̲F̲ ̲R̲E̲C̲E̲I̲V̲E̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Await a signal in CSF ̲RECEIVE ̲SYNCEL.  When signalled,
             it checks whether the received message is a SAVE
             ̲COMMAND or a MFT command and the appropriate procedure
             is called.

             If the SAVE command is a SAVE request from the
             LOG PACKAGE the LOG ̲SAVE coroutine is signalled.
             Otherwise the SAVE coroutine is signalled.

             Upon return, the action is repeated.

             F̲l̲o̲w̲g̲r̲a̲m̲

             None

         b)  C̲S̲F̲ ̲S̲A̲V̲E̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Await a save message in the SAVE ̲SEMAPHORE.  When
             the message has been received, the deletion flag
             in message record is inspected.  If TRUE it is
             checked, by calling INIT ̲DELETION, if the CIF is
             about to be deleted and if a log record should
             be sent.  The MMON SAVE function is called.  If
             necessary, a log record is sent. Then the ANSWER
             ̲SYNCEL of calling process is signalled, the operation
             returned and the coroutine is ready for a new save
             message.

             F̲l̲o̲w̲g̲r̲a̲m̲

             See fig. 4.2.4.4.5.5-2


         c)  P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲P̲E̲R̲F̲O̲R̲M̲ ̲M̲F̲T̲ ̲(̲O̲P̲)̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             It is checked that the MFT file is open.  Time
             is read and an MFT record is created in MFT buffer.
              If buffer is full, output to MFT file is started
             and completion is awaited.  If the file is full,
             it is closed.  OP is returned to OPERATION ̲POOL.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             None

         d)  I̲n̲i̲t̲.̲ ̲D̲e̲l̲e̲t̲i̲o̲n̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             It is checked whether deletion of the referenced
             view will lead to deletion of the CIF from short
             term storage or not.  If a deletion shall be performed
             a Log record is read from the CIF and a Log Message
             is sent by calling SEND ̲LOG.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             None

         e)  S̲e̲n̲d̲ ̲L̲O̲G̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Get a log-buffer by calling the utility function
             GET ̲BUFFER and a log record is made.

             Then a QEL referencing, the LOG record is sent
             to the LOG Queue by calling SEND ̲REQUEST.  The
             Reply is checked and buffer and QEL is dismantled.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             See fig. 4.2.4.4.5.5-4

         f)  C̲S̲F̲ ̲L̲O̲G̲ ̲S̲A̲V̲E̲ ̲c̲o̲r̲o̲u̲t̲i̲n̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             As SAVE coroutine except that no deletion check
             is performed.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             None



         C̲S̲F̲ ̲S̲a̲v̲e̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲



         Start



         Save Coroutine Loop


             WAIT ̲OPSEM (SAVE ̲SEMAPHORE)(SAVE ̲OP)

             SAVE ̲OP.DELETION ̲EQ ̲TRUE? INIT ̲DELETION(SAVE ̲OP.VIEW)(LOG)

             SAVE(SAVE ̲OP.VIEW,SAVE ̲OP.DISMANTLE,CSF.BUF, CSF
             ̲BUF ̲SIZE)


             LOG EQ TRUE?  SEND ̲LOG(TERMINATE ̲DELETION ̲LOG)


             PROCESS = SAVE ̲OP.SENDER


             SAVE ̲OP.RETURN ̲SOCB = SAVE ̲OP.SOCB

             PCF ̲SEND(SYNCEL (PROCESS), % SAVE ̲OP.DATA)

             SIGNAL ̲OPSEM(OPERATION ̲POOL, SAVE ̲OP)


         End Save Coroutine Loop
















                   FIGURE 4.2.4.4.5.5-2


         PROCEDURE  SEND ̲LOG(LOG ̲TYPE:  (INIT ̲DELETION ̲LOG,
                                      TERMINATE ̲DELETION ̲LOG))


         Start


         GET ̲BUFFER(  )(BUFFER)


         LOG ̲BUFFER.LOG ̲COMMAND = LOG ̲TYPE

         WRITE ̲BUFFER (BUFFER,LOG ̲BUFFER,LOG ̲SIZE, 1)


         Case SEND ̲REQUEST (LOG ̲SEND ̲PARAMS, BUFFER,
                            LOG ̲QUEUE, LOG ̲REPLY ̲QUEUE)
                           (CC):  ERROR ̲OK


             OK? ̲DISMANTLE ̲BUFFER(BUFFER)(CC):  ERROR ̲OK

                 RECEIVE ̲FIRST ̲QEL(TRUE, LOG ̲REPLY ̲QUEUE)

                                  (LOG ̲ATTRIBUTES,
                                  QEL, SUBQ, CC):  ERROR ̲OK

                 RECEIVE ̲OK?       DISMANTLE(QEL):  ERROR ̲OK

             ERROR? DISMANTLE ̲BUFFER (BUFFER)(CC):


         End Case SEND ̲REQUEST



         RETURN


         Stop








                   FIGURE 4.2.4.4.5.5-4


4.2.4.4.6    A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲ ̲a̲n̲d̲ ̲P̲r̲o̲f̲i̲l̲e̲s̲



4.2.4.4.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̲s̲

         The Attributes and profiles contain 2 functions, the
         functional description of which can be found as follows:

         a)  Change Profile              4.1.7.2.4.10
         b)  Get View Attributes         4.1.7.2.4.5
         c)  Get Profile                 4.2.4.7.1.1



4.2.4.4.6.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         The module has 2 package interfaces:

         a)  Change profile              4.1.7.2.4.10
         b)  Get View Attributes         4.1.7.2.4.5
         c)  Get Profile                 4.2.4.7.1.2



4.2.4.4.6.3 C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         Ref. figure 4.2.4.4.6.1-1

         S̲C̲M̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲

         a)  CHANGE ̲PROFILE              4.2.4.4.6.5.a
         b)  GET ̲VIEW ̲ATTRIBUTES         4.2.4.4.6.5.b

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

         c)  GET ̲PROFILE                 4.2.4.4.6.5.c



4.2.4.4.6.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             HANDLE ̲CONTROL ̲BLOCK        refer 4.2.4.5
             CHANGE ̲ATTRIBUTES ̲INFO      refer 4.1.7.2.7.4
             CHANGE ̲ATTRIBUTES ̲ANSWER    refer 4.1.7.2.7.4
             SOCB                        refer 4.1.6.1.6.1
             IF ̲CONTROL ̲BLOCK            refer 4.2.4.5



         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲d̲a̲t̲a̲

             HCB.QELCOUNT
             HCB.CIF
             CIFCB.PROFILE   (m)
             CIFCB.HCBLIST
             HCB.MMS ̲REF

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             N/A



4.2.4.4.6.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

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

         CONVERT ̲PROFILE                 refer 4.2.4.6.10
         CHECK ̲PROFILE…02…refer 4.2.2.7.7
         CSF ̲RETIRE                      refer 4.2.1.7.7

         a)  C̲h̲a̲n̲g̲e̲ ̲P̲r̲o̲f̲i̲l̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks view reference for ownership and type. 
             Input parameter PROFILE is converted to security
             profile.

             It is checked that the profile is contained in
             the profile of any subprocess referencing the CIF.

             It is checked that the new PROFILE is contained
             in the profile of the Queues involved.

             If OK, the profile of corresponding CIFCB is changed
             to PROFILE and a CHANGE ̲ATTRIBUTES request is sent
             to MMS by calling SEND ̲TO ̲MMS.  Upon return, the
             answer is checked and if not OK, the profile of
             the CIFCB is changed to the previous profile.

             If not, the SOCB status is set to done.

             Function completion is awaited.

             CSF shared accessed in CRITICAL REGION.

             Waiting point in WAIT.



             F̲l̲o̲w̲g̲r̲a̲m̲:

             None

         b)  G̲e̲t̲ ̲V̲i̲e̲w̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             The view reference is checked for ownership and
             type.

             If OK, a GET ̲VIEW ̲ATTRIBUTES command is sent to
             MMS by calling SEND ̲TO ̲MMS.  Upon return function
             completion is awaited.
             CSF shared accessed in CRITICAL REGION.

             Waiting point in WAIT.

             Flowgram:  N/A.

         c)  G̲e̲t̲ ̲P̲r̲o̲f̲i̲l̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Object ref. is fetched from QEL. A pointer to CIFCB
             is fetched from HCB and profile is delivered.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             N/A



















































               FIGURE 4.2.4.4.6-1


4.2.4.4.7    S̲t̲o̲r̲a̲g̲e̲ ̲a̲n̲d̲ ̲D̲u̲m̲p̲



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

         The Storage and Dump Module contains 5 functions, the
         functional description of which can be found as follows:

         a)  Store                       4.1.7.2.4.15
         b)  Init Dump                   4.1.7.2.4.17
         c)  Dump CIF Sequence           4.1.7.2.4.18
         d)  Terminate Dump              4.1.7.2.4.19
         e)  Clear                       4.1.7.2.4.20



4.2.4.4.7.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         The module has 5 package interfaces:

         a)  Store                       4.1.7.2.4
         b)  Init. Dump                  4.1.7.2.4
         c)  Dump CIF Sequence           4.1.7.2.4
         d)  Terminate Dump              4.1.7.2.4
         e)  Clear                       4.1.7.2.4



4.2.4.4.7.3 C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         Cf. fig. 4.2.4.4.7.3-1



4.2.4.4.7.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             SUBPROCESS ̲RECORD           refer 4.1.4.1.2
             QEL ̲array                   refer 4.1.4.11






         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             PRIMARY ̲QEL.OWNER

             PRIMARY ̲QEL.OBJECT ̲TYPE



4.2.4.4.7.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

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

         CSF ̲RETIRE                      refer 4.2.1.7.7
         CSF ̲TRACE                       refer 4.1.7.2.1.12
         CHECK ̲PRIVILEGE                 refer 4.1.5.4

         a)  S̲t̲o̲r̲e̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks the view reference for ownership and type.
              It is checked that calling subprocess has the
             right to call STORE.  Then a STORE request is sent
             to MMS by calling SEND ̲TO ̲MMS.

             Upon return function completion is awaited.
             CSF shared accessed in CRITICAL REGION.
             Waiting point in WAIT.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             N/A

         b)  I̲n̲i̲t̲.̲ ̲d̲u̲m̲p̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks the file-reference.  It is checked that
             calling subprocess has the right to call INIT ̲DUMP.
              Then an INIT-DUMP command is sent to MMS by calling
             SEND ̲TO ̲MMS.



             Upon return function completion is awaited.

             Waiting point in WAIT.

             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A.

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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             INIT ̲RESPONSE ̲TIME is called.

             Checks the file-reference and address of input
             LIST.  It is checked that calling subprocess has
             the right to call D̲U̲M̲P̲ ̲C̲I̲F̲ ̲S̲E̲Q̲U̲E̲N̲C̲E̲ and that a
             previous INIT ̲DUMP has been performed.  Then a
             DUMP ̲CIF ̲SEQUENCE is sent to MMS.  Upon return
             UPDATE ̲RESPONSE ̲TIME is called and function completion
             is awaited. CSF shared accessed in CRITICAL REGION.
             Waiting point in WAIT.

             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A

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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks the file reference.

             It is checked that calling subprocess has the right
             to call TERMINATE ̲DUMP and that a previous INIT
             ̲DUMP has been performed.  Then a TERMINATE ̲DUMP
             command is sent to MMS.

             Upon return, function completion is awaited.

             Waiting point in WAIT.

             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A



         e)  CLEAR

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             INIT ̲RESPONSE ̲TIME is called
             Checks that calling subprocess has the right to
             call CLEAR.  
             Then a CLEAR command is sent to MMS by calling
             SEND ̲TO ̲MMS.

             Upon return UPDATE ̲RESPONSE ̲TIME is called and
             function completion is awaited.
             CSF shared accessed in CRITICAL REGION.
             Waiting point in WAIT

             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A
















































                    FIGURE 4.2.4.4.7-1


4.2.4.4.8    I̲n̲i̲t̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲



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

         The Init. and Control module contains 6 functions,
         the functional description of which can be found as
         follows:

         a)  Set security parameters     4.1.7.2.4.26
         b)  Start System                4.1.7.2.4.27
         c)  Set Threshold Values        4.1.7.2.4.23
         d)  Get Threshold Warning       4.1.7.2.4.24
         e)  Get Storage Occupancy       4.1.7.2.4.25
         f)  Get MMS Statistics          4.1.7.2.4.28
         g)  Get CIF                     h) 6.3.7.7



4.2.4.4.8.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         The module has 5 package interfaces:

         a)  Set Security Parameters     4.1.7.2.4.26
         b)  Start System                4.1.7.2.4.27
         c)  Set Threshold Values        4.1.7.2.4.23
         d)  Get Threshold Warning       4.1.7.2.4.24
         e)  Get Storage Occupancy       4.1.7.2.4.25
         f)  Get MMS Statistics          4.1.7.2.4.28
         g)  Get CIF                     h) 6.3.7.7



4.2.4.4.8.3 C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         cf. figure 4.2.4.4.8.3-1

         SCM procedures:

         a)  SET ̲SECURITY ̲PARAMETERS     4.2.4.4.8.5 a)
         b)  START ̲SYSTEM                4.2.4.4.8.5 b)
         c)  SET ̲THRESHOLD ̲VALUES        4.2.4.4.8.5 c)
         d)  GET ̲THRESHOLD ̲WARNING       4.2.4.4.8.5 d)
         e)  GET ̲STORAGE ̲OCCUPANCY       4.2.4.4.8.5 e)
         f)  GET ̲MMS ̲STATISTICS          4.2.4.4.8.5 f)
         g)  GET ̲CIF                     4.2.4.4.8.5 g)





4.2.4.4.8.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             SOCB                            4.1.6.1.6.1
             RESTORE ̲INFO                    4.1.7.2.7.4
             RESTORE ̲ANSWER                  4.1.7.2.7.4
             HCB ̲ARRAY                       4.2.4.5
             CHECKPOINT ̲PARAMETER ̲BLOCK      4.1.6.2.2
             SECURITY ̲INTERROGATION ̲PROFILE  2.2.2.6.2
             SECURITY ̲WARNING ̲PROFILE        2.2.2.6.2
             AUTOMATIC ̲DELETION ̲PROFILE      2.2.2.6.3

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             CIFCB.USAGE                     (m)
             CIFCB.PROFILE                   (m)
             CIFCB.CIF ̲ID                    (m)
             CIFCB.STOPPED ̲STATUS            (m)
             CIFCB.STATE                     (m)
             HCB.MMS ̲REF                     (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             QELDATA:                        PRIMARY ̲QEL



4.2.4.4.8.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

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

         ALLOCATE ̲RESOURCE                   4.2.1.7.4
         CSF ̲RETIRE                          4.2.1.7.7
         REINSERT ̲IN ̲QUEUE                   4.2.2.7.4
         CHECK PRIVILEGE                     4.1.5.4



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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks that calling process is allowed to use this
             function. Then inserts the parameters as specified.
             CSF shared accessed in CRITICAL REGION

             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A

         b)  S̲t̲a̲r̲t̲ ̲S̲y̲s̲t̲e̲m̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks that calling process is allowed to use this
             function.

             Then the following is repeated:

             A RESTORE command is sent to MMS

             A RESTORE ̲PARAMETER ̲BLOCK is received from MMS
             and system state is restored according to this
             by calling RESTORE ̲CIF until no RESTORE ̲PARAMETER
             ̲BLOCK is received from MMS.  Then function completion
             is awaited.  Waiting point in WAIT.
             CSF shared accessed in CRITICAL REGION.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             See figure 4.2.4.4.8.5-1

         c)  Deleted

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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks that calling process is allowed to use this
             function.

             Then sends a GET ̲THRESHOLD ̲WARNING command to MMS.

             Upon return function completion is awaited.

             Waiting point in WAIT



             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A

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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks that calling process is allowed to use the
             function.

             Then sends a GET ̲STORAGE ̲OCCUPANCY command to MMS.

             Upon return function completion is awaited.

             Waiting point in WAIT.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             N/A

         f)  G̲e̲t̲ ̲M̲M̲S̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Checks that calling process is allowed to use this
             function.

             Then sends a GET ̲MMS ̲STATISTICS command to MMS.

             Waiting point in WAIT

             Upon return the MMS ̲STATISTICS record is updated
             with average response time statistics.

             Then function completion is awaited.
             CSF shared accessed in CRITICAL REGION.

             F̲l̲o̲w̲g̲r̲a̲m̲

             N/A

         g)  R̲e̲s̲t̲o̲r̲e̲ ̲C̲I̲F̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             A CIFCB is allocated and updated according to the
             RESTORE ̲PARAMETER ̲BLOCK.



             Then, for all elements in the HANDLE ̲LIST, the
             following is repeated:

             An HCB is generated according to 
             CHECKPOINT ̲HAND-LE ̲RECORD and for all elements
             in QEL ̲LIST, a QEL is allocated and reinserted
             in the original QUEUE by calling REINSERT ̲IN ̲QUEUE.

             F̲l̲o̲w̲g̲r̲a̲m̲:

             None




         START ̲SYSTEM                    (BUFFER:  POINTER)
                                         MODE:     START ̲UP
                                                   ̲TYPE
                                         MMSFILE:  FDCB ̲INDEX
                                         SIZE:     INTEGER)
                                         (CC:      COMPLETION
                                                   ̲CODE):
                                                          ERROR
                                         ̲OK

         Start

         CHECK ̲PRIVILEGE (F ̲START ̲SYSTEM)

         Store ̲BUFFER ̲and ̲SIZE     "Used by SEND ̲TO ̲MMS"

         S̲t̲a̲r̲t̲ ̲M̲M̲S̲ (4.2.4.48.5-3)

         Restore LOOP

                 SEND ̲TO ̲MMS(RESTORE,FROM ̲MMS,NOT ̲USED)
                                         (ANSWER)

                 WAIT

                 EQUIVALENCE(ANSWER,RESTORE ̲ANSWER)

                 ANSWER.CC  NE OK?           EXIT

                 RESTORE ̲CIF

                 SOCB.STATUS = PENDING

         END Restore LOOP

         CHECK ̲CC(OK)

         COMPLETE ̲RETURN (FALSE)


         Stop




                   FIGURE 4.2.4.4.8.5-1


         S̲t̲a̲r̲t̲ ̲M̲M̲S̲

         Start

         Case MODE

             DEAD1?   MODE = COLD

             DEAD2?   MODE = COLD

             COLD?    MODE = COLD

             WARM1?   MODE = WARM

             WARM2?   MODE = WARM

         end case

         GET ̲FDCB ̲CAP ̲INDEX

         START ̲SYSTEM ̲INFO.MODE = MODE

         START ̲SYSTEM ̲INFO.MMS ̲FILE = CAP ̲INDEX

         SEND ̲TO ̲MMS (START ̲SYSTEM, NOT ̲USED, NOT ̲USED)

         WAIT

         EQUIVALENCE (ANSWER, START ̲SYSTEM ̲ANSWER)

         CHECK ̲CC (ANSWER.CC)

         ANSWER.CC NE OK?

         stop
















                   Figure 4.2.4.4.8.5-3






               FIGURE 4.2.4.4.8-1


4.2.4.4.9    M̲a̲i̲n̲ ̲M̲o̲d̲u̲l̲e̲



4.2.4.4.9.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 Main Module is implemented as 4 procedures called
         by System Call Monitor,

         a)  M̲M̲O̲N̲ ̲I̲n̲i̲t̲.̲

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

         b)  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 enter
             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.

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

             The continuation address of SOCB is used to enter
             the procedure which recently processed the answer
             from MMS.  The procedure completes its work and
             returns output parameters to System Call Monitor.

         d)  M̲M̲O̲N̲ ̲C̲a̲n̲c̲e̲l̲

             The MMON cancel has no effect and returns immediately
             to System Call Monitor 

             and 3 procedures used by actual functions:

         e)  W̲a̲i̲t̲

             Saves the continuation address for function completion
             and returns to System Call Monitor.



         f)  R̲e̲t̲u̲r̲n̲ ̲I̲n̲i̲t̲ ̲E̲r̲r̲o̲r̲

             An error return to System Call Monitor, with SOCB
             and registers updated according to error, is performed.

         g)  R̲e̲t̲u̲r̲n̲ ̲E̲r̲r̲o̲r̲

             SOCB is updated according to error.



4.2.4.4.9.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         a)  M̲M̲O̲N̲ ̲I̲n̲i̲t̲

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             a1) MMON ̲INIT (FUNCTION: I ̲FUNCTION,
                            C ̲SOCB:  POINTER,
                            INR04)
                            (OUTR04, EXIT: EXIT ̲NO,
                             CC: COMPLETION ̲CODE)

             a2) MMON ̲INIT(R0, R1, R2, R3, R4, R6, R7, R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             See figure 4.1.7.2.6-4

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

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             b1) MMON ̲ANSWER ̲RECEIVED (ANSWER: POINTER,
                                       FIRST ̲SOCB: POINTER,
                                       LAST ̲SOCB:  POINTER)
                                      (DONE ̲COUNT: INTEGER,
                                       DONE ̲SOCB:  POINTER)

             b2) MMON ̲ANSWER ̲RECEIVED (R4, R6, R7, R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             See figure 4.1.7.2.6-4



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

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             c1) MMON ̲COMPLETE   (C ̲SOCB: POINTER)
                                 (OUTR04,
                                  EXITNO: INTEGER,
                                  CC: COMPLETION ̲CODE)

             c2) MMON ̲COMPLETE (R0, R1, R2, R3, R4, R6, R7,
             R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             See figure 4.1.7.2.6-4

         d)  MMON cancel

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             d1) MMON ̲CANCEL (C ̲SOCB POINTER)

             d2) MMON ̲CANCEL (R7, R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             See fig. 4.1.7.2.6-4

         e)  W̲A̲I̲T̲

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             e1) WAIT

             e2) WAIT (R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲

             R5 LINK

             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲

             N/A

         f)  R̲e̲t̲u̲r̲n̲ ̲I̲n̲i̲t̲ ̲E̲r̲r̲o̲r̲

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲



             f1) RETURN ̲INIT ̲ERROR (CC: COMPLETION ̲CODE)
                                   (EXIT:EXIT ̲NUMBER,
                                    CC:  COMPLETION ̲CODE)

             f2) RETURN ̲INIT ̲ERROR (R6, R7, R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R5 LINK
             R7 CC

             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R6 EXIT
             R7 CC

         g)  R̲e̲t̲u̲r̲n̲ ̲E̲r̲r̲o̲r̲

             C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             g1) RETURN ̲ERROR (CC: COMPLETION ̲CODE)

             g2) RETURN ̲ERROR (R7,R5)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R5 LINK
             R7 CC               (KEPT)

             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             N/A



4.2.4.4.9.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             SOCB
             refer 4.1.6.1.6.1



         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SOCB.RETURN (m)
             SOCB.STATUS (m)
             MMON ̲ENTRY: (E ̲INIT, E ̲ANSWER, E ̲COMPLETE, E ̲CANCEL)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             N/A



4.2.4.4.9.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

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

         N/A

         a)  M̲M̲O̲N̲ ̲I̲n̲i̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             N/A

             F̲l̲o̲w̲g̲r̲a̲m̲:

             See figure 4.2.4.4.9.5-1

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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             N/A

             F̲l̲o̲w̲g̲r̲a̲m̲

             See figure 4.2.4.4.9.5-2

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

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             N/A

             F̲l̲o̲w̲g̲r̲a̲m̲:

             See figure 4.2.4.4.9.5-3



         d)  M̲M̲O̲N̲ ̲C̲a̲n̲c̲e̲l̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             Return is made. The procedure has no effect

             F̲l̲o̲w̲g̲r̲a̲m̲

             None

         e)  W̲a̲i̲t̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             N/A

             F̲l̲o̲w̲g̲r̲a̲m̲

             See figure 4.2.4.4.9.5-5

         f)  R̲e̲t̲u̲r̲n̲ ̲E̲r̲r̲o̲r̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             N/A

             F̲l̲o̲w̲g̲r̲a̲m̲

             See figure 4.2.4.4.9.5-6

         g)  C̲o̲m̲p̲l̲e̲t̲e̲ ̲R̲e̲t̲u̲r̲n̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

             N/A

             F̲l̲o̲w̲g̲r̲a̲m̲

             See figure 4.2.4.4.9.5-7

















































                    FIGURE 4.2.4.4.9-1


         MMON ̲INIT                    (FUNCTION:  I ̲FUNCTION,
                                       C ̲SOCB:    POINTER,
                                       INR04)
                                      (OUTR04, EXIT: EXIT ̲NO,
                                        CC: COMPLETION ̲CODE)


         Start

         SOCB = C ̲SOCB

         MMON ̲ENTRY = E ̲INIT

         SCM ̲RETURN = LINK

         GET REGISTERS FROM CONTEXT FRAME AND STORE THEM IN
         SOCB

         CASE FUNCTION

             I ̲CREATE ̲CIF?  GOTO CREATE ̲CIF

                 …0e….…0f…
                 …0e….…0f…
                 …0e….…0f…

             I ̲SAVE?        GOTO SAVE

         End Case


         Stop



         MMON ̲ANSWER ̲RECEIVED         (ANSWER: POINTER,
                                       FIRST ̲SOCB: POINTER,
                                       LAST ̲SOCB:  POINTER)
                                      (DONE ̲COUNT: INTEGER,
                                       DONE ̲SOCB: POINTER)


         Start

         RECEIVED CC     OK?          CSF ̲RETIRE (CC)

         MMON ̲ENTRY = E ̲ANSWER

         SCM ̲RETURN = LINK

         SOCB = ANSWER.SOCB

         SET ̲SOCB ̲DONE

         ENTER (SOCB.RETURN)

         Stop


                   FIGURE 4.2.4.4.9.5-2


         MMON ̲COMPLETE ̲FUNCTION       (C ̲SOCB: POINTER)
                                      (OUTR04,
                                       EXIT NO: INTEGER,
                                       CC: COMPLETION ̲CODE)


         Start

         MMON ̲ENTRY = E ̲COMPLETE

         SCM ̲RETURN = LINK

         SOCB = C ̲SOCB

         ENTER (SOCB.RETURN)

         Stop


                   FIGURE 4.2.4.4.9.5-3



         PROCEDURE WAIT               (ANSWER:     POINTER,
                                       SOCB:       POINTER)


         Start

         SOCB.RETURN = LINK

         Case MMON ̲ENTRY

             E ̲INIT?    SOCB.STATUS = SC ̲ERROR?

                        R5 = OK       R5 = SOCB.CC

                        R5 = OK?      R3 = OKAY

                        R3 = ERROR


             E ̲ANSWER?  R5 = SOCB

                        SOCB.STATUS = DONE?        R3 = 1

                        R3 = 0

         End Case


         Stop













                   FIGURE 4.2.4.4.9.5-5




     PROCEDURE RETURN ̲ERROR          (ENTRY:     (FROM ̲INIT,
                                                  FROM ̲COMPLETE)
                                     (CC:        COMPLETION
                                                 ̲CODE
                                      SOCB:      POINTER)

         ENTRY = FROM ̲INIT       STATUS = SC ̲ERROR

         STATUS = DONE

         SOCB.STATUS = STATUS

         SOCB.CC = CC

         SOCB.EXITNO = ERROR

         RETURN

         STOP


                 FIGURE 4.2.4.4.9.5-6





         PROCEDURE COMPLETE ̲RETURN   (TRACE:     BOOLEAN,
                                      SOCB:      POINTER)

         TRACE = TRUE?           GET REGISTERS FROM SOCB

                                 CSF ̲TRACE   (EXIT ̲MON ̲FUNC
                                             ̲
                                              EXIT ̲MMON
                                             ̲DATA,
                                              0)

         R6 = SOCB.EXITNO

         STOP









                 Figure 4.2.4.4.9.5-7


4.2.4.5  S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲



4.2.4.5.1    M̲M̲O̲N̲ ̲T̲y̲p̲e̲ ̲D̲e̲f̲i̲n̲i̲t̲i̲o̲n̲s̲

         TYPE

         CIF ̲CONTROL ̲BLOCK =

             RECORD

                 PROFILE:             ACCESS ̲PROFILE;

                 CIF ̲ID:              CIF ̲REFERENCE ̲NUMBER;

                 VERSION:             1..256;

                 FIRST ̲OPEN ̲FLAG:"F"  BOOLEAN;

                 STOPPED ̲STATUS:"ST"  (STOPPED, NOT ̲STOPPED);

                 STATE: "S"           CIFCB ̲STATE;

                 USAGE: "U"           CB ̲USAGE;

                 HCBLIST:             POINTER;

             END;

         Refer figure 4.2.4.5-1


         HANDLE ̲CONTROL ̲BLOCK =

             RECORD

                 NEXT:                POINTER;

                 CIF:                 POINTER;
                                      Pointer to CIF ̲CONTROL
                                      ̲BLOCK

                 MMS ̲REF:             MMS ̲VIEW ̲REFERENCE;

                 QELLIST:             POINTER;



              DISMANTLE ̲COUNT:    BYTE;

              CHECKPOINT ̲STATUS:"CS"   (SAVED,NOT ̲SAVED);

              STATE:    CIFCB ̲STATE;

              USAGE:    CB ̲USAGE;

              QELCOUNT: INTEGER;

         END;

    Refer figure 4.2.4.5-2


    CB ̲USAGE=      (CIFCB ̲USAGE, HCB ̲USAGE)


    CIFCB ̲STATE =  (S ̲FREE,
                        S ̲CREATE,
                        S ̲LOOKUP,
                        S ̲ACTIVE,
                        S ̲REMOVE)


    CSF ̲PROCESS ̲INFO =

         RECORD
                   COMMAND:  (SAVE,MFT);
                   SUBPROCESS:    SUBPROCESS ̲INDEX;
                   PROCESS:  INTEGER;
                   DUMMY:    ARRAY (1..2) OF INTEGER;
                   SOCB:     SOCB ̲INDEX;
         END




    Refer fig. 4.2.4.5-3



         SAVE ̲MESSAGE ̲INFO =

             RECORD
                     VIEW:              VIEW ̲REFERENCE;
                     DISMANTLE:         BOOLEAN;
                     DELETION:          BOOLEAN;
                                        Specifies that this
                                        checkpoint shall
                                        possibly produce an
                                        Automatic
                                        Deletion Log Record
             END

         Refer figure 4.2.4.5-4

         MFT ̲MESSAGE ̲INFO =

             RECORD
                     CIF ̲ID:            CIF ̲REFERENCE ̲NUMBER;
                     VERSION:           1..256;
                     TIME:              PM ̲TIME;
                                        Time for insertion in
                                        Queue Time stamp from
                                        QEL
                     QUEUE:             MAIN ̲QUEUE ̲INDEX
             END;

         Refer figure 4.2.4.5-5

         SEND ̲TO ̲MMS ̲PARAMS =

             RECORD
                     TRAILER            POINTER;
                     TRAILER ̲SIZE:      INTEGER;
                     BUFFER:            POINTER;
                     BUFFER ̲SIZE:       INTEGER;
             END;

         INFO ̲ELEMENT =

             RECORD
                     XFER:              INTEGER;
                     SIZE:              INTEGER;
                     DATA:              ARRAY (1..SIZE) OF INTEGER
             END;



         Use of SOCB.SS ̲DATA,         refer 4.1.6.1.6.1

         TYPE

         MMON ̲SOCB =

                 RECORD

                     SR0, SR1, SR2, SR3: INTEGER;
                                        Saved parameters passed
                                        in registers R0-R3

                     CC:                COMPLETION ̲CODE;

                     EXITNO:            ERROR ̲OK;
                                        Also used to save 
                                        CIFCB or HCB
                                        pointers

                     RETURN:            INTEGER;
                                        Return point during
                                      a
                                        waiting point


         END



4.2.4.5.2    S̲h̲a̲r̲e̲d̲ ̲M̲M̲O̲N̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲

         These data are located in the Shared Protected CSF
         Segment.



4.2.4.5.2.1 H̲C̲B̲ ̲A̲r̲r̲a̲y̲

         VAR HCB ̲ARRAY:

             ARRAY (1..NO ̲OF ̲HCBs) OF HANDLE ̲CONTROL ̲BLOCK

         I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲:

         All elements are chained to the HCB ̲Resource Pool,
         refer 4.2.1.5.1.  The state of each element is set
         to free.


4.2.4.5.3    L̲o̲c̲a̲l̲ ̲M̲M̲O̲N̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲

         These data are located in the Local Protected CSF Segment
         of each process.

         Parameters and working variables used by the procedures:

         -   Send to MMS
         -   Send to Parent
         -   Send to CSF Process

         VAR

         MMS ̲PARAMS:                  SEND ̲TO ̲MMS ̲PARAMS

         I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲

         None. Updated by caller of SEND ̲TO ̲MMS



         4 pages of figures no.'s:



         4.2.4.5-1
         4.2.4.5-2
         4.2.4.5-3
         4.2.4.5-4
         4.2.4.5-5
         4.2.4.5-6


4.2.4.6  C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲



4.2.4.6.1    C̲h̲e̲c̲k̲ ̲Q̲E̲L̲



4.2.4.6.1.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 function checks ownership and type of specified
         QEL and that the corresponding HCB-state is active.

         Converts QEL reference to a QEL pointer retire if any
         errors.



4.2.4.6.1.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  CHECK ̲QEL                (QEL ̲REF: QEL ̲REFERENCE)
                                      (QEL: PRIMARY ̲QEL,
                                      HCB:  HANDLE ̲CONTROL ̲BLOCK)

         b)  CHECK ̲QEL (R1, R2, R3, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R2 QEL ̲REF  (kept)
         R6 LINK     (destroyed)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R1      pointer to HCB
         R4      pointer to QEL

         R0, R4, R5, R7               (kept)

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲

         VIEW reference error.
         Not active CIF



















































                     FIGURE 4.2.4.5-6



4.2.4.6.1.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             QEL ARRAY                refer 4.1.4.1.1
             SUBPROCESS ̲INDEX         refer 4.1.6.1.1.2
             HCB ̲array                refer 4.2.4.5

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SUBPROCESS ̲ID
             HCB.STATE
             PRIMARY ̲QEL.OWNER
             PRIMARY ̲QEL.OBJECT ̲TYPE
             PRIMARY ̲QEL.OBJECT ̲REF



4.2.4.6.1.4 C̲h̲e̲c̲k̲ ̲Q̲E̲L̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         Locate QEL in QEL ̲ARRAY.  Retire if error.  Retire,
         if QEL owner NE SUBPROCESS ̲ID.  Gets the HCB referred
         by OBJECT ̲REF and checks that HCB-state is active.
          Retire if error.

         Flowgram:

         N/A



4.2.4.6.2    R̲e̲m̲o̲v̲e̲ ̲C̲I̲F̲C̲B̲



4.2.4.6.2.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 Specified CIFCB is removed.





4.2.4.6.2.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  REMOVE ̲CIFCB (CIFCB: CIF ̲CONTROL ̲BLOCK)

         b)  REMOVE ̲CIFCB (R1, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R5      Pointer to CIFCB
         R6  LINK                     (destroyed)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲

         N/A



4.2.4.6.2.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             HCB array                refer 4.2.4.5

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             CIFCB.STATE
             CIFCB.HCBLIST



4.2.4.6.2.4 R̲e̲m̲o̲v̲e̲ ̲C̲I̲F̲C̲B̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         For all HCBs in HCBLIST: call EXCLUDE ̲HCB.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A


4.2.4.6.3    E̲x̲c̲l̲u̲d̲e̲ ̲H̲C̲B̲



4.2.4.6.3.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 specified Handle Control Block is released.  If
         it was the last HCB referencing the CIFCB, the CIFCB
         is released too.



4.2.4.6.3.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  EXCLUDE ̲HCB (HCB: HANDLE ̲CONTROL ̲BLOCK)

         b)  EXCLUDE ̲HCB (R4, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R4          Pointer to HCB        (destr.)
         R6  LINK                          (destr.)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R1, R2, R3, R5, R7           kept

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

         N/A



4.2.4.6.3.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             HCB-array                     refer 4.2.4.5

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             CIFCB.HCBLIST
             HCB.QELLIST
             HCB.STATE





4.2.4.6.3.4 E̲x̲c̲l̲u̲d̲e̲ ̲H̲C̲B̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         The HCB is chained out of HCBLIST of corresponding
         CIFCB.  All QEL in QELLIST is excluded.  The HCB-state
         is set to free and the control block is released.

         If it was the last HCB referring the CIFCB, the CIFCB
         is set to free and released.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



4.2.4.6.4    C̲h̲e̲c̲k̲ ̲C̲C̲



4.2.4.6.4.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 SOCB is updated according to the specified completion
         code.



4.2.4.6.4.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  CHECK ̲CC (CC: COMPLETION ̲CODE,
                       SOCB: POINTER)

         b)  CHECK ̲CC (R1, R5, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R5      POINTER TO SOCB
         R6      LINK                 (destr.)
         R1      CC                   (kept)






         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R0, R1, R2, R3, R4, R5       kept

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲

         N/A



4.2.4.6.4.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             SOCB                     refer 4.1.6.1.6.1

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SOCB.CC
             SOCB.EXITNO



4.2.4.6.4.4 C̲h̲e̲c̲k̲ ̲C̲C̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         SOCB.CC is set to specified cc.  If CC equal OK, then
         SOCB.EXITNO is set to OK, if not SOCB.EXITNO is set
         to error.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



4.2.4.6.5    S̲e̲c̲u̲r̲i̲t̲y̲ ̲C̲o̲m̲p̲a̲r̲e̲





4.2.4.6.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̲

         Checks, if security classification of PROFILE1 is lower
         than or equal to that of PROFILE2 or if any bits in
         rest of PROFILE1 occur in PROFILE2.

         Error return if any of the conditions are fulfilled.



4.2.4.6.5.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  SECURITY ̲COMPARE (PROFILE1, PROFILE2):  ERROR ̲OK

         b)  SECURITY ̲COMPARE (R3, R1, R2, R4, R6):  ERROR ̲OK

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R1  PROFILE1.LEAST           (KEPT)
         R2  PROFILE1.MOST            (KEPT)
         R3  PROFILE2.LEAST           (KEPT)
         R4  PROFILE2.MOST            (KEPT)
         R6  LINK                     (DESTR)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R4, R5, R7                   kept

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

         N/A



4.2.4.6.5.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             ACCESS ̲PROFILE





4.2.4.6.5.4 S̲e̲c̲u̲r̲i̲t̲y̲ ̲C̲o̲m̲p̲a̲r̲e̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         Security classification is extracted from PROFILE1.
          Security classification is extracted from PROFILE2.
          If security classification of PROFILE1 is higher than
         or equal to that of PROFILE2 error return.  If not,
         it is checked if any bits in rest of PROFILE1 occur
         in PROFILE2.  If so, an error return is performed.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



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



4.2.4.6.6.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         Chains the QEL to the HCB QELLIST and increases QELCOUNT.



4.2.4.6.6.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  INCLUDE ̲QEL (HCB: HANDLE ̲CONTROL ̲BLOCK,
                          QEL: PRIMARY ̲QEL)

         b)  INCLUDE ̲QEL (R1, R3, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R4      Pointer to HCB       (kept)
         R5      Pointer to QEL       (kept)
         R6  LINK

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R1, R2, R3, R4, R7           Kept



         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

         N/A



4.2.4.6.6.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             HANDLE ̲CONTROL ̲BLOCK     refer 4.2.4.5
             PRIMARY ̲QEL              refer 4.1.4.1.1

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             HCB.QELLIST
             HCB.QELCOUNT
             QEL.OBJECT ̲REF
             QEL.OBJECT ̲LINK



4.2.4.6.6.4 I̲n̲c̲l̲u̲d̲e̲ ̲Q̲E̲L̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         The QEL is chained to QELLIST as the first element
         of the List.

         QELCOUNT of HCB is incremented.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



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



4.2.4.6.7.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         The specified QEL is removed from the QELLIST of the
         referenced HCB and QEL COUNT is decremented.




4.2.4.6.7.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  EXCLUDE ̲QEL (QEL: PRIMARY ̲QEL)

         b)  EXCLUDE ̲QEL (R3, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R4      Pointer to QEL       Kept
         R6  LINK

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R0, R1, R2, R3, R5, R7       Kept

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲

         N/A



4.2.4.6.7.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             PRIMARY ̲QEL              refer 4.1.4.1.1
             HANDLE ̲CONTROL ̲BLOCK     refer 4.2.4.5

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             HCB.QELCOUNT.
             HCB.QELLIST
             QEL.OBJECT ̲REF
             QEL.OBJECT ̲LINK






4.2.4.6.7.4 E̲x̲c̲l̲u̲d̲e̲ ̲Q̲E̲L̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         The QEL is chained out of the QELLIST of referenced
         HCB and using the OBJECT ̲POINTER, the QELCOUNT of the
         corresponding HCB is decremented.

         Then in order to release the QEL, the QMON 
         DISMANTLE ̲QEL function is called.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



4.2.4.6.8    I̲n̲i̲t̲ ̲R̲e̲s̲p̲o̲n̲s̲e̲ ̲T̲i̲m̲e̲



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

         Reads current time and stores least significant word
         in SOCB.R3.



4.2.4.6.8.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  INIT ̲RESPONSE ̲TIME

         b)  INIT ̲RESPONSE ̲TIME (R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R6 LINK                      (destr.)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R0, R1, R2, R3, R4, R5, R7   Kept



         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

         N/A



4.2.4.6.8.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             SOCB

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SOCB.R3



4.2.4.6.8.4 I̲n̲i̲t̲ ̲R̲e̲s̲p̲o̲n̲s̲e̲ ̲T̲i̲m̲e̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         Call the TMON function READ ̲TIME and the Least significant
         word of internal time format is stored in SOCB.R3.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



4.2.4.6.9    U̲p̲d̲a̲t̲e̲ ̲R̲e̲s̲p̲o̲n̲s̲e̲ ̲T̲i̲m̲e̲



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

         Reads current time, subtracts the time received from
         a previous INIT ̲RESPONSE ̲TIME and updates time monitoring
         statistics.





4.2.4.6.9.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  UPDATE ̲RESPONSE ̲TIME(FUNCTION: (T ̲READ ̲VIEW,
                                             T ̲WRITE ̲VIEW,
                                             T ̲RETRIEVE,
                                             T ̲DUMP,
                                             T ̲CLEAR,
                                             T ̲SAVE ̲VIEW))

         b)  UPDATE ̲RESPONSE ̲TIME (R0, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R0  FUNCTION                 (destr)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A

         R1, R2, R3, R4, R5, R7       Kept

         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

         N/A



4.2.4.6.9.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             SOCB

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SOCB.R3                  refer 4.1.6.1.6.1

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             CONST NO ̲OF ̲FUNCTIONS:   INTEGER;

             VAR ACCUMULATED ̲TIME:
                      ARRAY (1.. NO ̲OF ̲FUNCTIONS) OF INTEGER;

                 FUNCTION ̲COUNT:
                      ARRAY (1.. NO ̲OF ̲FUNCTIONS) OF INTEGER;


4.2.4.6.9.4 U̲p̲d̲a̲t̲e̲ ̲R̲e̲s̲p̲o̲n̲s̲e̲ ̲T̲i̲m̲e̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         Call the TMON function READ ̲TIME and subtract SOCB.R3
         from the least significant word of internal time format.

         The result is added to ACCUMULATED ̲TIME(FUNCTION) and
         FUNCTION ̲COUNT (FUNCTION) is incremented.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



4.2.4.6.10 C̲o̲n̲v̲e̲r̲t̲ ̲P̲r̲o̲f̲i̲l̲e̲



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

         Converts an access profile to a DAMOS security profile.



4.2.4.6.10.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  CONVERT ̲PROFILE (PROFILE: ACCESS ̲PROFILE)
                             (S ̲PROFILE: SECURITY ̲PROFILE)

         b)  CONVERT ̲PROFILE (R2, R1, R3, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R1  PROFILE.MOST             (kept)
         R2  PROFILE.LEAST            (kept)
         R6  LINK

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R3  S ̲PROFILE

         R2, R3, R5, R7               Kept



         F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

         N/A



4.2.4.6.10.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             ACCESS ̲PROFILE



4.2.4.6.10.4 C̲o̲n̲v̲e̲r̲t̲ ̲P̲r̲o̲f̲i̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         Security Classification, Atomal designation and Encryption
         designation is extracted from the input PROFILE, packed
         and returned.

         F̲l̲o̲w̲g̲r̲a̲m̲

         N/A



4.2.4.6.11 Deleted



4.2.4.6.12 C̲h̲e̲c̲k̲ ̲M̲F̲T̲



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

         Check if Message flow Trace should be made for corresponding
         mainqueue and if so a MFT-record is sent to the CSF
         process.





4.2.4.6.12.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  CHECK ̲MFT (QEL: QEL ̲REFERENCE)

         b)  CHECK ̲MFT (R2, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R2 QEL       (Kept)
         R6 LINK

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A.



4.2.4.6.12.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             MAIN ̲QUEUE               cf. 4.2.2.5.2
             SUB ̲QUEUE                cf. 4.2.2.5.3
             MFT ̲MESSAGE ̲INFO         cf. 4.2.4.5

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             MAIN ̲QUEUE.MFT ̲ENABLE
             MFT ̲MESSAGE (ALL)        (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None



4.2.4.6.12.4 C̲h̲e̲c̲k̲ ̲M̲F̲T̲ ̲D̲e̲s̲i̲g̲n̲

         Via QEL the MAIN ̲QUEUE.MFT ̲ENABLE flag is checked.

         MAIN ̲QUEUE is calculated as:

         MAIN ̲QUEUE = MAIN ̲QUEUE ̲ARRAY (SUB ̲QUEUE.MAIN ̲QUEUE)



         SUBQUEUE =   SUB ̲QUEUE ̲ARRAY (QEL.QUEUE)

         If MAIN ̲QUEUE.MFT ̲ENABLE equal TRUE a MFT record is
         generated and sent to the CSF process by calling SEND
         ̲TO ̲CSF ̲PROCESS. Return is made to caller.

         Waiting point in SEND ̲TO ̲CSF ̲PROCESS

         F̲l̲o̲w̲g̲r̲a̲m̲:̲

         None.



4.2.4.6.13 S̲e̲n̲d̲ ̲T̲o̲ ̲M̲M̲S̲



4.2.4.6.13.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 function sends an Info-block to MMS.

         Trailer and buffer are used as specified (refer 4.1.7.2.7.1).

         The procedure may result in a reschedule and must not
         be called within CRITICAL REGION.



4.2.4.6.13.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  SEND ̲TO ̲MMS              (COMMAND:    MMS ̲COMMAND,
                                       NO ̲OF ̲TLES ̲TO ̲MMS,
                                       NO ̲OF ̲TLES ̲FROM ̲MMS:
                                      0..2,
                                       SOCB:       POINTER)

         b)  SEND ̲TO ̲MMS (FUNCTION, NO ̲TO ̲MMS, NO ̲FROM ̲MMS,
             R5, R6)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R1
             R2
             R5      POINTER TO SOCB

             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R1, R2, R3, R4, R5, R7   kept





4.2.4.6.13.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             MMON ̲SOCB                cf 4.2.4.5.1
             COMMAND ̲BUFFER           cf. 4.1.7.2.7.4
             SEND ̲TO ̲MMS ̲PARAMS       cf. 4.2.4.5.1
             CCTL                     cf. (l) 3.4
             TL                       cf. (l) 3.4
             TLE                      cf. (l) 3.4
             OBJ ̲INDEX                cf. (g)

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SOCB.STATUS              (m)
             SOCB.SS ̲DATA             (m)
             SEND ̲TO ̲MMS ̲PARAMS       (all)
             COMMAND ̲BUFFER.HEADER    (m)
             FMS ̲RECEIVE ̲SYNCEL



4.2.4.6.13.4  S̲e̲n̲d̲ ̲t̲o̲ ̲M̲M̲S̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         The procedure makes an output transferlist according
         to specified NO ̲OF ̲TLES ̲TO ̲MMS and an input transferlist
         according to specified NO ̲OF ̲TLES ̲FROM ̲MMS and chains
         these lists to INFO ̲BLOCK.XFER ̲INFO. The pointers to
         these lists are converted to TPE array index and saved
         in the specified SOCB with the GREATEST transfer list
         as the first. Then pages are locked using LOCK ̲LOGICAL
         ̲
         PAGES on the pages corresponding to the GREATEST transfer
         list. COMMAND ̲BUFFER is updated with command, SYNCEL
         ̲DESCRIPTOR, XFER ̲INFO SOCB ̲INDEX, USER ̲GROUP ̲ID and
         SECURITY ̲PROFILE. The COMMAND ̲BUFFER is send to MMS
         ̲
         SYNCEL.

         The procedure may result in a reschedule and must not
         be called within CRITICAL REGION.



4.2.4.6.14 Deleted


4.2.4.6.15   S̲e̲n̲d̲ ̲t̲o̲ ̲C̲S̲F̲ ̲P̲R̲O̲C̲



4.2.4.6.15.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 procedure sends a MESSAGE to the CSF process.
         The procedure may result in a reschedule and must not
         be called within CRITICAL REGION



4.2.4.6.15.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  SEND ̲TO ̲CSF ̲PROC         (COMMAND: (SAVE,MFT)
                                       INFO,SOCB: POINTER)

         b)  SEND ̲TO ̲CSF ̲PROC         (COMMAND, R4, R5, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R4      POINTER TO INFO BLOCK
         R5      POINTER TO SOCB
         R6      LINK

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A



4.2.4.6.15.3 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             MMON ̲SOCB                cf. 4.2.4.5.1
             SAVE ̲MESSAGE             cf. 4.2.4.5.1
             MFT ̲MESSAGE              cf. 4.2.4.5.1
             OBJ ̲INDEX                cf. (g)
             PCF ̲INFO ̲BLOCK

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             SOCB.STATUS              (m)
             SOCB.SS ̲DATA             (m)
             CSF ̲SAVE ̲SE



         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None



4.2.4.6.15.4 S̲e̲n̲d̲ ̲t̲o̲ ̲C̲S̲F̲ ̲P̲R̲O̲C̲ ̲D̲e̲s̲i̲g̲n̲

         N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         INFO is updated and sent to the CSF ̲PROC ̲SYNCEL by
         calling the Damos communication procedure SEND.

         LINK is saved in SOCB.

         Then answer is awaited by calling WAIT.

         Upon answer received LINK is fetched from SOCB and
         a return is made.

         Flowgram: None.


4.2.4.6.16   C̲l̲e̲a̲n̲ ̲U̲p̲



4.2.4.6.16.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 procedure deallocates the (in SOCB) specified transferlists.
         It is assumed that at least one transfer list is present.



4.2.4.6.16.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         a)  CLEAN ̲UP (SOCB:  POINTER)

         b)  CLEAN ̲UP (R5, R6)

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R5      POINTER TO SOCB (KEPT)
         R6      LINK

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         N/A








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

         For an overview of subpackage interfaces, refer to
         fig. 4.1.7.3-7.



4.2.4.7.1    N̲e̲w̲ ̲V̲i̲e̲w̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲



4.2.4.7.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         This is the "QEL copied" entry point in Message Monitor.
          It is called from QMON whenever a new QEL referencing
         a view should be chained to the corresponding HCB.



4.2.4.7.1.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  NEW ̲VIEW ̲REFERENCE (QEL: PRIMARY ̲QEL)

         b)  NEW ̲VIEW ̲REFERENCE (R4, R6):

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R4          Pointer to QEL   (Kept)
         R6  LINK                     (destr.)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R0, R1, R3, R4, R5, R6       Kept



4.2.4.7.2    G̲e̲t̲ ̲P̲r̲o̲f̲i̲l̲e̲

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

         A profile is, via the input QEL, fetched from the corresponding
         CIFCB.  CIFCB FOR QEL.PROFILE.

         I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲



         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  GET ̲PROFILE              (QEL: PRIMARY ̲QEL)
                                      (PROFILE: ACCESS ̲PROFILE)

         b)  GET ̲PROFILE  (R1, R2, R4, R6)

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲

             R4      Pointer to QEL   (kept)

             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R1  PROFILE.LEAST
             R2  PROFILE.MOST
             R6  LINK

             R3, R5, R7               Kept

             F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲

             QEL reference error.



4.2.4.7.3    C̲h̲e̲c̲k̲ ̲D̲e̲l̲e̲t̲i̲o̲n̲

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

         The function is called from CSFPROC and checks, if
         deletion of the referenced view will lead to deletion
         of the CIF from Short Term Storage.

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

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  CHECK ̲DELETION           (View: VIEW ̲REFERENCE)
                                      (CC: completion ̲code):
                                           ERROR ̲OK

         b)  CHECK ̲DELETION (R2, R7, R6):  ERROR ̲OK

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R2  VIEW                 (kept)
             R6  LINK                 (destr.)



             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R7  CC                   (OK, DELETION)

             R0, R1, R3, R4, R5       Kept



4.2.4.7.4    S̲a̲v̲e̲



4.2.4.7.4.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 function is called from CSFPROC and sends a SAVE
         request to MMS.

         The function is privileged.



4.2.4.7.4.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲

         C̲a̲l̲l̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         a)  SAVE                     (VIEW: VIEW ̲REFERENCE,
                                       DISMANTLE: BOOLEAN,
                                       BUFFER:  POINTER,
                                       SIZE:  BUFFERSIZE)
                                      (CC):   ERROR ̲OK

         b)  MON(SCM, SYSCALL):       ERROR ̲OK

             R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

             C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R0  DISMANTLE            (destr.)
             R1  SIZE                 (destr.)
             R2  VIEW                 (destr.)
             R3  BUFFER               (destr.)

             R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

             R7  CC                   (OK)

             R4, R5, R6               (destr.)

             F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲

             None.





4.2.5    C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲



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̲

         The Coroutine Monitor has at fig. 4.1.5.1-1 been broken
         down so the upper level shows the five modules in Coroutine
         Monitor.  Furthermore, the Coroutine Monitor common
         functions are shown at upper level in the same way
         as a module.

         If a module has more than one main function, it is
         broken down so these main functions are identified.

         Refer to Module Specifications, 4.2.5.4.



















































                     FIGURE 4.2.5.1-1


4.2.5.2  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲

         The Coroutine Monitor is implemented as a set of shared
         procedures executed in user mode by the calling process.



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

         The System Call Module is implemented as three procedures:

         -   COMON                    cf. 4.2.5.4.1.5 a

         -   WAIT ̲SYSTEM ̲CALL         cf. 4.2.5.4.1.5 b

         -   CANCEL ̲SYSTEM ̲CALL       cf. 4.2.5.4.1.5 c



4.2.5.2.2    S̲e̲m̲a̲p̲h̲o̲r̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲

         Semaphore Functions Module is implemented as six procedures.

         -   WAIT ̲SEM                 cf. 4.2.5.4.2.5 a
         -   SIGNAL ̲SEM               cf. 4.2.5.4.2.5 b
         -   WAIT ̲OPSEM               cf. 4.2.5.4.2.5 c
         -   SIGNAL ̲OPSEM             cf. 4.2.5.4.2.5 d
         -   ASSOCIATE                cf. 4.2.5.4.2.5 e
         -   INTERN ̲SIGNAL            cf. 4.2.5.4.2.5 f



4.2.5.2.3    P̲a̲u̲s̲e̲

         Pause is one procedure only called by other Coroutine
         Monitor procedures.

         -   PAUSE                    cf. 4.2.5.4.3





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

         Initialize Functions Module is implemented as four
         procedures:

         -   INIT ̲COMON               cf. 4.2.5.4.4.5 a
         -   INIT ̲COROUTINE           cf. 4.2.5.4.4.5 b
         -   INIT ̲SEMAPHORE           cf. 4.2.5.4.4.5 c
         -   INIT ̲OPERATION           cf. 4.2.5.4.4.5 d


4.2.5.2.5    T̲r̲a̲c̲e̲

         The Trace Module is implemented as one procedure producing
         trace records for Coroutine Monitor procedures via
         CMON Trace module in CSF Utility Subpackages (c.f.
         4.2.1)

         -   TRACE                    cf 4.2.5.4.5



4.2.5.2.6    C̲o̲m̲m̲o̲n̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲

         Common Functions are implemented as two procedures
         CHAIN ̲IN and CHAIN ̲OUT manipulating double linked lists
         sorted in accordance to priority.

         -   CHAIN ̲IN                 cf. 4.2.5.6.1
         -   CHAIN ̲OUT                cf. 4.2.5.6.2



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 Utility Functions,
         which are MON calls, the procedure calls are realized
         by normal procedure statements.

         The Initialization Function Module, the Trace Module
         and the Common Functions are left out from this figure
         to ease the reading of it.

         The Initialization Functions Module only performs sequential
         processing and does not activate any of the procedures
         at this figure.  The Trace Module is never activated
         by procedures other than those shown in this figure,
         which are directly called from applications.


         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 operation used in an INIT SYSTEM CALL 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.

         Figure 4.2.5.3-3 shows a state transition diagram for
         an Operation.

         The arrows represent procedures and the name of the
         procedure is written at the arrows.  A "PAUSE" at an
         arrow means the action when the System Call has been
         completed and is returned from System Call Monitor
         in Wait Next Operation.  

         The State is represented by the pair (STATUS, ACTION)
         in the operation, c.f. 4.1.6.5.2.
















































                     FIGURE 4.2.5.3-1

















































                     FIGURE 4.2.5.3-2
















































                     FIGURE 4.2.5.3-3



4.2.5.4  C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲



4.2.5.4.1    S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         The System Call Module maintains the interfaces from
         coroutines to service systems served by System Call
         Monitor.

         The System Call Module sends a request to a service
         system and passes the answer on to calling coroutine
         or a semaphore on return.  It contains the tools for
         coroutines to await completion of System Calls.



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

         a)  Coroutine Initiate System Call     cf. 4.1.7.2.5.1

         b)  Coroutine System Call              c.f. 4.1.7.2.5.2

         c)  Coroutine Wait System Call         c.f. 4.1.7.2.5.3

         d)  Coroutine Cancel System Call       c.f. 4.1.7.2.5.4



4.2.5.4.1.2 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲

         The System Call Module has four module interfaces,
         each representing one package interface.

         a)  Coroutine Initiate System Call     c.f. 4.1.7.2.5.1

         b)  Coroutine System Call              c.f. 4.1.7.2.5.2

         c)  Coroutine Wait System Call         c.f. 4.1.7.2.5.3

         d)  Coroutine Cancel System Call       c.f. 4.1.7.2.5.4






4.2.5.4.1.3 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

   System Call Module has three main procedures:

   -  COMON              Containing one entry for Coroutine
                         Initiate System Call and one
                         entry for Coroutine System Call.        cf.
                                                                 4.2.5.4.1.5
                                                                 a

   -  WAIT ̲SYSTEMCALL    Representing Coroutine Wait
                         System Call.           cf. 4.2.5.4.1.5
                                                b

   -  CANCEL ̲SYSTEMCALL  Representing Coroutine Cancel
                         System Call.           cf. 4.2.5.4.1.5
                                                c

                                                cf. 4.2.5.4.1.3-1





















































                   FIGURE 4.2.5.4.1.3-1



4.2.5.4.1.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             1)  COROUTINE RECORD     c.f. 4.1.6.5.1
             2)  COROUTINE OPERATION  c.f. 4.1.6.5.2
             3)  COROUTINE SEMAPHORE  c.f. 4.1.6.5.3

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             1)  COROUTINE RECORD     (m)
             2)  COROUTINE OPERATION  (m)
             3)  COROUTINE SEMAPHORE  (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             The System Call Module uses a part of the COROUTINE
             RECORD as a COROUTINE ̲OPERATION when the "Coroutine
             System Call" function is called.

             Only the five word header part of the operation
             is used.

             This header part is located in the locations where
             R0 to R4 normally are saved.



4.2.5.4.1.5 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲

         This module maintain the interface from coroutines
         to System Call Monitor.

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

         INIT ̲SYSCALL                 c.f. 4.1.7.2.6.1
         SYSCALL                      c.f. 4.1.7.2.6.2
         WAIT ̲SYSCALL                 c.f. 4.1.7.2.6.3
         CANCEL ̲SYSCALL               c.f. 4.1.7.2.6.4

         a)  COMON performs two different functions:

             -   Initiate System Call
             -   System Call



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

                 N̲a̲r̲r̲a̲t̲i̲v̲e̲

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

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

                 ACTION is set to SET ̲DONE

                 STATUS is set to PENDING

                 ACTIVATION is set to NIL.

                 F̲l̲o̲w̲g̲r̲a̲m̲

                 Fig. 4.2.5.4.1.5-1.

             a2) S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲

                 N̲a̲r̲r̲a̲t̲i̲v̲e̲

                 First OPERATION POINTER is defined as the address
                 of saved R0 in COROUTINE ̲RECORD of calling
                 Coroutine and operation state is initialized
                 to (PENDING, TO ̲COROUTINE)
                 Then the same as Init System Call is performed
                 except that ACTION and ACTIVATION fields in
                 the OPERATION are not updated.

                 Finally the same action, as SYS ̲WAIT takes
                 by a PENDING OPERATION, is taken.

                 F̲l̲o̲w̲g̲r̲a̲m̲

                 Fig. 4.2.5.4.1.5-1

         b)  W̲A̲I̲T̲ ̲S̲Y̲S̲T̲E̲M̲ ̲C̲A̲L̲L̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲

             The action taken depends on STATUS of Operation.



             1)  STATUS  =  PENDING

                 ACTION field of operation is set to 
                 TO ̲COROUTINE, and ACTIVATION is set to 
                 RUNNING ̲COROUTINE.  The running coroutine is
                 then paused.  When resumed, it will continue
                 in 3) below.

             2)  STATUS = IN ̲SEMAPHORE

                 The operation is removed from semaphore.

             3)  The System Call Monitor procedure WAIT ̲SYSTEM
                 ̲CALL will then be called, and return to calling
                 coroutine is done with the parameters delivered
                 by the Service System.

             F̲l̲o̲w̲g̲r̲a̲m̲

             Fig. 4.2.5.4.1.5-2

         c)  C̲A̲N̲C̲E̲L̲ ̲S̲Y̲S̲T̲E̲M̲ ̲C̲A̲L̲L̲

             N̲a̲r̲r̲a̲t̲i̲v̲e̲

             The action taken depends on STATUS of OPERATION.

             If STATUS is pending, the System Call Monitor CANCEL
             is called.

             Else no action is taken.

             F̲l̲o̲w̲g̲r̲a̲m̲

             Fig. 4.2.5.4.1.5-3


         Procedure   COMON(SC ̲FUNCTION: (CINIT ̲SYSCALL,
                                         CSYSCALL),

                             (FUNCTION:  SCM ̲FUNCTION,

                              OPERATION: COROUTINE ̲OPERATION)
                             (CC:        COMPLETION ̲CODE) :
                     ERROR ̲OK


         STORE ̲REGISTERS

         COROUTINE.SAVER7 = FUNCTION

         Case SC ̲FUNCTION:

                 CINIT ̲SYSCALL?   TRACE(N ̲INIT ̲SYSCALL, SHORT)

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

                                       (c.f. a)

                 CSYSCALL?       TRACE(N ̲SYSCALL, SHORT)

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

                                      (c.f. b)

                                  STORE ̲REGISTERS

                                  TRACE (EXIT, SHORT)

         End Case    SC ̲FUNCTION

         OTHERWISE   RETIRE (CMON ̲ERROR, FALSE)  (d) 4.1.4.6


         RESTORE ̲REGISTERS

         RETURN (EXIT ̲NUMBER)

         Stop






                   FIGURE 4.2.5.4.1.5-1



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


         Start


         Case INIT ̲SYSCALL (INR0-4, OPERATION)

                 (CC, SO ̲REF):  ERROR ̲OK


             ERROR?      EXIT ̲NUMBER = ERROR


             OK ?        OPERATION.SYSTEM ̲OPERATION = SO ̲REF

                         OPERATION.STATUS = PENDING

                         OPERATION.ACTION = SET ̲DONE

                         OPERATION.ACTIVATION = NIL

                         EXIT ̲NUMBER = OK


         End Case INIT ̲SYSCALL


         Stop




                  FIGURE 4.2.5.4.1.5-1a


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


         Start


         OPERATION = ADDRESS(COROUTINE.SAVER0)

         Case SYSCALL    (INR0-4, OPERATION)

                 (CC, SO ̲REF):  ERROR ̲OK


              ERROR ?    EXIT ̲NUMBER = ERROR

              OK ?       OPERATION.SYSTEM ̲OPERATION = SO ̲REF

                         OPERATION.STATUS = PENDING

                         OPERATION.ACTION = TO ̲COROUTINE

                         OPERATION.ACTIVATION = COROUTINE 

                         PAUSE


                         OPERATION = ADDRESS (COROUTINE.SAVER0)


                         Case WAIT ̲SYSTEM.CALL (OPERATION.SYSTEM
                     ̲
                         OPERATION):  ERROR ̲OK:

                            ERROR:  EXIT ̲NUMBER = ERROR

                            OK:     EXIT ̲NUMBER = OK

                         End Case WAIT ̲SYSTEM ̲CALL


         End Case INIT ̲SYSCALL


         Stop



                  FIGURE 4.2.5.4.1.5-1b


         Procedure   WAIT ̲SYSCALL (OPERATION:  COROUTINE OPERATION)
                              (OUTRO4,
                              CC:    COMPLETION ̲CODE)
                               ERROR OK

         STORE ̲REGISTERS

         TRACE (N ̲SYSWAIT, SHORT)

         Case OPERATION.STATUS:

             PENDING ?    OPERATION.ACTION = TO ̲COROUTINE
                          OPERATION.ACTIVATION = COROUTINE
                          PAUSE
                          R5 = COROUTINE. SAVER5

             IN ̲SEMAPHORE? SEMAPHORE = OPERATION.ACTIVATION
                           DECREMENT SEMAPHORE.COUNT
                           CHAIN ̲OUT (OPERATION)


         End case OPERATION.STATUS

             "SCM is called with WAIT ̲SYSTEM ̲CALL

         Case WAIT ̲SYSTEM ̲CALL (OPERATION.SYSTEM ̲OPERATION)

                               (OUTR04, CC):  ERROR ̲OK:

              ERROR ?   EXIT ̲NUMBER = ERROR

              OK ?      EXIT ̲NUMBER = OK

         End Case WAIT

         R5 = COROUTINE.SAVER5

         STORE ̲REGISTERS

         TRACE (EXIT, SHORT)

         RESTORE ̲REGISTERS

         RETURN (EXIT ̲NUMBER)

         STOP


         Procedure   CANCEL ̲SYSTEM ̲CALL(OPERATION): ERROR OK

         STORE ̲REGISTERS

         TRACE (N ̲SYSCANCEL, SHORT)








         OPERATION.STATUS NE PENDING?

         CANCEL ̲SYSTEM ̲CALL (OPERATION.SYSTEM ̲OPERATION)






         RESTORE ̲REGISTERS



         RETURN (OK)




         Stop





                   FIGURE 4.2.5.4.1.5-3



4.2.5.4.2    S̲e̲m̲a̲p̲h̲o̲r̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Semaphore Functions Module supplies communication and
         synchronization tools by using the semaphore concept.



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

         a)  Wait Semaphore                c.f. 4.1.7.2.5.5

         b)  Signal Semaphore              c.f. 4.1.7.2.5.6

         c)  Wait Operation Semaphore      c.f. 4.1.7.2.5.7

         d)  Signal Operation Semaphore    c.f. 4.1.7.2.5.8

         e)  Associate                     c.f. 4.1.7.2.5.9

         f)  Internal Signal

         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 the saved register R5 of the readied
         coroutine.



4.2.5.4.2.2 S̲e̲m̲a̲p̲h̲o̲r̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲

         The Semaphore Functions have six independent interfaces:

         a)  Wait Semaphore                c.f. 4.1.7.2.5.5

         b)  Signal Semaphore              c.f. 4.1.7.2.5.6

         c)  Wait Operation Semaphore      c.f. 4.1.7.2.5.7




         d)  Signal Operation Semaphore      c.f. 4.1.7.2.5.8

         e)  Associate                       c.f. 4.1.7.2.5.9

         f)  Internal Signal

         C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         a)  INTERN ̲SIGNAL
                 (SEMAPHORE: COROUTINE ̲SEMAPHORE,
                  OPERATION: COROUTINE ̲OPERATION):  OK

         b)  INTERN ̲SIGNAL (R4, R5, R6):  OK

         R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲s̲

         C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R4      Pointer to Semaphore  (kept)
         R5      Pointer to Operation  (kept)
         R6  LINK                      (destr.)

         R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲

         R0-R3, R7 (kept)



4.2.5.4.2.3 S̲e̲m̲a̲p̲h̲o̲r̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲

         The six Semaphore Functions are each implemented as
         a procedure:

         -   WAIT ̲SEM               cf. 4.2.5.4.2.5 a
         -   SIGNAL ̲SEM             cf. 4.2.5.4.2.5 b
         -   WAIT ̲OPSEM             cf. 4.2.5.4.2.5 c
         -   SIGNAL ̲OPSEM           cf. 4.2.5.4.2.5 d
         -   ASSOCIATE              cf. 4.2.5.4.2.5 e
         -   INTERN ̲SIGNAL          cf. 4.2.5.4.2.5 f


         c.f. fig. 4.2.5.4.2.3-1


















































                   FIGURE 4.2.5.4.2.3-1



4.2.5.4.2.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲

         a)  D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲

             1)  COROUTINE ̲RECORD     c.f. 4.1.6.5.1
             2)  COROUTINE ̲OPERATION  c.f. 4.1.6.5.2
             3)  COROUTINE ̲SEMAPHORE  c.f. 4.1.6.5.3
             4)  RUNNING ̲COROUTINE    c.f. 4.1.6.5.6
             5)  READY ̲LIST           c.f. 4.2.5.5.2

         b)  E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲

             1)  COROUTINE ̲RECORD. (m)
             2)  COROUTINE ̲OPERATION. (m)
             3)  COROUTINE ̲SEMAPHORE (m)

         c)  L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲

             None