GDSX Manual

Design and Development
Extended General Device Support (GDSX) Manual134303
2-7
Run-Time Environment
Run-Time Environment
GDSX is a nonprivileged, multithreaded, Guardian process that builds and manages
tasks within itself in a manner similar to the way an operating system handles tasks. A
GDSX task is an independent job entity running within GDSX to perform a specific
function. While only one task can actually be executing at any given time, the TSCODE
kernel coordinates the processing of multiple simultaneously active tasks, swapping
them in and out of the user data segment as necessary.
The TSCODE kernel provides the following functions:
Creating new tasks
Picking up all system messages and I/O requests from $RECEIVE
Dispatching (waking up and executing) the appropriate active task to process
messages and requests
Stopping tasks
Handling traps and errors
At any point in time, GDSX runs on behalf of a task unless:
The kernel is creating or stopping a task.
The kernel is preparing to dispatch a task.
The kernel is waiting for an internal resource or an I/O completion and no other
tasks are ready to dispatch.
A task is a running instance of either a TSCODE procedure or a USCODE procedure. A
TSCODE task is called a system task, and a USCODE task is called a user task. A task
has its own data stack, calls TSCODE procedures, and usually executes in a infinite
loop. Generally, a user task manages exactly one terminal, line, or process.
System Tasks
The TSCODE kernel includes the monitor and listener tasks, and the backup task if
GDSX is run as a process pair. Depending on the GDSX subsystem state, the kernel
may also include temporary system tasks. Following are descriptions of the different
types of system tasks.
Monitor Task
This task is created during GDSX process initialization and is always active thereafter.
There is only one monitor task per GDSX process, and it is always task number 1. This
task handles the SCF/SPI interface and message logging to the $0 collector. The
USER^ATTRIBUTES, USER^COMMANDS, and USER^REPLIES user exits, which
support user-customized EMS and SCF processing, are also handled by the monitor task.