top - download
⟦113011bbe⟧ Wang Wps File
Length: 43538 (0xaa12)
Types: Wang Wps File
Notes: CPS/SDS/024
Names: »1482A «
Derivation
└─⟦e8bc85b7f⟧ Bits:30005802 8" Wang WCS floppy, CR 0105A
└─ ⟦this⟧ »1482A «
WangText
…00……00……00……00……00…!…02……00……00…!
…08… …0c… …0e… …00…
…05… …07……1f……0a……1f……0f……1f……00……1f……05……1e……09……1e……0c……1e……0f……1e… …1e……05……1d……09……1d……0c……1d……0f……1d……01……1d…
…1c……08……1c……0b……1c……0d……1c……0e……1c……00……1c…
…1c……06……1b……0a……86…1 …02… …02… …02…
…02…CPS/SDS/024
…02…OKH/811201…02……02…
CAMPS SYSTEM FUNCTIONS
DETAILED DESIGN SPECIFICATION…02……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
Start
Procedure WAIT ̲SEM(SEMAPHORE:COROUTINE ̲SEMAPHORE):
OK
STORE ̲REGISTERS
TRACE (WAIT ̲SEM, SHORT)
DECREMENT SEMAPHORE.COUNT
SEMAPHORE.COUNT GO 0?
CHAIN ̲IN (COROUTINE, SEMAPHORE)
PAUSE
TRACE (EXIT, SHORT)
RESTORE ̲REGISTERS
RETURN (OK)
Stop
FIGURE 4.2.5.4.2.5-1
Start
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
Start
Procedure W̲A̲I̲T̲ ̲O̲P̲S̲E̲M̲(̲S̲E̲M̲A̲P̲H̲O̲R̲E̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲S̲E̲M̲A̲P̲H̲O̲R̲E̲)̲
(̲O̲P̲E̲R̲A̲T̲I̲O̲N̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲)̲:̲
̲O̲K̲
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
Start
Procedure S̲I̲G̲N̲A̲L̲ ̲O̲P̲S̲E̲M̲(̲S̲E̲M̲A̲P̲H̲O̲R̲E̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲S̲E̲M̲A̲P̲H̲O̲R̲E̲,̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲)̲:̲
̲O̲K̲
STORE ̲REGISTERS
TRACE (SIGNAL ̲OPSEM,LONG)
INTERN ̲SIGNAL(SEMAPHORE, OPERATION)
RESTORE ̲REGISTERS
RETURN (OK)
STOP
FIGURE 4.2.5.4.2.5-4
Start
Procedure A̲S̲S̲O̲C̲I̲A̲T̲E̲(̲S̲E̲M̲A̲P̲H̲O̲R̲E̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲S̲E̲M̲A̲P̲H̲O̲R̲E̲,̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲)̲:̲
̲O̲K̲
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
Start
Procedure I̲N̲T̲E̲R̲N̲ ̲S̲I̲G̲N̲A̲L̲(̲S̲E̲M̲A̲P̲H̲O̲R̲E̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲S̲E̲M̲A̲P̲H̲O̲R̲E̲,̲
O̲P̲E̲R̲A̲T̲I̲O̲N̲:̲C̲O̲R̲O̲U̲T̲I̲N̲E̲ ̲O̲P̲E̲R̲A̲T̲I̲O̲N̲)̲:̲
̲O̲K̲
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 then selected as running coroutine, it
will be resumed in this location after call of Pause.
If the list of ready coroutines is empty, the System
Call Monitor function Wait Next Operation is called,
as the process must now wait for the next external
event. The return parameter "user operation reference"
is a pointer to an operation (Coroutine Init System
Call), and the system call described by this operation
is now done.
The subsequent actions depend on the activation field
of the operation.
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) Other values
STATUS is changed to DONE
The Wait Next Operation and subsequent steps are repeated
until the ready list is not empty.
The first coroutine is chained out from ready list.
The Coroutine Monitor variable 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 enterred 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.
Start
Procedure P̲A̲U̲S̲E̲:̲O̲K̲
COROUTINE.SAVER7 = R5
Active Loop
READY ̲LIST NOT EMPTY? EXIT
Case WAIT ̲NEXT ̲OPERATION()(OPERATION:COROUTINE ̲OPERATION):
ERROR ̲OK
ERROR? - RETIRE(COMON ̲ERROR)
OK? - 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̲)̲
End case OPERATION.ACTION
OPERATION.STATUS = DONE
End case WAIT ̲NEXT ̲OPERATION
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
CHANGE ̲SUBPROCESS ̲ID (CURRENT ̲SUBPROCESS)
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
- INIT ̲COROUTINE
- INIT ̲SEMAPHORE
- INIT ̲OPERATION
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̲ ̲N̲a̲r̲r̲a̲t̲i̲v̲e̲
The Initialization Functions module consists of four
procedures.
a) INIT ̲COMON
b) INIT ̲COROUTINE
c) INIT ̲SEMAPHORE
d) INIT ̲OPERATION
F̲l̲o̲w̲g̲r̲a̲m̲s̲
a) INIT ̲COMON cf. figure 4.2.5.4.4.5-1
b) INIT ̲COROUTINE cf. figure 4.2.5.4.4.5-2
c) INIT ̲SEMAPHORE cf. figure 4.2.5.4.4.5-3
d) INIT ̲OPERATION cf. figure 4.2.5.4.4.5-4
Start
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
Start
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
Start
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
Start
Procedure INIT ̲OP (OPERATION: COROUTINE ̲OPERATION,
PRIOTIRY: 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)
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. This is the TRACE
procedure.
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. 4.1.6.5.3
- 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 b14
DATA: ARRAY (0..15) OF INTEGER
END
INIT TRACE ̲BUFFER.OFFSET = 0
TRACE ̲BUFFER.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̲
CSF ̲TRACE (cf. 4.1.7.2.1.12
N̲a̲r̲r̲a̲t̲i̲v̲e̲
Trace procedue 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
Start
Procedure T̲R̲A̲C̲E̲(̲N̲A̲M̲E̲:̲ ̲C̲O̲M̲O̲N̲ ̲N̲A̲M̲E̲,̲ ̲L̲E̲N̲G̲T̲H̲:̲ ̲(̲S̲H̲O̲R̲T̲,̲ ̲L̲O̲N̲G̲)̲)̲:̲
̲O̲K̲
TRACE ̲ENABLE EQ FALSE?
SAVE ̲REGISTERS
TRACE ̲NAME = NAME
COROUTINE ̲ID = COROUTINE.COROUTINE ̲ID
SUBPROCESS ̲ID = COROUTINE.SUBPROCESS ̲ID
MOVE (SAVER0 - SAVER7) TO TRACEBUFFER
LENGTH EQ SHORT? - COUNT = 16
MOVE R5 (5..12) TO LONG ̲TRACE ̲BUFFER (0..7)
COUNT = 32
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 assoiciated
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, lowest priority is first in the list.
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 (kept)
R5 pointer to OBJECT (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.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.1.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.1.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
Each of the lower level boxes is a procedure.
- 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̲
Is a Monitor Procedue SCM with 6 entries
- SCM Wait is the internal procedure Wait Event
- Process Communcation Facility and IOS Interface
each contains 4 internal procedures
- Common Procedures contain 2 internal procedures
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 procedre
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 Sytems 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 procedue
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
cf. (j) 4.2.1
IOC ̲INIT
IOC ̲COMPLETE
IOC ̲CANCEL
cf. (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
Start
MON Procedure SCM (INRO4:ARRAY(0..4)OF INTEGER,
SCM ̲CODE:SCM ̲CODE ̲TYPE,
FUNCTION: SCM ̲FUNCTION,
AP ̲REF: INTERGER,
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 (INRO4, FUNCTION, AP ̲REF)
(OUTRO4, EXIT ̲NO, SOCB, CC):ERROR
̲OK
MON ̲RETURN (OUTRO4, SOCB.SOCB ̲ID, CC, EXIT
̲NO,)
Stop
E̲ ̲S̲Y̲S̲C̲A̲L̲L̲
Start
Case INIT ̲SYSCALL (INRO4, FUNCTION, AP ̲REF)
(OUTRO4, SOCB, EXIT ̲NO, CC)
OK? - WAIT (SOCB)
(OUTRO4, EXIT ̲NO, CC)
ERROR? -
End case INIT ̲SYSCALL
MON ̲RETURN(OUTRO4, 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)(OUTRO4, EXIT ̲NO, CC)
MON ̲RETURN (OUTRO4, 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 ̲OUT (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 (SOCB.SS ̲ID)
SSCB.DISABLE EQ TRUE ?- DISABLE ̲INTERRUPT
SSCB.LOCK EQ TRUE ?- LOCK(SSCB.LOCK ̲SEM)
Case SSCB.KIND
- QMON ? - CANCEL ̲RECEIVE (SOCB)
- MMON ? - MMON ̲CANCEL (SOCB)
- TMP ? - TMP ̲CANCEL (SOCB)
- IOC ? - IOC ̲CANCEL (SOCB)
- PCF ? - PCF ̲CANCEL (SOCB)
- IOX ? - IOS ̲CANCEL (SOCB)
End case SSCB.KIND
SSCB.LOCK EQ TRUE? - UNLOCK (SSCB.LOCK ̲SEM)
SOCB.STATUS NE DONE
CHAIN ̲OUT (SOCB)
CHAIN ̲IN (SOCB, READY ̲LIST)
MON ̲RETURN (0,OK)
Stop
FIGUR 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)
SSCB.KIND = SS ̲KIND
SSCB.COMMUNCATION = COMMUNICATION ̲KIND
COMMUNICATION ̲KIND NE BY ̲SYNCEL?
SSCB.PCF ̲PARAM.SYNCEL = SYNCEL ̲ID
SSCB.PCF ̲PARAM.SIZE = SYNCEL ̲INFO ̲SIZE
SSCB.PCF ̲PARAM.INFO = SCM ̲INFO
SS ̲KIND NE (QMON OR MMON)?
SSCB.DISABLE = TRUE
SSCB.LOCK = TRUE
SSCB.LOCK ̲SEM = CSF ̲LOCK ̲SEM
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 INTI ̲SYSTEM ̲CALL
procedue 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 apropriate
Service System is then entered in its INIT FUNCTION
entry point. This is done by calling the INTI procedue
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 (INRO4:ARRAY(0..4)OF
INTEGER,
FUNCTION: SCM ̲FUNCTION,
AP ̲REF: POINTER)
(OUTRO4: ARRAY (0..4)OF INTEGER,
EXIT ̲NO: ERROR ̲OK,
SOCB: POINTER,
CC:COMPLETION ̲CODE):ERROR ̲OK
FREE ̲SOCB ̲LIST EMPTY? - RETIRE (SCM ̲ERROR, NO ̲FREE ̲SOCB)
CHAIN ̲OUT (FREE ̲SOCB ̲LIST.NEXT)
SOCB.FUNCTION = FUNCTION
SOCB.AP ̲REF = AP ̲REF
SOCB.STATUS = PENDING
SSCB =SSCB ̲ARRAY (FUNCTION.SS ̲ID
SSCB.DISABLE = TRUE? - LOCK (SSCB.LOCK ̲SEM)
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̲
SSCB.LOCK = TRUE? - UNLOCK (SSCB.LOCK ̲SEM)
Case SOCB.STATUS:
- DONE ? - CHAIN ̲IN (SOCB, READY ̲LIST)
- PENDING ? - CHAIN ̲IN(SOCB, SSCB. SOCB ̲LIT) -
RETURN (OK)
- SC ̲ERROR ? - SOCB.STATUS = FREE
CHAIN ̲IN (SOCB, FREE ̲SOCB ̲LIST)
RETURN(ERROR)
End case SOCB.STATUS
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
INRO4)(OUTRO4,EXIT ̲NO, CC):OK
MMON ?- MMON ̲INIT(SS ̲CODE, SOCB
INRO4)(OUTRO4,EXIT ̲NO, CC):OK
TMP ?- TMP ̲INIT(SS ̲CODE, SOCB
INRO4)(OUTRO4,EXIT ̲NO, CC):OK
IOC ?- IOC ̲INIT(SS ̲CODE, SOCB
INRO4)(OUTRO4,EXIT ̲NO, CC):OK
PCF ?- PCF ̲INIT(SS ̲CODE, SOCB
INRO4)(OUTRO4,EXIT ̲NO, CC):OK
IOS ?- PCF ̲INIT(SS ̲CODE, SOCB
INRO4)(OUTRO4,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.
F̲l̲o̲w̲g̲r̲a̲m̲
Cf. figure 4.2.6.4.1.5-8 to -9.
Start
Procedure WAIT (SOCB:POINTER)
(OUTRO4: ARRAY(0..4) OF INTEGER,
EXIT ̲NO: ERROR ̲OK,
CC: COMPLETION ̲CODE):ERROR ̲OK
Wait loop
SOCB.STATUS NE PENDING? EXIT
WAIT ̲EVENT
End WAIT Loop
SSCB EQ SSCB ̲ARRAY (SOCB.SS ̲ID)
SSCB.DISABLE EQ TRUE ? - DISABLE ̲INTERRUPT
SSCB.LOCK EQ TRUE? - LOCK(SSCB.LOCK ̲SEM)
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̲
CHAIN ̲OUT (SOCB)
SOCB.STATUS = FREE
CHAIN ̲IN (SOCB, FREE ̲SOCB ̲LIST)
SSCB.LOCK = TRUE? - UNLOCK(SSCB.LOCK ̲SEM)
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)
(OUTRO4,EXIT ̲NO, CC): OK
- MMON ?- MMON ̲COMPLETE(SOCB)
(OUTRO4,EXIT ̲NO, CC): OK
- TMP ?- TMP ̲COMPLETE(SOCB)
(OUTRO4,EXIT ̲NO, CC): OK
- IOC ?- IOC ̲COMPLETE(SOCB)
(OUTRO4,EXIT ̲NO, CC): OK
- PCF ?- PCF ̲COMPLETE(SOCB)
(OUTRO4,EXIT ̲NO, CC): OK
- IOS ?- IOS ̲COMPLETE(SOCB)
(OUTRO4,EXIT ̲NO, CC): OK
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.
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̲
R6 LINK (destr)
R̲e̲t̲u̲r̲n̲ ̲R̲e̲g̲i̲s̲t̲e̲r̲s̲
R0-R5,R7 (kept)
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̲
c1)
P̲C̲F̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲
The parameter to the call of PCF procedure General
Await.
VAR PCF ̲PARAM:
RECORD
MIN ̲SEND ̲COUNT,
MAX ̲SEND ̲COUNT: INTEGER,
PARAMLIST: POINTER,
List of PCF ̲SINGLE ̲PARAMS in SSCB,
refer 4.2.6.5.1
SCM ̲INFO: ARRAY 1..PCF ̲SIZE) OF INTEGER
Received Info from Sync.Elements.
END
INIT PCF ̲PARAM.MIN ̲SEND ̲COUNT=1,
PCF ̲PARAM.MAN ̲SEND ̲COUNT=1,
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
TMP ̲ANSWER ̲RECEIVED
c.f. (j) 4.2.1
FH ̲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 is included
in the General Await parameter.
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)
Start
Procedure WAIT ̲EVENT:OK
Initialize PCF ̲PARAM ̲LIST
For all SSCBs in SSCB ̲ARRAY Loop
SSCB.PCF ̲PARAM.RESULT=NO ̲INFO
SSCB.COMMUNICATION NE BY ̲SYNCEL
OR SSCB.SOCB ̲LIST EMPTY?
Chain SSCB.PCF ̲PARAM to PCF ̲PARAM ̲LIST
Last SSCB in SSCB ̲ARRAY? EXIT
End SSCB Loop
Case GENERAL AWAIT (1, 1, PCF ̲PARAM ̲LIST,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,SSCB.SOCB ̲LIST)
(COUNT,DONE
̲SOCB)
IOC?-IOC ̲ANSWER ̲RECEIVED(SOCB,SSCB.SOCB ̲LIST)
(COUNT,DONE
̲SOCB)
End case SSCB ̲KIND
RETIRE(SCM ̲ERROR,IMPOSSIBLE)
TEST ̲DONE ̲SOCBS(COUNT,DONE ̲SOCB)
Stop
FIGURE 4.2.6.4.2.5-2
N̲O̲ ̲I̲O̲ ̲A̲N̲S̲W̲E̲R̲ ̲R̲E̲D̲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 ?-PCF ̲ANSWER ̲RECIEVED(INFO,SSCB.SOCB ̲LIST)
(COUNT,DONE ̲SOCB)
End case SSCB.KIND
RETIRE(SCM ̲ERROR,IMPOSSIBLE)
TEST ̲DONE ̲SOCBS(COUNT,DONE ̲SOCB)
Stop
FIGURE 4.2.6.4.2.5-3…86…1 …02… …02… …02… …02… …02… …02… …02…
Start
Procedure TEST ̲DONE ̲SOCBS(COUNT:INTEGER, SOCB:POINTER):OK
READY ̲SOCB Loop
COUNT LE 0 ? EXIT
SOCB.STATUS NE DONE?
CHAIN ̲OUT (SOCB)
CHAIN ̲IN (SOCB,READY ̲LIST)
DECREMENT COUNT
SOCB= SOCB.HEAD.NEXT
End READY ̲SOCB Loop
Stop
FIGURE 4.2.6.4.2.5
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
Start
Procedure PCF ̲INIT (FUNCTION:SCM ̲FUNCTION,
INFO: POINTER,
SOCB: POINTER),
(EXIT ̲NO: ERROR ̲OK,
CC:COMPLETION ̲CODE):OK
CHECK ADDRESS (INFO) (CC)
CC NE OK? - RETIRE (SCM ̲ERROR, CC)
FUNCTION NE AWAIT ̲SYNCEL? - RETIRE(SCM ̲ERROR, ILLEGAL ̲PCF ̲FUNCTION)
SOCB.PCF ̲DATA.INFO = INFO
CC = OK
EXIT ̲NO = OK
RETURN (OK)
Stop
FIGURE 4.2.6.4.3.5-1
Start
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
INFO = DONE ̲SOCB.PCF ̲DATA.INFO
SIZE = RECEIVED ̲INFO.XFER
Move SIZE words from RECEIVED ̲INFO.DATA to INFO (0..SIZE)
DONE ̲SOCB.PCF ̲DATA.SIZE = SIZE
DONE ̲COUNT = 1
RETURN (OK)
Stop
FIGURE 4.2.6.4.3.5-2
Start
Procedrue PCF ̲COMPLETE (SOCB:POINTER)
(COUNT, INFO, EXIT ̲NO, CC):
OK
INFO:ARRAY (1..COUNT) OF INTEGER,
EXIT ̲NO: ERROR ̲OK,
CC: COMPLETION ̲CODE): OK
COUNT = SOCB.PCF ̲DATA.SIZE
INFO = SOCB. PCF ̲DATA.INFO
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
Start
Procedure IOS ̲INIT (FUNCTION: SS ̲FUNCTION,
SOCB:POINTER,
INRO4: ARRAY(0..4)OF INTEGER)
(CC: COMPLETION ̲CODE):OK
Case GENERAL (FUNCTION IOR INITERFLAG, SOCB, INRO4)
(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
Start
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)
(OUTRO4: 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.6.6.
COMMUNICATION:"COM" SS ̲COMMUNICATION; 4.1.6.6.7.
LOCK:"L" BOOLEAN;
"Defines, if hardware
semaphore shall be
locked.
DISSAABLE:"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
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 ref.
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 ref.
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.3 M̲e̲m̲o̲r̲y̲ ̲L̲a̲y̲o̲u̲t̲
See section 2.3.5.
FIGURE 4.1.4-1