GDSX (Extended General Device Support) Manual

Design and Development
Extended General Device Support (GDSX) Manual529931-001
2-8
System Tasks
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.
Listener Task
This task is created during GDSX process initialization and is always active thereafter.
There is only one listener task per GDSX process, and it is always task number 2.
The kernel forwards all system messages (except BREAK and 3270 status) received
by GDSX to the listener task. The listener task executes an endless loop that
processes or routes system messages such as:
The Listener also acts as an agent for the kernel. When TSCODE receives a request
by means of $RECEIVE, it may be the case that resources required to process the
message (for example, pool space) are not currently available. In such cases, the
request is passed to the Listener, which acquires the missing resources before
forwarding the request to the appropriate task.
The listener task maintains a count of currently active system tasks (including Monitor,
Listener, and Backup if GDSX is running as a process pair). Upon receipt of a system
message that requires a system task to handle it, if five system tasks are active, the
Listener waits until one of the five tasks terminates before initiating the new task.
$RECEIVE is blocked while the Listener is waiting for an available task.
ABEND
CLOSE
CONTROL
CPU DOWN
CPU RELOAD/UP
DEVICEINFO
NET MONITOR
OPEN
STOP