Transient Programs
Transient programs are loaded immediately below the resident
procedures. Each program must be self contained, Ie.
It
must contain
space for
its
own data and
ItS
own stack.
It
must be position
Independent or must be ioaded by a specially
written linking loader.
A transient program
is
executed from BASIC by using the EXEC
command
or
from Odos by activating
It
as a
Job.
The transient program area may be used for storing data only but this
data
will
still
be treated by
Odos
as a
lob
and therefore must not be
activated.
SuperBASIC Area
This area contains
all
loaded SuperBASIC programs and related data.
ThiS
area expands and contracts using up the free space as required.
Free Space
Free space
is
used by the
Odos
file subsystem
to
create M,crodrlve
Slave
Blocks,
i.e.
copies of Microdrlve blocks which can be held
,n
RAM.
System Heap
This
is
used by the system to store data channel definitions
etc.
and
also provides working storage for the
1/0
subsystem.
Transient
programs
may allocate working space for themselves on the heap via Odos
system calls.
System Tables
I System Variables
This area
is
directly above the screen memory. The System
Tables
and
supervisor stack are resident above the system variables.
•
•
•
System calls are processed by Odos
in
supervisor mode. When
in
supervisor mode system calls
Odos
will not allow any other job
to
take over the processm System calls processed
in
thiS
way are said
to
be atomic,
i.e.
the system call will process
to
completion before
relinquishing the processor. Some system calls are only partially atomic,
i.e.
once they
have completed their primary function they
will
relinqUish the processor
if
necessary.
Unless specifically requested
all
the I/O system calls are partially atomic.
The standard mechanism for making a system call
IS
by making a trap to one of the
Odos
system vectors
With
appropriate parameters
in
the processor registers. The action
taken by
Odos
following a system call
is
dependent on the particular call and the overall
state of the system
at
the time the call was made.
Odos
supports a multitasking environment and therefore a file can be accessed by more
input/output
than one process
at
2.
time. The
Odos
filing sub-system can handle files which have
been opened as exclusive files or as shared
files.
A shared file can not be written
to.
OL
devices are processed by the serial
110
sub-system. The filing sub-system and the
serial
I/O
sub-system together make up the redirectable
110
system.
As
its
name suggests
any data output via
thiS
system can be redirected to any other device also supported
by the redirectable
1/0
system.
The device names required by Odos are the same as
ttie device names required by
SuperBASIC and are discussed
In
the concept section
devices.
The
collection of standard
devices supplied with the
OL
can be expanded.
The standard devices included
in
the system are discussed
in
this guide
in
the section devices
devices. Further devices may be
added
to the system, given a name
(e.g.
SER1,
NET)
and then accessed
In
the same way as any other
OL
device.
Jobs
will
be allowed a share of the CPU
In
hne
with their priority and competition with
multitasking
other jobs in the system. Jobs running under the control of
Odos
can be
In
one of three
states:
active:
suspended:
Inactive:
Capable of running and sharing system resources. A job
In
thiS
state may
not be running continuously but
will
obtain a share of the CPU
in
line
with
its
priority.
The job
IS
capable of running but
is
waiting for another job or 1/0 A job
may be suspended indefinitely or for a specific period of time.
The job
is
incapable of running,
its
priority
is
0 and
so
it
can never obtain
a share of the CPU.
41