top - download
⟦514bd9ebf⟧ Wang Wps File
Length: 61104 (0xeeb0)
Types: Wang Wps File
Notes: CPS/SDS/024
Names: »1482A «
Derivation
└─⟦83672169b⟧ Bits:30006105 8" Wang WCS floppy, CR 0165A
└─ ⟦this⟧ »1482A «
WangText
…00……00……00……00……00…3…0a……00……00…3…0b…3…00…3 3…06…2…08…2…0b…2…0d…2…0f…2…02…2…07…1…08…1…0c…1…00…1
1…06…0…0b…0…0c…0…00…0
0…06…/…09…/…0b…/…0d…/…02…/…05…/…07….…08….…0a….…0d….…00…. .…07…-…0a…-…0b…-…00…-…01…-…06…,…08…,…09…,…0c…,…00…, ,…86…1 …02…
…02… …02…
…02…CPS/SDS/024
…02…850901…02……02…
CAMPS SYSTEM FUNCTIONS
DETAILED DESIGN SPECIFICATION…02…ISSUE 2…02…CAMPS
4.2.5.4.2.5 S̲e̲m̲a̲p̲h̲o̲r̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
a) W̲A̲I̲T̲ ̲S̲E̲M̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
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.
F̲l̲o̲w̲g̲r̲a̲m̲
Figure 4.2.5.4.2.5-1.
b) S̲I̲G̲N̲A̲L̲ ̲S̲E̲M̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
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.
F̲l̲o̲w̲g̲r̲a̲m̲
Figure 4.2.5.4.2.5-2
c) W̲A̲I̲T̲ ̲O̲P̲S̲E̲M̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
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. Finally STATUS of OPERATION
is set to DONE.
F̲l̲o̲w̲g̲r̲a̲m̲
Figure 4.2.5.4.2.5-3
d) S̲I̲G̲N̲A̲L̲ ̲O̲P̲S̲E̲M̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
INTERN ̲SIGNAL procedure is called.
F̲l̲o̲w̲g̲r̲a̲m̲
Figure 4.2.5.4.2.5-4
e) A̲S̲S̲O̲C̲I̲A̲T̲E̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
If STATUS is PENDING
- ACTION is set to TO ̲SEMAPHORE
- ACTIVATION is set to the semaphore pointer
value
If STATUS is DONE INTERN ̲SIGNAL procedure is called.
F̲l̲o̲w̲g̲r̲a̲m̲
Figure 4.2.5.4.2.5-5
f) I̲N̲T̲E̲R̲N̲ ̲S̲I̲G̲N̲A̲L̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
The semaphore counter is increased by one. If the
resulting value is positive, the operation is chained
into the semphore 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 readied
coroutines.
F̲l̲o̲w̲g̲r̲a̲m̲
Figure 4.2.5.4.2.5-6
Procedure WAIT ̲SEM(SEMAPHORE:COROUTINE ̲SEMAPHORE):
OK
STORE ̲REGISTERS
TRACE (WAIT ̲SEM, SHORT)
DECREMENT SEMAPHORE.COUNT
SEMAPHORE.COUNT GE 0?
CHAIN ̲IN (COROUTINE, SEMAPHORE)
PAUSE
TRACE (EXIT, SHORT)
RESTORE ̲REGISTERS
RETURN (OK)
Stop
FIGURE 4.2.5.4.2.5-1
Procedure SIGNAL ̲SEM (SEMAPHORE:COROUTINE ̲SEMAPHORE):
OK
STORE ̲REGISTERS
TRACE (SIGNAL ̲SEM, SHORT)
INCREMENT SEMAPHORE.COUNT
SEMAPHORE.COUNT GT 0?
COROUTINE = SEMAPHORE.NEXT
CHAIN ̲OUT (COROUTINE)
CHAIN ̲IN (COROUTINE, READY ̲LIST)
RESTORE ̲REGISTERS
RETURN (OK)
Stop
FIGURE 4.2.5.4.2.5-2
Procedure WAIT OPSEM(SEMAPHORE:COROUTINE SEMAPHORE)
(OPERATION:COROUTINE OPERATION):
OK
STORE ̲REGISTERS
TRACE (WAIT ̲OPSEM, SHORT)
DECREMENT SEMAPHORE.COUNT
SEMAPHORE.COUNT GE 0 ?
CHAIN ̲IN (COROUTINE,SEMAPHORE)
PAUSE OPERATION = COROUTINE.SAVER5=SEMAPHORE.NEXT
CHAIN ̲OUT(SEMAPHORE.NEXT)
OPERATION.STATUS = DONE
TRACE (EXIT, LONG)
RESTORE ̲REGISTERS
RETURN (OK)
Stop
FIGURE 4.2.5.4.2.5-3
Procedure SIGNAL OPSEM(SEMAPHORE:COROUTINE SEMAPHORE,
OPERATION:COROUTINE OPERATION):
OK
STORE ̲REGISTERS
TRACE (SIGNAL ̲OPSEM,LONG)
INTERN ̲SIGNAL(SEMAPHORE, OPERATION)
RESTORE ̲REGISTERS
RETURN (OK)
STOP
FIGURE 4.2.5.4.2.5-4
Procedure ASSOCIATE(SEMAPHORE:COROUTINE SEMAPHORE,
OPERATION:COROUTINE OPERATION):
OK
STORE ̲REGISTERS
TRACE (ASSOCIATE ̲OP,SHORT)
CASE OPERATION.STATUS
PENDING ? - OPERATION.ACTION = TO ̲SEMAPHORE
OPERATION.ACTIVATION = SEMAPHORE
DONE ? - INTERN ̲SIGNAL (SEMAPHORE, OPERATION)
RESTORE ̲REGISTERS
RETURN (OK)
STOP
FIGURE 4.2.5.4.2.5-5
Procedure INTERN SIGNAL(SEMAPHORE:COROUTINE SEMAPHORE,
OPERATION:COROUTINE OPERATION):
OK
INCREMENT SEMAPHORE.COUNT
SEMAPHORE.COUNT GT 0 ?
CHAIN ̲IN (OPERATION, SEMAPHORE)
OPERATION.STATUS = IN ̲SEMAPHORE
OPERATION.ACTIVATION = SEMAPHORE
COROUTINE = SEMAPHORE.NEXT
COROUTINE.SAVER5 = OPERATION
CHAIN ̲OUT (COROUTINE)
CHAIN ̲IN (COROUTINE, READY ̲LIST)
RETURN (OK)
Stop
FIGURE 4.2.5.4.2.5-6
4.2.5.4.3 P̲a̲u̲s̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.5.4.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 Pause Module contains the waiting point of Coroutine
Monitor. It is called from Coroutine Monitor procedures
with waiting points when they reach their waiting points.
The first coroutine in READY ̲LIST is selected for running.
If the READY ̲LIST is empty the System Call Monitor
procedure Wait Next Operation is called.
If the new coroutine has a SUBPROCESS ̲ID different
from CURRENT ̲SUBPROCESS, the Utility Function CHANGE
̲SUBPROCESS is called.
4.2.5.4.3.2 P̲a̲u̲s̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) PAUSE: OK
b) PAUSE (R5): 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̲
R5 LINK (destr)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0-R6 Contain the values of the saved registers from
Coroutine record.
4.2.5.4.3.3 P̲a̲u̲s̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Pause module contains one procedure. This is the PAUSE
procedure. Cf. figure 4.2.5.4.3.3-1.
FIGURE 4.2.5.4.3.3-1
4.2.5.4.3.4 P̲a̲u̲s̲e̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
COROUTINE ̲RECORD cf. 4.1.6.5.1
COROUTINE ̲OPERATION cf. 4.1.6.5.2
RUNNING ̲COROUTINE cf. 4.1.6.5.3
CURRENT ̲SUBPROCESS cf. 4.2.5.5.1
READY ̲LIST cf. 4.2.5.5.2
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
COROUTINE ̲RECORD (M)
COROUTINE ̲OPERATION (M)
RUNNING ̲COROUTINE (M)
CURRENT ̲SUBPROCESS (M)
READY ̲LIST (M)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None.
4.2.5.4.3.5 P̲a̲u̲s̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Internal procedure called from the "wait" procedures
when a coroutine encounters a waiting point.
The link register is saved in the Register R7 location
of the coroutine record. When the coroutine is eventually
readied and selected as running coroutine, it will
be resumed in this location.
If the ready list is empty the following is repeated
after call of WAIT ̲NEXT ̲OPERATION until the ready
list is not empty.
WAIT ̲NEXT OPERATION
Case activation field of operation of:
a) TO ̲SEMAPHORE
The STATUS is set to IN ̲SEMAPHORE, and the operation
is sent to the semaphore pointed to by ACTIVATION.
b) TO ̲COROUTINE
The coroutine pointed to by ACTIVATION is made
ready and STATUS is changed to DONE.
c) SET ̲DONE
STATUS is changed to DONE
The first coroutine is chained out from ready list.
The Coroutine Monitor variable running coroutine pointer
is updated, and the CSF Utility 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.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.5.4.3.5-1.
Procedure PAUSE:OK
COROUTINE.SAVER7 = R6
Active Loop
READY ̲LIST NOT EMPTY? EXIT
Case WAIT ̲NEXT ̲OPERATION()(OPERATION:COROUTINE ̲OPERATION):
ERROR ̲OK
ERROR? - RETIRE(COMON ̲ERROR)
End case WAIT ̲NEXT ̲OPERATION
Case OPERATION.ACTION:
TO ̲SEMAPHORE? - S̲I̲G̲N̲A̲L̲ ̲(̲c̲f̲.̲ ̲a̲)̲
TO ̲COROUTINE? - A̲c̲t̲i̲v̲a̲t̲e̲ ̲(̲c̲f̲.̲ ̲b̲)̲
SET ̲DONE ? - OPERATION.STATUS = DONE
End case OPERATION.ACTION
End active loop
Enter Coroutine (cf. c)
Stop
FIGURE 4.2.5.4.3.5-1
a) S̲i̲g̲n̲a̲l̲
Start
INTERN ̲SIGNAL(OPERATION.ACTIVATION, OPERATION)
Stop
b) A̲c̲t̲i̲v̲a̲t̲e̲
Start
COROUTINE = OPERATION.ACTIVATION
OPERATION.STATUS = DONE
CHAIN ̲IN (COROUTINE, READY ̲LIST)
Stop
c) E̲n̲t̲e̲r̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲
Start
COROUTINE = READY ̲LIST.FIRST
RUNNING ̲COROUTINE = COROUTINE
CHAIN ̲OUT (COROUTINE)
CURRENT ̲SUBPROCESS EQ COROUTINE.SUBPROCESS ̲ID?
CURRENT ̲SUBPROCESS = COROUTINE.SUBPROCESS ̲ID
CASE CHANGE ̲SUBPROCESS ̲ID (CURRENT ̲SUBPROCESS)
(CC): ERROR ̲OK
ERROR ? RETIRE (COMMON ̲ERROR)
END CASE "CHANGE ̲SUBROUTINES
RESTORE ̲REGISTERS
ENTER COROUTINE IN LOCATION (SAVER7)
Stop
FIGURE 4.2.5.4.3.5-1 (a - c)
4.2.5.4.4 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲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̲
The Initialization Functions Module contains functions
for initialization of the control data structures used
by the Coroutine Monitor Subpackage.
4.2.5.4.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̲
a) Initialize Coroutine Monitor. Cf. 4.1.6.2.5.10.
b) Initialize Coroutine. Cf. 4.1.6.2.5.11.
c) Initialize Semaphore. Cf. 4.1.6.2.5.12.
d) Initialize Operation. Cf. 4.1.6.2.5.13.
4.2.5.4.4.2 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
The Initialization Functions Module has four independent
interfaces.
a) Initialize Coroutine Monitor. Cf. 4.1.6.2.5.10.
b) Initialize Coroutine. Cf. 4.1.6.2.5.11.
c) Initialize Semaphore. Cf. 4.1.6.2.5.12.
d) Initialize Operation. Cf. 4.1.6.2.5.13.
4.2.5.4.4.3 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The four Initialization Functions interfaces are each
implemented as a procedure. The four procedures are
- 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
Cf. Figure 4.2.5.4.3.3-1
FIGURE 4.2.5.4.4.3-1
4.2.5.4.4.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̲
COROUTINE ̲RECORD cf. 4.1.5.5.1
COROUTINE ̲OPERATION cf. 4.1.5.5.2
COROUTINE ̲SEMAPHORE cf. 4.1.5.5.3
RUNNING ̲COROUTINE cf. 4.1.5.5.4
CURRENT ̲SUBPROCESS cf. 4.2.5.5.5
READY ̲LIST cf. 4.2.5.5.6
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)
4) RUNNING ̲COROUTINE (M)
5) CURRENT ̲SUBPROCESS (M)
6) READY ̲LIST (M)
7) READY ̲LIST (M)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None.
4.2.5.4.4.5 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲f̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲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̲s̲
CHAIN ̲IN cf. 4.2.5.6.1
a) I̲N̲I̲T̲ ̲C̲O̲M̲O̲N̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲:̲
RUNNING ̲COROUTINE is set to specified COROUTINE.
The specified coroutine record is initialized with
COROUTINE ̲ID, PRIORITY and SUBPROCESS ̲ID CURRENT
SUBPROCESS is set to specified SUBPROCESS ̲ID.
The READY ̲LIST is initialized.
F̲l̲o̲w̲g̲r̲a̲m̲
See Fig. 4.2.5.4.4.5-1
b) I̲N̲I̲T̲ ̲C̲O̲R̲O̲U̲T̲I̲N̲E̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
The specified COROUTINE ̲RECORD is updated with
COROUTINE ̲ID, PRIORITY, SUBPROCESS ̲ID and START
̲ADDRESS.
Then the coroutine is chained to the READY ̲LIST
F̲l̲o̲w̲g̲r̲a̲m̲
See Fig. 4.2.5.4.4.5-2
c) INIT ̲SEMAPHORE
N̲a̲r̲r̲a̲t̲i̲v̲e̲:̲
The specified SEMAPHORE is updated with COUNT.
The SEMAPHORE ̲LIST is initialized.
F̲l̲o̲w̲g̲r̲a̲m̲:̲
See Fig. 4.2.5.4.4.5-3
d) INIT ̲OP
N̲a̲r̲r̲a̲t̲i̲v̲e̲:̲
The specified OPERATION is initialized with PRIORITY.
F̲l̲o̲w̲g̲r̲a̲m̲:̲
See Fig. 4.2.5.4.4.5-4
Procedure INIT ̲COMON (COROUTINE: COROUTINE
̲RECORD
COROUTINE ̲ID: COROUTINE
̲ID ̲TYPE,
PRIORITY: PRIORITY ̲TYPE,
SUBPROCESS ̲ID: SUBPROCESS
̲ID ̲TYPE): OK
RUNNING ̲COROUTINE = COROUTINE
COROUTINE.COROUTINE ̲ID = COROUTINE ̲ID
COROUTINE.PRIORITY = PRIORITY
COROUTINE.SUBPROCESS ̲ID = SUBPROCESS ̲ID
CURRENT ̲SUBPROCESS = SUBPROCESS ̲ID
READY ̲LIST. NEXT = READY ̲LIST. PREVIOUS = ADDRESS (READY
̲LIST)
RETURN (OK)
Stop
FIGURE 4.2.5.4.4.5-1
Procedure INIT ̲COROUTINE (COROUTINE: COROUTINE ̲RECORD,
COROUTINE ̲ID: COROUTINE ̲ID
̲TYPE
PRIORITY: PRIORITY ̲TYPE,
SUBPROCESS ̲ID: SUBPROCESS
̲ID ̲TYPE,
START ̲ADDRESS: INTEGER):
OK
COROUTINE.COROUTINE ̲ID = COROUTINE ̲ID
COROUTINE.PRIORITY = PRIORITY
COROUTINE.SUBPROCESS ̲ID = SUBPROCESS ̲ID
COROUTINE.SAVER7 = START ̲ADDRESS
CHAIN ̲IN (COROUTINE, READY ̲LIST)
RETURN (OK)
Stop
FIGURE 4.2.5.4.4.5-2
Procedure INIT ̲SEMAPHORE (SEMAPHORE ̲COUNT: INTEGER,
SEMAPHORE: COROUTINE ̲SEMAPHORE):
OK
SEMAPHORE.COUNT = SEMAPHORE ̲COUNT
SEMAPHORE.NEXT = SEEMAPHORE.PREVIOUS = SEMAPHORE
RETURN (OK)
Stop
FIGURE 4.2.5.4.4.5-3
Procedure INIT ̲OP (OPERATION: COROUTINE ̲OPERATION,
PRIORITY: PRIORITY ̲TYPE):
OK
OPERATION.PRIORITY = PRIORITY
RETURN (OK)
FIGURE 4.2.5.4.4.5-4
4.2.5.4.5 T̲r̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The Trace Module maintains the interface between Coroutine
Monitor and the CSF Trace Module (cf. 4.2.1.1.7.2.1.10.
4.2.5.4.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 Trace Module may perform a short trace or a long
trace.
The short trace updates a short trace buffer with
- Trace Name
- Coroutine ID
- Subprocess ID
- Value of the 8 saved registers
The long trace updates a long trace buffer.
The long trace buffer contains the same information
as the short trace buffer plus the 8 words pointed
out by (saved R5 + 5)(datafield in operation).
When the trace buffer has been updated the CSF trace
procedure is called.
4.2.5.4.5.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The Trace procedure is called with two input parameters.
- NAME which is a name identifying the Coroutine
Monitor function which has generated the
trace
- LENGTH Telling if a short or a long trace are
wanted.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) TRACE (NAME:COMON ̲NAME,
LENGTH: (SHORT, LONG)): OK
b) TRACE (NAME, LENGTH, 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̲
R6 LINK (destr)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0-R5 and R7 (kept)
F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲
None
4.2.5.4.5.3 T̲r̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The Trace Module has one component.
- TRACE cf. 4.2.5.4.4.5
4.2.5.4.5.4 T̲r̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲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̲
- COROUTINE ̲RECORD cf. 4.1.6.5.1
- RUNNING ̲COROUTINE cf.
- CURRENT ̲SUBPROCESS cf. 4.2.5.5.1
- TRACE ̲BUFFER
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
- COROUTINE ̲RECORD
- RUNNING ̲SUBPROCESS
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
c1) T̲r̲a̲c̲e̲ ̲B̲u̲f̲f̲e̲r̲
The buffer used to build the Trace Record before
calling CMON ̲TRACE.
VAR TRACE ̲BUFFER:
RECORD
HEAD: CMON ̲TRACE ̲PARAM
cf. 4.1.6.1.1
DATA: ARRAY (0..15) OF INTEGER
END
INIT TRACE ̲BUFFER.HEAD.OFFSET = 0
TRACE ̲BUFFER.HEAD.ADDRESS =
ADDRESS (TRACE ̲BUFFER.DATA)
Refer figure 4.2.5.4.5.4-1
FIGURE 4.2.5.4.5.4-1
4.2.5.4.5.5 T̲r̲a̲c̲e̲ ̲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̲s̲
CMON ̲TRACE (cf. 4.1.7.2.1.12)
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Trace procedure updates TRACE ̲BUFFER if TRACE ̲ENABLE
is true otherwise it returns to caller immediately.
The TRACE ̲BUFFER to be updated may be short or long
as indicated by the input parameter LENGTH.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.5.4.5.5-1
Procedure TRACE(NAME: COMON NAME, LENGTH: (SHORT, LONG)):
OK
TRACE ̲ENABLE EQ FALSE?
TRACE ̲NAME = NAME
COROUTINE ̲ID = COROUTINE.COROUTINE ̲ID
SUBPROCESS ̲ID = COROUTINE.SUBPROCESS ̲ID
MOVE (SAVER0 - SAVER7) TO TRACEBUFFER
LENGTH EQ SHORT? - COUNT = 8
MOVE R5 (5..12) TO LONG ̲TRACE ̲BUFFER (0..7)
COUNT = 16
CMON ̲TRACE (TRACE ̲BUFFER) cf.4.1.7.2.7.2
LOAD ̲REGISTERS
RETURN (OK)
Stop
FIGURE 4.2.5.4.5.5-1
4.2.5.5 C̲o̲m̲m̲o̲n̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲D̲a̲t̲a̲
4.2.5.5.1 C̲u̲r̲r̲e̲n̲t̲ ̲S̲u̲b̲p̲r̲o̲c̲e̲s̲s̲
Each process using coroutines has one variable named
CURRENT ̲SUBPROCESS containing the Subprocess ID associated
to the coroutine running now.
It will be updated by coroutine monitor each time a
new running coroutine is selected.
VAR
CURRENT ̲SUBPROCESS: SUBPROCESS ̲ID
4.2.5.5.2 R̲e̲a̲d̲y̲ ̲L̲i̲s̲t̲
Each process using coroutines has one variable named
READY ̲LIST.
The READY ̲LIST points to first and last coroutine in
a double linked list containing the coroutine records
of all ready coroutines.
VAR
READY ̲LIST: LINK ̲HEAD;
4.2.5.6 C̲o̲r̲o̲u̲t̲i̲n̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲C̲o̲m̲m̲o̲n̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲
4.2.5.6.1 C̲h̲a̲i̲n̲ ̲I̲n̲
4.2.5.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 CHAIN ̲IN procedure chains an object into a double
linked list. The object is chained in, in accordance
to its priority, highest priority equal zero. Lowest
priority equal 255.
The object must be of the COROUTINE ̲LINK type.
4.2.5.6.1.2 C̲h̲a̲i̲n̲ ̲I̲n̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) CHAIN ̲IN (OBJECT: COROUTINE ̲LINK
HEAD: LINK ̲HEAD): OK
b) CHAIN ̲IN(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 HEAD (dest)
R5 pointer to OBJECT (kept)
R6 LINK (dest)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0, R1-R3, kept
R7 (destroyed)
4.2.5.6.1.3 C̲h̲a̲i̲n̲ ̲I̲n̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
COROUTINE ̲LINK cf. 4.1.6.5.4
LINK ̲HEAD cf. 4.1.6.5.5
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
NA
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
NA
4.2.5.6.2 C̲h̲a̲i̲n̲ ̲O̲u̲t̲
4.2.5.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 Chain Out procedure chains an object out of a double
linked list.
The object must be of COROUTINE ̲LINK type.
4.2.5.6.2.2 C̲h̲a̲i̲n̲ ̲O̲u̲t̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) CHAIN ̲OUT (OBJECT: COROUTINE ̲LINK): OK
b) CHAIN ̲OUT (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̲
R5 pointer to OBJECT (kept)
R6 LINK
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0-R4, R7 kept
4.2.5.6.2.3 C̲h̲a̲i̲n̲ ̲O̲u̲t̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
COROUTINE ̲LINK Cf. 4.1.6.5.4
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
NA
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
NA
4.2.5.7 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
NA.
4.2.6 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲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.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 System Call Monitor has at Figure 4.2.6.1-1 been
broken down so the upper level shows the four modules
in System Call Monitor furthermore the System Call
Monitor common functions are shown at the same level.
The modules having more than one mainfunction are broken
down so the mainfunctions are identified.
For further functional specification refer to module
specification (cf. 4.2.6.4).
The number in the boxes representing modules refers
to module number.
Figure 4.2.6.1-1
4.2.6.2 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
Refer to figure 4.2.6.1-1
I̲n̲t̲e̲r̲n̲a̲l̲ ̲p̲r̲o̲c̲e̲d̲u̲r̲e̲s̲
WAIT ̲EVENT cf. 4.2.6.4.2.5
PCF ̲INIT cf. 4.2.6.4.3.5.a
PCF ̲ANSWER ̲RECEIVED cf. 4.2.6.4.3.5.b
PCF ̲COMPLETE cf. 4.2.6.4.3.5.c
PCF ̲CANCEL cf. 4.2.6.4.3.5.d
IOS ̲INIT cf. 4.2.6.4.4.5.a
IOS ̲ANSWER ̲RECEIVED cf. 4.2.6.4.4.5.b
IOS ̲COMPLETE cf. 4.2.6.4.4.5.c
IOS ̲CANCEL cf. 4.2.6.4.4.5.d
M̲o̲n̲i̲t̲o̲r̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲
Monitor procedure with 6 entries:
SCM cf. 4.2.6.4
4.2.6.3 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲
Control logic for System Call Monitor is shown at figure
4.2.6.3-1.
An application process activating the SCM Monitor procedure
with its six entries are shown leftmost.
Furthermore, the System Call Monitor procedures associated
to the general System Call Monitor functions are shown.
At the rightmost the Service Systems called by System
Call Monitor are shown. This Service System may be
external Service Systems as well as System Call Monitors
own Service Systems.
It is shown from which procedures the single Service
System functions are called.
Figur 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̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.6.4.1 A̲p̲p̲l̲i̲c̲a̲t̲i̲o̲n̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲
The application Interface Module maintains the interfaces
from application modules to Service Systems.
Requests from applications are passed on to the Service
Systems and on return the answers are returned to calling
modules.
Furthermore, this module makes it possible for a process
to wait for completion of several pending requests
in parallel.
4.2.6.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) Initiate System Call cf. 4.1.7.2.6.1
b) System Call cf. 4.1.7.2.6.2
c) Wait System Call cf. 4.1.7.2.6.3
d) Cancel System Call cf. 4.1.7.2.6.4
e) Wait Next Operation cf. 4.1.7.2.6.5
f) Define Service System cf. 4.1.7.2.6.6
4.2.6.4.1.2 A̲p̲p̲l̲i̲c̲a̲t̲i̲o̲n̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
a) Initiate System Call cf. 4.1.7.2.6.1
b) System Call cf. 4.1.7.2.6.2
c) Wait System Call cf. 4.1.7.2.6.3
d) Cancel System Call cf. 4.1.7.2.6.4
e) Wait Next Operation cf. 4.1.7.2.6.5
f) Define Service System cf. 4.1.7.2.6.6
4.2.6.4.1.3 A̲p̲p̲l̲i̲c̲a̲t̲i̲o̲n̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The components in this module are the Monitor procedure
SCM and the two procedures INIT ̲SYSTEM ̲CALL and WAIT.
Cf. Figure 4.2.6.4.1.3-1
Figure 4.2.6.4.1.3-1
4.2.6.4.1.4 A̲p̲p̲l̲i̲c̲a̲t̲i̲o̲n̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
SSCB ̲ARRAY cf. 4.2.6.5.1
SOCB ̲ARRAY cf. 4.2.6.5.4
READY ̲LIST cf. 4.2.6.5.2
FREE ̲SOCB ̲LIST cf. 4.2.6.5.3
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
READY ̲LIST
FREE ̲SOCB ̲LIST
SSCB (ALL) (M)
SOCB (ALL) (M)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None
4.2.6.4.1.5 A̲p̲p̲l̲i̲c̲a̲t̲i̲o̲n̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲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̲s̲
INIT ̲RECEIVE ̲FIRST ̲QEL
COMPLETE ̲RECEIVE
CANCEL ̲RECEIVE
cf. 4.2.2.4.1.
MMON ̲INIT
MMON ̲COMPLETE
MMON ̲CANCEL
cf. 4.4.2.4
TMP ̲INIT
TMP ̲COMPLETE
TMP ̲CANCEL
. (j) 4.2.1
IOC ̲INIT
IOC ̲COMPLETE
IOC ̲CANCEL
. (f) 4.2
a) S̲C̲M̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
This monitor procedure has a case selecting one
of System Call Monitors main functions.
The four first entries perform most processing
by means of procedure calls. The called procedures
is further described in the following paragraphs.
The last two entries call no procedures and will
thus be described here.
- CANCEL ̲SYSCALL:
If STATUS of SOCB is not PENDING nothing
is done. If STATUS of SOCB is PENDING the
cancel procedure in the Service System
identified by SS ̲ID in SOCB is called.
- DEFINE ̲SERVICE ̲SYSTEM:
Initializes a SSCB with the parameters
specified by call.
F̲l̲o̲w̲g̲r̲a̲m̲
cf. figure 4.2.6.4.1.5-1 to -3.
- CANCEL ̲SYSCALL cf. figure 4.2.6.4.1.5-6
- DEFINE ̲SERVICE ̲SYSTEM cf. figure 4.2.6.4.1.5-5
MON Procedure SCM (INR04:ARRAY(0..4)OF INTEGER,
SCM ̲CODE:SCM ̲CODE ̲TYPE,
FUNCTION: SCM ̲FUNCTION,
AP ̲REF: INTEGER,
SO ̲REF: SOCB ̲INDEX)
(OUTR04:ARRAY (0..4) OF INTEGER,
AP ̲REF: INTEGER,
SO ̲REF: SOCB ̲INDEX,
CC: COMPLETION ̲CODE): ERROR ̲OK
Case SCM ̲CODE
- INIT ̲SYSCALL ?-E ̲INIT ̲SYSCALL
- SYSCALL ?-E ̲SYSCALL
- WAIT ̲SYSCALL ?-E ̲WAIT ̲SYSCALL
- WAIT ̲NEXT ̲OPERATION ?-E ̲WAIT ̲NEXT ̲OPERATION
- CANCEL ̲SYSCALL ?-E ̲CANCEL
- DEFINE ̲SERVICE ̲SYSTEM ?-E ̲DEFINE ̲SERVICE ̲SYSTEM
End case SCM ̲CODE
RETIRE (SCM ̲ERROR, ILLEGAL ̲CODE)
Stop
FIGURE 4.2.6.4.1.5-1
E̲ ̲I̲N̲I̲T̲ ̲S̲Y̲S̲C̲A̲L̲L̲
Start
INIT ̲SYSCALL (FUNCTION, AP ̲REF)
(EXIT ̲NO, SOCB, CC)
MON ̲RETURN (SOCB.SOCB ̲ID, CC, EXIT ̲NO,)
Stop
E̲ ̲S̲Y̲S̲C̲A̲L̲L̲
Start
INIT ̲SYSCALL (FUNCTION, AP ̲REF) (EXIT ̲NO,SOCB,CC);
IF EXIT NUMBER = OKAY THEN
BEGIN
WAIT (SOCB);
RESOTRE REGISTERS, CC AND EXIT NUMBER FROM
SOCB
END;
End case INIT ̲SYSCALL
MON ̲RETURN(OUTR04, EXIT ̲NO, CC)
Stop
FIGURE 4.2.6.4.1.5-2
E̲ ̲W̲A̲I̲T̲ ̲S̲Y̲S̲C̲A̲L̲L̲
Start
SOCB = SOCB ̲ARRAY (SO ̲REF)
array address error OR
? - RETIRE(SCM ̲ERROR,SOCB ̲REF
̲ERROR)
SOCB.STATUS EQ FREE
WAIT (SOCB)
RESTORE REGISTERS, CC AND EXIT NO FROM SOCB
MON ̲RETURN (OUTR04, EXIT ̲NO, CC)
Stop
E̲ ̲W̲A̲I̲T̲ ̲N̲E̲X̲T̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲
Start
READY loop
READY ̲LIST NOT ̲EMPTY? EXIT
WAIT ̲EVENT
End READY loop
SOCB = READY ̲LIST. NEXT
CHAIN ̲SOCB (SOCB,SOCB)
MON ̲RETURN (SOCB.AP ̲REF, SOCB.SOCB ̲ID, OK)
Stop
FIGURE 4.2.6.4.1.5-3
E̲ ̲C̲A̲N̲C̲E̲L̲
Start
SOCB = SOCB ̲ARRAY (SO ̲REF)
Array address error or
SOCB.STATUS EQ FREE ?-RETIRE(SCM ̲ERROR, SOCB ̲REF
̲ERROR)
SOCB.STATUS NE PENDING?
SSCB = SSCB ̲ARRAY (SOCB.FUNCTION.S ̲ID)
Case SSCB.KIND
- QMON ? - CANCEL ̲RECEIVE (SOCB)
- MMON ? - MMON ̲CANCEL (SOCB)
- TMP ? - TMP ̲CANCEL (SOCB)
- IOC ? - IOC ̲CANCEL (SOCB)
- PCF ? - PCF ̲CANCEL (SOCB)
- IOS ? - IOS ̲CANCEL (SOCB)
End case SSCB.KIND
SOCB.STATUS NE DONE ?
CHAIN ̲OUT (SOCB)
CHAIN ̲IN (SOCB, READY ̲LIST)
MON ̲RETURN (0,OK)
Stop
FIGURE 4.2.6.4.1.5-4
E̲ ̲D̲E̲F̲I̲N̲E̲ ̲S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲
Start
SSCB = SSCB ̲ARRAY (SS ̲ID)
Array address error? - RETIRE (SCM ̲ERROR, ILLEGAL ̲SS ̲ID)
or
SSCB.KIND = NE ̲PCF ̲KIND
SSCB.COMMUNCATION = COMMUNICATION ̲KIND
SSCB.PCF ̲PARAM.SYNCEL = SYNCEL ̲ID
CASE COMMUNICATION ̲KIND
BY ̲SEMA ? SYNCEL ̲INFO ̲SIZE NE 0 ?
BY ̲INFO ? SYNCEL ̲INFO ̲SIZE EQ 0 ?
SSCBZ.SIZE = ????(ILLEGAL
MIN(PCF ̲MAX ̲SIZE, DEFINE PARAMS)
SYNC ̲INFO ̲SIZE
END CASE
MON ̲RETURN
stop
FIGURE 4.2.6.4.1.5-5
…06…1 …02… …02… …02… …02…
b) 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̲
From the INIT ̲SYSCALL entry the INIT ̲SYSTEM ̲CALL
procedure is called.
A free SOCB is allocated and initialized with:
- FUNCTION taken from input parameters
- APPLICATION REFERENCE taken from input parameters
- SYSTEM CALL STATUS is set to PENDING
Function is then used to select a SSCB. The appropriate
Service System is then entered in its INIT FUNCTION
entry point. This is done by calling the INIT procedure
in actual Service System.
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 SC ̲ERROR, the SOCB is released. If it
is PENDING the SOCB is chained into SOCB ̲LIST in
SSCB.
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 SOCB ̲ID
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.1.5.(6-7)
Start
Procedure INIT ̲SYSTEM ̲CALL (FUNCTION:
SCM
̲FUNCTION,
AP ̲REF: INTEGER)
EXIT ̲NO: ERROR ̲OK,
SOCB: POINTER,
CC:COMPLETION ̲CODE)
FREE ̲SOCB ̲LIST EMPTY? - RETIRE (SCM ̲NO ̲RESOURCES)
SOCB.FUNCTION = FUNCTION
SOCB.AP ̲REF = AP ̲REF
SOCB.STATUS = PENDING
SSCB =SSCB ̲ARRAY (FUNCTION.SS ̲ID)
S̲E̲L̲E̲C̲T̲ ̲S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲
Case SOCB.STATUS:
- DONE ? - CHAIN ̲SOCB (SOCB, READY ̲LIST)
- PENDING ? - CHAIN ̲IN(SOCB, SSCB. SOCB ̲LIT)
- SC ̲ERROR ? - SOCB.STATUS = FREE
End case SOCB.STATUS
Return
Stop
FIGURE 4.2.6.4.1.5-6
S̲E̲L̲E̲C̲T̲ ̲S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲
Start
SS ̲CODE = FUNCTION.SS ̲CODE
Case SSCB.KIND
QMON ? - INIT ̲RECEIVE ̲FIRST ̲QEL(SS ̲CODE, SOCB)
(EXIT ̲NO, CC):OK
MMON ?- MMON ̲INIT(SS ̲CODE, SOCB)
(EXIT ̲NO, CC):OK
TMP ?- TMP ̲INIT(SS ̲CODE, SOCB)
(EXIT ̲NO, CC):OK
IOC ?- IOC ̲INIT(SS ̲CODE, SOCB)
(EXIT ̲NO, CC):OK
PCF ?- PCF ̲INIT(SS ̲CODE, SOCB)
(EXIT ̲NO, CC):OK
IOS ?- IOS ̲INIT(SS ̲CODE, SOCB)
(EXIT ̲NO, CC):OK
End case SSCB.KIND
Stop
FIGURE 4.2.6.4.1.5-7
c) W̲a̲i̲t̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Waits for completion of the system call identified
by SOCB.
If SOCB Status is PENDING, the internal procedure
Wait Event is called. This is repeated until the
Status of SOCB has changed to DONE. Then the Service
System is entered in the COMPLETE FUNCTION entry
point, by calling the "COMPLETE" procedure in actual
Service System.
Upon return from Service System, the SOCB is released.
The "work" part of SOCB is, however, untouched
and may be used by calling procedure to get output
parameters from service system.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.1.5-8 to -9.
Procedure WAIT (SOCB:POINTER)
Wait loop
SOCB.STATUS NE PENDING? EXIT
WAIT ̲EVENT
End WAIT Loop
SSCB EQ SSCB ̲ARRAY (SOCB.SS ̲ID)
S̲E̲L̲E̲C̲T̲ ̲S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲ ̲C̲O̲M̲P̲L̲E̲T̲I̲O̲N̲
SOCB.STATUS = FREE
CHAIN ̲SOCB (SOCB, FREE ̲SOCB ̲LIST)
RETURN(OK)
Stop
FIGURE 4.2.6.4.1.5-8
S̲E̲L̲E̲C̲T̲ ̲S̲E̲R̲V̲I̲C̲E̲ ̲S̲Y̲S̲T̲E̲M̲ ̲C̲O̲M̲P̲L̲E̲T̲I̲O̲N̲
Start
Case SSCB.KIND:
- QMON ?- COMPLETE ̲RECEIVE(SOCB)
- MMON ?- MMON ̲COMPLETE(SOCB)
- TMP ?- TMP ̲COMPLETE(SOCB)
- IOC ?- IOC ̲COMPLETE(SOCB)
- PCF ?- PCF ̲COMPLETE(SOCB)
- IOS ?- IOS ̲COMPLETE(SOCB)
End case SSCB.KIND
Stop
FIGURE 4.2.6.4.1.5-9
4.2.6.4.2 S̲C̲M̲ ̲W̲a̲i̲t̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.6.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̲
SCM Wait Module is only activated from system Call
Monitor itself. It contains the central waiting point
of a process.
It is called when the process cannot proceed further
until some external event has occurred.
The process must have pending system calls when this
module is entered. Otherwise it is a fatal error.
4.2.6.4.2.2 S̲C̲M̲ ̲W̲a̲i̲t̲ ̲M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲s̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) WAIT ̲EVENT:OK
b) WAIT ̲EVENT(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 CSF Local Data (kept)
R6 LINK (destr)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0-R5,R7 (kept)
F̲a̲t̲a̲l̲ ̲E̲r̲r̲o̲r̲s̲
No pending system calls.
4.2.6.4.2.3 S̲C̲M̲ ̲W̲a̲i̲t̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲
SCM Wait Module is implemented as two procedures.
The first is WAIT ̲EVENT which is called from the Application
Interface Module. The second is TEST ̲DONE ̲SOCB which
is only called from WAIT ̲EVENT.
4.2.6.4.2.4 S̲C̲M̲ ̲W̲a̲i̲t̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
SSCB ̲ARRAY c.f. 4.2.6.5.4
SOCB c.f. 4.l.6.6.l
b)
E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
SSCB (ALL) (M)
SOCB (ALL) (M)
c)
L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
4.2.6.4.2.5 S̲C̲M̲ ̲W̲a̲i̲t̲ ̲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̲s̲
INSPECT ̲RECEIVE
c.f. 4.2.2.4.1
MMON ̲ANSWER ̲RECEIVED
c.f. 4.4.2.4
P̲C̲F̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲
The parameter used to receive the info from a synchronization
element.
Type PCF ̲SYNC ̲INFO =
RECORD
HEADER: SYNC ̲INFO ̲HEADER;
INFO: ARRAY (1..PCF ̲MAX ̲INFO ̲SIZE)
OF INTEGER;
END;
TMP ̲ANSWER ̲RECEIVED
c.f. (j) 4.2.1
ANSWER ̲RECEIVED
c.f. (f) 4.2
N̲a̲r̲r̲a̲t̲i̲v̲e̲
The SSCB ̲ARRAY is used to collect a parameter list
for the IO system procedure General Await. Each SSCB
having a non-empty list of pending SOCBs and communicating
by synch.element is included in the General Await parameter.
If no SSCBs have pending SOCBs, the process is retired.
Upon return from General Await the parameter list is
then inspected in order to locate the SSCB for which
info is received. For this SSCB, the corresponding
Service System is entered in the entry point Answer
Received, by calling the Answer Received procedure
in actual Service System.
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".
This is done by calling the
TEST ̲DONE ̲SOCBS procedure.
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.
F̲l̲o̲w̲g̲r̲a̲m̲
c.f. fig. 4.2.6.4.2.5-(l-4)
Procedure WAIT ̲EVENT:OK
PARAM ̲LINK = 0 , P ̲COUNT = 0
For all SSCBs in SSCB ̲ARRAY LOOP
SSCB.PCF ̲PARAM.RESULT=NO ̲SIGNAL
SSCB.SOCB ̲LIST. Empty ?
Increment P ̲COUNT
SSCB. COMMUNICATION EQ BY ̲IOS ?
SSCB. PCF ̲PARAM.LINK = PARAM ̲LINK
PARAM ̲LINK = % SSCB.PCF ̲PARAM
SSCB.COMMUNICATION EQ BY ̲SEMA ?
SSCB. PCF ̲PARAM.INFO = HEADER
SSCB.PCF ̲PARAM.INFO = NIL
LAST SSCB IN ARRAY ? EXIT
End SSCB LOOP
P ̲COUNT EQ 0 ? - retire (no pending system calls)
Case GENERAL AWAIT (PARAM ̲LINK, NIL)
(SOCB, IOS ̲OP, CC):(ERROR, IO, NO
̲IO)
ERROR?- RETIRE (SCM ̲ERROR, CC, FALSE)
IO?- I̲O̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲
NO ̲IO?- N̲O̲ ̲I̲O̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲
End case GENERAL AWAIT
RETURN (OK)
Stop
FIGURE 4.2.6.4.2.5-1
I̲O̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲
Start
SSCB=SSCB ̲ARRAY (SOCB.SS ̲ID)
Case SSCB.KIND:
IOS?-IOS ̲ANSWER ̲RECEIVED(SOCB,IOS ̲OP)
(COUNT)
IOC?-IOC ̲ANSWER ̲RECEIVED(SOCB,IOS ̲OP)
(COUNT)
End case SSCB ̲KIND
TEST ̲DONE ̲SOCBS(COUNT,SOCB)
Stop
FIGURE 4.2.6.4.2.5-2
N̲O̲ ̲I̲O̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲
Start
REPEAT ̲FOR ̲ALL ̲SSCBS Loop
SSCB.PCF ̲PARAM.RESULT EQ INFO ̲RECEIVED? EXIT
End REPEAT ̲FOR ̲ALL ̲SSCBS Loop
Case SSCB.KIND
- QMON?-INSPECT ̲RECEIVE(NIL,SSCB.SOCB ̲LIST)
(COUNT,DONE ̲SOCB)
- MMON?-MMON ̲ANSWER ̲RECEIVED(INFO,SSCB.SOCB ̲LIST)
(COUNT,DONE ̲SOCB)
- TMP ?-TMP ̲ANSWER ̲RECEIVED(INFO,SSCB.SOCB ̲LIST)
(COUNT,DONE ̲SOCB)
-PCF ? PCF ̲ANSWER ̲RETURNED (INFO, SSCB.SOCB ̲LIST)
(INFO, DONE ̲SOCB)
End case SSCB.KIND
TEST ̲DONE ̲SOCBS(COUNT,DONE ̲SOCB)
Stop
FIGURE 4.2.6.4.2.5-3…86…1 …02… …02… …02… …02… …02… …02… …02…
Procedure TEST ̲DONE ̲SOCBS(COUNT:INTEGER, SOCB:POINTER):OK
READY ̲SOCB Loop
COUNT LE 0 ? EXIT
SOCB.STATUS NE DONE?
CHAIN ̲SOCB (SOCB,READY ̲LIST)
DECREMENT COUNT
SOCB= SOCB.HEAD.NEXT
End READY ̲SOCB Loop
Stop
FIGURE 4.2.6.4.2.5-4
4.2.6.4.3 P̲r̲o̲c̲e̲s̲s̲ ̲C̲o̲m̲m̲u̲n̲i̲c̲a̲t̲i̲o̲n̲ ̲F̲a̲c̲i̲l̲i̲t̲y̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.6.4.3.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Cf. 4.1.7.2.6.7
4.2.6.4.3.2 P̲C̲F̲ ̲M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Cf. 4.1.7.2.6.7
4.2.6.4.3.3 P̲C̲F̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The PCF module consists of four procedures:
- PCF ̲INIT
- PCF ̲ANSWER ̲RECEIVED
- PCF ̲COMPLETE
- PCF ̲CANCEL
4.2.6.4.3.4 P̲C̲F̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
SOCB c.f. 4.1.6.6.1
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
NA
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
PCF Module has structured the SOCB.SS ̲DATA field
as a record.
TYPE
PCF ̲DATA=RECORD
INFO:POINTER,
SIZE:INTEGER,
END
4.2.6.4.3.5 P̲C̲F̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
a) P̲C̲F̲ ̲I̲N̲I̲T̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Input parameters are saved in SOCB
F̲l̲o̲w̲g̲r̲a̲m̲
C.f. figure 4.2.6.4.3.5-1
b) P̲C̲F̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Received info are delivered to caller in specified
area and SOCB. PCF ̲DATA is updated.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 6.4.3.5-2
c) P̲C̲F̲ ̲C̲O̲M̲P̲L̲E̲T̲E̲
Output parameter from SOCB.PCF ̲DATA are delivered
to caller.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.3.5-3
d) P̲C̲F̲ ̲C̲A̲N̲C̲E̲L̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
SOCB.STATUS is set to DONE
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.3.5-3
Procedure PCF ̲INIT (FUNCTION:SCM ̲FUNCTION,
INFO: POINTER,
SOCB: POINTER),
(EXIT ̲NO: ERROR ̲OK,
CC:COMPLETION ̲CODE):OK
FUNCTION NE AWAIT ̲SYNCEL? - RETIRE(ILLEGAL ̲PCF ̲FUNCTION)
SOCB.PCF ̲DATA.INFO = INFO
CC = OK
EXIT ̲NO = OK
RETURN (OK)
Stop
SSCB = SSCB ̲ARRAY (SOCB.SS ̲ID)
CASE CHECK ̲PAGE ̲ACCESS(INFO,SSCB ̲SIZE,WRITE ̲ACCESS):ERROR ̲OK
ERROR: SCM ̲RETIRE (SCM ̲PARAM ̲ADDRESS ̲ERROR)
END CASE
FIGURE 4.2.6.4.3.5-1
Procedure PCF ̲ANSWER ̲RECEIVED (RECEIVED ̲INFO: SYNC ̲INFO,
FIRST ̲SOCB,
LAST ̲SOCB: POINTER)
(DONE ̲COUNT: INTEGER,
DONE ̲SOCB: POINTER):OK
DONE ̲SOCB = FIRST ̲SOCB
DONE ̲SOCB.STATUS = DONE
SIZE = RECEIVED ̲INFO.XFER
INFO = DONE ̲SOCB.PCF ̲DATA.INFO
Move SIZE words from RECEIVED ̲INFO.DATA to INFO (0..SIZE)
DONE ̲SOCB ̲(WORK(O) = SIZE
DONE ̲COUNT = 1
RETURN (OK)
Stop
FIGURE 4.2.6.4.3.5-2
Procedure PCF ̲COMPLETE (SOCB:POINTER)
(COUNT:INTEGER,
INFO:ARRAY (1..COUNT) OF INTEGER,
EXIT ̲NO: ERROR ̲OK,
CC: COMPLETION ̲CODE): OK
EXIT ̲NO = OK
CC = OK
RETURN (OK)
Stop
Start
Procedure PCF ̲CANCEL (SOCB:POINTER):OK
SOCB.STATUS = DONE
RETURN (OK)
Stop
FIGURE 4.2.6.4.3.5-3
4.2.6.4.4 I̲O̲S̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
IOS interface Module maintains the interface to DAMOS
IOS.
4.2.6.4.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̲
Cf. 4.1.7.2.6.8.
4.2.6.4.4.2 I̲O̲S̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Cf. 4.1.7.2.6.8
4.2.6.4.4.3 I̲O̲S̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The IOS interface module consists of four procedures:
- IOS ̲INIT
- IOS ̲ANSWER ̲RECEIVED
- IOS ̲COMPLETE
- IOS ̲CANCEL
4.2.6.4.4.4 I̲O̲S̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲a̲t̲a̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
SOCB cf. 4.1.6.6.1
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
NA
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
The IOS Interface Module has structured the SOCB
SS ̲DATA field as a record.
TYPE
IOS ̲DATA = RECORD
SAVER0,
SAVER1,
SAVER2,
SAVER3,
SAVER4,
SAVER6,
CC: INTEGER
END
4.2.6.4.4.5 I̲O̲S̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
a) I̲O̲S̲ ̲I̲N̲I̲T̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Call IO-System in General-IO entry and Saves IOS
̲OPERATION ̲REF in SOCB.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.4.5-1
b) I̲O̲S̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲C̲E̲I̲V̲E̲D̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Call IO-System function "Wait Operation" and save
R0-R4, EXIT ̲NO and CC in SOCB.
DONE ̲COUNT is always set to "1".
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.4.5-2.
c) I̲O̲S̲ ̲C̲O̲M̲P̲L̲E̲T̲E̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Delivers output parametes saved in SOCB to caller.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.4.5-3.
d) I̲O̲S̲ ̲C̲A̲N̲C̲E̲L̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Call the IO-System "Cancel" function
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.4.5-3
Procedure IOS ̲INIT (FUNCTION: SS ̲FUNCTION,
SOCB:POINTER,
INR04: ARRAY(0..4)OF INTEGER)
(CC: COMPLETION ̲CODE):OK
Case GENERAL (FUNCTION IOR INITERFLAG, SOCB, INR04)
(IOS ̲OPERATION ̲REF, CC): ERROR ̲OK:
- ERROR? - SOCB.STATUS = SC ̲ERROR
EXIT ̲NO = ERROR
- OK ? EXIT ̲NO = OK
End Case General
SOCB.IOS ̲DATA.SAVER6 = IOS ̲OPERATION ̲REF
RETURN (OK)
Stop
FIGURE 4.2.6.4.4.5-1
Procedure IOS ̲ANSWER ̲RECEIVED (FIRST ̲SOCB,
LAST ̲SOCB: POINTER
INFO: INTEGER)
(DONE ̲COUNT:INTEGER
DONE ̲SOCB: POINTER):OK
SOCB = FIRST ̲SOCB
SOCB.STATUS = DONE
Case WAITOPERATION (SOCB.SAVR6) (IOS ̲CC): ERRROR ̲OK:
- ERROR ? - IOS ̲CC = OK? EXIT ̲NO = ERROR
RETIRE(SCM ̲ERROR, IOS ̲CC)
- OK ? EXIT ̲NO = OK
End case WAITOPERATION
Save (R0-R4, EXIT,NO (SAVR6),CC) in SOCB.SS ̲DATA
DONE ̲COUNT = 1
DONE ̲SOCB = SOCB
RETURN (OK)
Stop
FIGURE 4.2.6.4.4.5-2
Start
Procedure IOS ̲COMPLETE (SOCB: POINTER)
(OUTR04: ARRAY (0..4) OF INTEGER
EXIT ̲NO: ERROR ̲OK)
CC: COMPLETION ̲CODE): OK
RESTORE R0-R4
R6 = SOCB.IOS ̲DATA.SAVER 6
R7 = SOCB.IOS ̲DATA.CC
RETURN (OK)
Stop
Start
Procedure IOS ̲CANCEL (SOCB): OK
Case CANCEL (SOCB. SAVR6) (IOS ̲CC): ERROR ̲OK:
- ERROR? - RETIRE (SCM ̲ERROR, IOS ̲CC)
- OK?
End case CANCEL
RETURN (OK)
Stop
4.2.6.5 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲ ̲
SCM Data are located in the Local System Segment for
calling process, cf. 4.1.4.
4.2.6.5.1 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̲
Each Service System accessed by a process is described
by an SSCB. The SSCBs are located in an array indexed
by SSCB ̲INDEX, refer 4.1.6.6.4.
VAR
SSCB ̲ARRAY=ARRAY(SSCB ̲INDEX) OF SSCB
TYPE
SSCB= RECORD
KIND: SS ̲KIND; 4.1.6.1.6.5
COMMUNICATION:"COM" SS ̲COMMUNICATION; 4.1.6.6.7.
LOCK:"L" BOOLEAN;
"Defines, if hardware
semaphore shall be
locked.
DISABLE:"D" BOOLEAN;
"Defines if interrupts
shall be "disabled.
LOCK ̲SEM: POINTER;
PCF ̲PARAM: PCF ̲SINGLE ̲PARAM;
"( ) (PSP for Process
Communication)
SOCB ̲LIST: LINK ̲HEAD
END
Refer figure 4.2.6.5.1-1
4.2.6.5.2 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̲
Each pending System Call is described in an SOCB. SOCBs
are located in an array indexed by SOCB ̲INDEX, refer
4.1.6.6.2.
VAR
SOCB ̲ARRAY= ARRAY(1..MAX ̲SOCB ̲INDEX) OF SOCB,
refer 4.1.6.6.1.
I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲
As part of SCM Initialization, all SOCBs are chained
to the FREE SOCB ̲LIST with STATUS= FREE.
FIGURE 4.2.6.5.1-1
Service System Control Block
4.2.6.5.3 R̲e̲a̲d̲y̲ ̲S̲O̲C̲B̲ ̲L̲i̲s̲t̲
The list of Ready SOCBs.
VAR READY ̲LIST: LINK ̲HEAD
4.2.6.5.4 F̲r̲e̲e̲ ̲S̲O̲C̲B̲ ̲L̲i̲s̲t̲
The list of Free SOCBs.
VAR FREE ̲SOCB ̲LIST: LINK ̲HEAD
4.2.6.6 S̲y̲s̲t̲e̲m̲ ̲C̲a̲l̲l̲ ̲M̲o̲n̲i̲t̲o̲r̲ ̲C̲o̲m̲m̲o̲n̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲
System Call Monitor has no common subpackage procedures.
4.2.6.7 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
Refer 4.1.7.3.6
4.2.7 Q̲ ̲S̲e̲t̲u̲p̲
The QSetup initializes CSF HIGH and the segments mentioned
in 4.2.2.5 and 2.2.1.8 respectively.
The subpackage consist of 2 main procedures
INIT ̲CSF ̲HIGH ̲SEGMENTS
and
INIT ̲CSF ̲LOW ̲SEGMENTS
The 2 main procedures are broken down on figures 4.2.7-1
and 4.2.7-2.
4.2.7.1 P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
In the following all the procedures will be described.
Figure 4.2.7-1
CSF HIGH INITIALIZATION CONTROL FLOW
Figure 4.2.7-2
SEGMENT INITIALIZATION CONTROL FLOW
4.2.7.1.1 I̲N̲I̲T̲ ̲C̲S̲F̲ ̲H̲I̲G̲H̲ ̲S̲E̲G̲M̲E̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
All data structures located in the high part of the
shared data area of CSF are initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲CSF ̲HIGH SEGMENTS ( )
( )
b) INIT ̲CSF ̲HIGH ̲SEGMENTS (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 (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.2 I̲N̲I̲T̲ ̲C̲S̲F̲ ̲L̲O̲W̲ ̲S̲E̲G̲M̲E̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
All data structures located in the low part of the
shared data area of CSF are initiated.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲CSF ̲LOW ̲SEGMENTS ( )
( )
b) INIT ̲CSF ̲LOW ̲SEGMENTS (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 (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.3 I̲N̲I̲T̲ ̲L̲O̲C̲K̲ ̲C̲O̲U̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes the lock count array.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲LOCK ̲COUNTS ( )
( )
b) INIT ̲LOCK ̲COUNTS (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 (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.4 I̲N̲I̲T̲ ̲S̲U̲B̲P̲R̲O̲C̲S̲ ̲C̲A̲P̲ ̲A̲R̲R̲A̲Y̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The subprocess ̲Capability ̲Array is for each subprocess
initialized with S ̲COUNT, G ̲COUNT and nil pointer to
capabilities.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲SUBPROCS ̲CAP ARRAY ( )
( )
b) INIT ̲SUBPROCS ̲CAP ̲ARRAY (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 (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.5 M̲O̲V̲E̲ ̲C̲A̲P̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The capabilities are moved from template corresponding
to specified SUBPROCESS ̲TYPE to actual capabilities.
If the GEN ̲INC ̲FLAG is set for a capability the specified
index is incremented with actual SUBPROCESS ̲NO.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) MOVE ̲CAPS (SUBPROCESS : SUBPROCESS
̲TYPE
SUBPROCESS ̲NUMBER : SUBPROCESS
̲NO
ACTUAL ̲CAPABILITY : POINTER)
(ACTUAL ̲CAPABILITY : POINTER)
b) MOVE ̲CAPS (R0, R3, R7, 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 SUBPROCESS ̲TYPE (KEPT)
R3 SUBPROCESS ̲NO WITHIN TYPE (KEPT)
R7 ACTUAL CAPABILITY (DEST)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R7 ACTUAL CAPABILITY.
4.2.7.1.6 C̲H̲E̲C̲K̲ ̲A̲C̲T̲ ̲S̲U̲B̲P̲R̲O̲C̲E̲S̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Actual subprocess no. is checked against the specified
NO ̲OF ̲SUBP if actual subprocess number is less then
NO ̲OF ̲SUBP the specified subprocesstype is decremented
in order to repeat the action with another subprocess
of same tyep.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲t̲i̲o̲n̲
a) CHECK ̲ACT ̲SUBPROCESS (SUBPROCESS : SUBPROCESS
̲TYPE;
INCARNATIONS : NO ̲OF ̲INC,
SUBPROCESS ̲NUMBER :
SUBPROCESS ̲NO)
(SUBPROCESS : SUBPROCESS
̲TYPE;
SUBPROCESS ̲NUMBER :
SUBPROCESS ̲NO)
b) CHECK ̲ACT ̲SUBPROCESS (R0, 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̲
R0 SUBPROCESS ̲TYPE (DEST)
R2 NO ̲OF ̲INCARNATIONS (DEST)
R3 ACTUAL ̲SUBPROCESS (DEST)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0 SUBPROCESS ̲TYPE
R3 ACTUAL ̲SUBPROCESS.
4.2.7.1.7 I̲N̲I̲T̲ ̲S̲Y̲N̲C̲N̲A̲M̲E̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes the SYNC NAME ARRAY. For each entry up
to no. of processes, the array index is inserted in
the entry.
For the last two entries, the NICS ̲TARE process numbers
are inserted.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲SYNCNAMES ( )
( )
b INIT ̲SYNCNAMES (R1, 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̲
R1 Not used but destroyed
R2 Not used but destroyed
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE.
4.2.7.1.8 I̲N̲I̲T̲ ̲C̲A̲P̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes the subprocess capability array pointers
to capability list.
In̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲CAPS ( )
( )
b) INIT ̲CAPS (R6);
R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲
C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.9 I̲N̲I̲T̲ ̲Q̲G̲R̲O̲U̲P̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes queue group descriptor array with pointers
to corresponding queue lists.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲QGROUPS ( )
( )
b) INIT ̲QGROUPS (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 (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.10 I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲Q̲U̲E̲U̲E̲ ̲S̲E̲G̲M̲E̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
All the necessary queue segments are created, mapped
in and initialized.
The segments are initialized after the following principle
(in priority order):
1. Templates are placed in increasing order in the
MAINQ template array with regard to the field:
TEMPLATE.FIRST ̲INC ̲INDEX
(This value corresponds with the absolute main
queue number (refer to the prefix CPS ̲PREFIX.D*SSC
̲
QUEUE ̲INDEX)).
2. A segment must only contain queues of the same
type (refer to the definition of Q ̲MAIN ̲TYPES)
3. Queues with the same OWNER ̲PROCESS ̲ID will be placed
in the same segment if possible.
4. Queues with the same OWNER ̲PROCESS ̲TYPE will be
placed in the same segment if possible.
Figure 4.2.7.1.10-1
QUEUE SEGMENT INITIALIZATION
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INITIALIZE ̲QUEUE ̲SEGMENTS (SEGMENT ̲DESCR:
SEGM ̲DESCR)
( )
b) INITIALIZE ̲QUEUE ̲SEGMENTS (R5, R6)
R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲
C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R5 Pointer to SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.11 U̲P̲D̲A̲T̲E̲ ̲Q̲ ̲A̲R̲R̲A̲Y̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The main queue array and subqueue array of current
segment are initialized. MAINQ ̲ACB and SUBQ ̲ACB must
be initialized before call of this procedure. MAINQ
̲ACB and SUBQ ̲ACB are destroyed.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) UPDATE ̲Q ̲ARRAYS (SEGMENT ̲DESCR: SEGM ̲DESCR)
( )
b) UPDATE ̲Q ̲ARRAYS (R5, R6);
R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲
C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R5 Pointer to SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
4.2.7.1.12 I̲N̲I̲T̲ ̲S̲U̲B̲Q̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes the subqueues belonging to a main queue.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲SUBQ (COUNT: SUBCOUNT,
MAIN ̲QUEUE ̲INDEX: INTERGER,
SUBQ ̲INDEX: INTEGER
SEGMENT ̲DESCR: SEGM ̲DESCR)
(SUBQ ̲INDEX ̲ INTEGER)
b) INIT ̲SUBQ (R1, R2, R3, 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 SUBCOUNT (DEST)
R2 MAIN QUEUE INDEX (KEPT)
R3 SUBQ ̲INDEX for next
free SUBQUEUE (DEST)
R5 Pointer to SEGM ̲DESCR (DEST)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R3 SUBQ ̲INDEX for next free SUBQ
4.2.7.1.13 G̲E̲T̲ ̲P̲R̲O̲C̲E̲S̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Calculates the process number based upon subprocess
number and process type.
Error return if process not allowed or if subprocess
number is out of range.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) GET ̲PROCESS (PROCESS: PROCESS ̲TYPE,
SUBPROCESS: SUBPROCESS
̲NO)
(PROCESS: PROCESS ̲NO)
b) GET ̲PROCESS (R1, R2, R3, R6) : ERROR
̲OK
R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲
C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R1 PROCESS ̲TYPE (KEPT)
R2 SUBPROCESS ̲NO (DEST)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R3 PROCESS ̲NO
4.2.7.1.14 M̲O̲V̲E̲ ̲M̲A̲I̲N̲Q̲ ̲T̲E̲M̲P̲L̲A̲T̲E̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The current array of main queues is updated according
to specified template.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) MOVE ̲MAINQ ̲TEMPLATE (TEMPLATE: TEMPL
SEGMENT ̲DESCR: SEGM ̲DESCR)
( )
b) MOVE ̲MAINQ ̲TEMPLATE (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 TEMPLATE (KEPT)
R5 Pointer to SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.15 C̲H̲E̲C̲K̲ ̲S̲I̲Z̲E̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The procedure checks if current segment has enough
space for the queues corresponding to specified template
or not.
If not, current segment is released and the next segment
is made available. The subqueue array control block
is update accordingly.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) CHECK ̲SIZE (TEMPLATE: TEMPL,
SEGMENT ̲DESCR: SEGM ̲DESCR)
( )
b) CHECK ̲SIZE (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 TEMPLATE (KEPT)
R5 Pointer to SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.16 N̲E̲X̲T̲ ̲Q̲ ̲S̲E̲G̲M̲E̲N̲T̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Current queue segment are completed and mapped out.
If NEW ̲SEGMENT is equal to true a new segment is initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) NEXT ̲Q ̲SEGMENT (NEW ̲SEGMENT ̲ BOOLEAN;
SEGMENT ̲DESCR : SEGM ̲DESCR
( )
b) NEXT ̲Q ̲SEGMENT (R2, 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̲
R2 NEW ̲SEGMENT (DEST)
R5 Pointer to SEGM-DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲
NONE
4.2.7.1.17 M̲A̲K̲E̲ ̲Q̲U̲E̲U̲E̲ ̲S̲E̲G̲M̲E̲N̲T̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
A queue segment is created and mapped in.
The associated segment control blocks are updated and
the array control blocks of the segment are initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) MAKE ̲QUEUE ̲SEGMENT (SEGMENT ̲DESCR: SEGM ̲DESCR)
( )
b) MAKE ̲QUEUE ̲SEGMENT (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 SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.18 N̲E̲X̲T̲ ̲T̲E̲M̲P̲L̲A̲T̲E̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Using TEMPL ̲NO the procedure scans the array of main
queue templates and the next template with specified
Q ̲TYPE is returned.
If no template with specified Q ̲TYPE is found, a nil
pointer is returned.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) NEXT ̲TEMPLATE (QUEUE TYPE: Q ̲TYPE,
TEMPLATE ̲NO: TEMPL ̲NO)
(TEMPLATE ̲NO: TEMPL ̲NO)
b) NEXT ̲TEMPLATE (R1, R3, R4, R6);
R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲n̲v̲e̲n̲t̲i̲o̲n̲
C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R1 Q ̲TYPE (DEST)
R3 TEMPL ̲NO (DEST)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R3 TEMPL ̲NO
R4 Pointer to TEMPLATE
4.2.7.1.19 I̲N̲I̲T̲ ̲S̲E̲G̲M̲E̲N̲T̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
A segment is created and mapped in according to specified
descriptor.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲SEGMENT (SEGMENT ̲DESCR: SEGM ̲DESCR)
( )
b) INIT ̲SEGMENT (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 SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.20 I̲N̲I̲T̲ ̲S̲W̲O̲P̲ ̲P̲A̲G̲E̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The swop pages associated with current segment are
updated.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INIT ̲SWOP ̲PAGES (SEGMENT ̲DESCR : SEGM
̲DESCR)
( )
b) INIT ̲SWOP ̲PAGES (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 SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.21 Z̲E̲R̲O̲ ̲M̲E̲M̲O̲R̲Y̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes the number of pages with a zero.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) ZERO ̲MEMORY (NO ̲OF ̲PAGES : INTEGER,
START ADDRESS : POINTER)
b) ZERO ̲MEMORY (R1, 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̲
R1 NUMBER OF PAGES (DEST)
R4 STARTADDRESS (DEST)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.22 I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲Q̲E̲L̲ ̲S̲E̲G̲M̲E̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
All the necessary QEL SEGMENTS are created, mapped
in and initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INITIALIZE ̲QEL ̲SEGMENTS (SEGMENT ̲DESCR: SEGM ̲DESCR)
( )
b) INITIALIZE ̲QEL ̲SEGMENTS (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 SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE.
4.2.7.1.23 M̲A̲K̲E̲ ̲Q̲E̲L̲ ̲S̲E̲G̲M̲E̲N̲T̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
A QEL SEGMENT is created, mapped in and initialized.
The corresponding data structures are updated and the
segment is chained to the QEL Resource Pool.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) MAKE ̲QEL ̲SEGMENT (SEGMENT ̲DESCR : SEGM
̲DESCR)
( )
b) MAKE ̲QEL ̲SEGMENT (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 SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.24 I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲C̲I̲F̲ ̲S̲E̲G̲M̲E̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
All the necessary CIF Segments are created, mapped
in and initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INITIALIZE ̲CIF ̲SEGMENTS (SEGMENT ̲DESCR:
SEGM ̲DESCR)
( )
b) INITIALIZE ̲CIF ̲SEGMENTS (R5, R6);
R̲e̲g̲i̲s̲t̲e̲r̲ ̲C̲o̲v̲e̲n̲t̲i̲o̲n̲s̲
C̲a̲l̲l̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R5 POINTER TO SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.25 M̲A̲K̲E̲ ̲C̲I̲F̲ ̲S̲E̲G̲M̲E̲N̲T̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
A CIF Segment is created, mapped in and initialized.
The corresponding data structures are updated nd the
segment is chained to the CIF Resource Pool.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
a) MAKE ̲CIF ̲SEGMENT (SEGMENT ̲DESCR :
SEGM ̲DESCR)
( )
b) MAKE ̲CIF ̲SEGMENT (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 PONTER TO SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
Return Register
NONE.
4.2.7.1.26 I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲B̲U̲F̲F̲E̲R̲ ̲S̲E̲G̲M̲E̲N̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
All the necessary BUFFER SEGMENTS are created, mapped
in and initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) INITIALIZE ̲BUFFER ̲SEGMENTS (SEGMENT ̲DESCR
:
SEGM ̲DESCR)
( )
b) INITIALIZE ̲BUFFER ̲SEGMENTS (R6, 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 EGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲
NONE
4.2.7.1.27 M̲A̲K̲E̲ ̲B̲U̲F̲F̲E̲R̲ ̲S̲E̲G̲M̲E̲N̲T̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
A BUFFER SEGMENT is created, mapped in and initialized.
The corresponding data structures are updated and the
segment is chained to the Buffer Resource Pool.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
a) MAKE ̲BUFFER ̲SEGMENT (SEGMENT ̲DESCR :
SEGM ̲DESCR)
( )
b) MAKE ̲BUFFER ̲SEGMENT (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 SEGM ̲DESCR (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.28 C̲H̲A̲I̲N̲ ̲R̲E̲S̲O̲U̲R̲C̲E̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes and RESOURCE ARRAY by chaining the elements
into a Free List.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
a) CHAIN ̲RESOURCE (NO ̲OF ̲ELEMENTS : INTEGER,
SIZE : SIZE ̲OF ̲ELEMENT,
ELEMENT : POINTER)
( )
b) CHAIN ̲RESOURCE (R1, R2, R3, 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̲
R1 NO ̲OF ̲ELEMENTS (DEST)
R2 SIZE OF ELEMENT (KEPT)
R4 POINTER TO FIRST ELEMENT (DEST)
R6 LINK
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲
NONE
4.2.7.1.29 C̲O̲N̲N̲ ̲R̲E̲S̲O̲U̲R̲C̲E̲ ̲P̲O̲O̲L̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The CURRENT SEGMENT is chained to Resource Pool corresponding
to SEGM.S ̲TYPE. The Resource Pool is updated accordingly.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
a) CONN ̲RESOURCE ̲POOL (NO ̲OF ̲ELEMENTS : INTEGER
SEGMENT ̲DESCR : SEGM ̲DESCR)
( )
b) CONN ̲RESOURCE ̲POOL (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̲
R1 NO ̲OF ̲ELEMENTS (DEST)
R5 POINTER TO SEGM ̲DESCR (KEPT)
R6 LINK
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.2.7.1.30 I̲N̲I̲T̲ ̲R̲E̲S̲O̲U̲R̲C̲E̲ ̲P̲O̲O̲L̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The specified Resource Pool is initialized.
I̲n̲t̲e̲r̲f̲a̲c̲e̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
a) INIT ̲RESOURCE ̲POOL (NO ̲OF ̲ELEMENTS : INTEGER,
FIRST ̲ELEMENT : POINTER,
RESOURCE ̲POOL : POINTER)
( )
b) INIT ̲RESOURCE ̲POOL (R1, R3, 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̲
R1 NO ̲OF ̲ELEMENTS IN POOL (KEPT)
R3 POINTER TO FIRST ELEMENT (KEPT)
R4 POINTER TO RESOURCE POOL (KEPT)
R6 LINK (DEST)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
NONE
4.3 M̲e̲m̲o̲r̲y̲ ̲L̲a̲y̲o̲u̲t̲
Refer fig. 4.3-1
4.3.1 C̲S̲F̲ ̲S̲h̲a̲r̲e̲d̲ ̲d̲a̲t̲a̲
The data located in the shared protected CSF segment
are the following:
QEL array cf. 4.1.4.1.1
Subprocess array cf. 4.1.4.1.2
Shared buffer array cf. 4.2.1.4.1.4.c1
Main Queue array cf. 4.2.2.5.2
Sub queue array cf. 4.2.2.5.3
Queue Group descriptor cf. 4.2.2.5.4
Queue List array cf. 4.2.2.5.5
Subprocess capability array cf. 4.2.2.5.6
Capability array cf. 4.2.2.5.6
Synchronization element cf. (d)
name array cf. 4.2.2.5.7
HCB array cf. 4.2.4.5.2.1
4.3.2 C̲S̲F̲ ̲L̲o̲c̲a̲l̲ ̲P̲r̲o̲t̲e̲c̲t̲e̲d̲ ̲D̲a̲t̲a̲
These data are located in the local CSF segment for
each process
SOBC array cf. 4.2.6.5.2
Process record cf. 4.1.4.2.1
SSCB array cf. 4.2.6.5.1
Control translation table cf. 4.2.4.5.3
Info element cf. 4.2.4.5.3
Addressing at these data is done via a bound-registered
located in the Kernel Data. (ref. fig. 4.3.2-1).
FIGURE 4.3-1
LAYOUT OF PROTECTED AREA OF A PROCESS
FIGURE 4.3.2-1
ADDRESSING OF CSF, IOC AND TMP DATA IN PPS