tcl.phantom

Introductory/SQL, Releases: AP

Description of phantom (background) processes.

Description

background process which runs without a terminal.

Pick has a phantom process scheduler which is itself a background process.

The scheduler process sleeps until a running job completes or until a new job enters the queue.

Phantom jobs are spawned using the 'z' verb from TCL. (See the 'z' command).

A phantom job runs if there is an available phantom port. If there is no phantom port available, the phantom job is enqueued until one becomes available.

When a phantom job completes, it wakes the scheduler and logs itself off. The process is now available for other phantom tasks.

When a phantom job is executed, four things happen:

1 A pcb frame is fetched from overflow for the phantom job.
2 An item is written to the 'dm,jobs,' file which indicates that the request is waiting in the queue.
3 The item-id of the jobs file item is attached to the end of the queue.
4 The scheduler process is awakened if it is asleep.

When the scheduler wakes up, it checks the queue and reads the item from the jobs file that corresponds to the next item-id in the queue.

If a port is available, the scheduler does three things:

1 The scheduler updates the status of the item in the jobs file to 'running'.
2 It then adds an item to the jobs file using the 'port.number' as the item-id.
3 Finally, the phantom job is logged on to the port.

When a phantom process has finished, the status in the jobs file is updated to 'logged off'. Next, the phantom is awakened and workspace is returned to overflow.

When the scheduler releases a phantom job back to overflow, the item whose 'port.number' is the item-id of the job, is deleted from the jobs file.

The Spooler is a phantom job in AP.

See the 'end' command for terminating phantom jobs.

The 'p' option in the 'users' file terminates phantom processes when a gfe is encountered, rather than just going to sleep. See 'users'.

To increase the number of phantom pibs on a Unix-based implementation of AP, edit the 'pick0' file and decrease the value of 'npibs' by the same number as that added to the value of 'nphts'. For example, if 'npibs' is 10 and 'nphts' is 12, change 'npibs' to 8 and 'nphts' to 14 to add 2 more phantoms.

See Also

Command Name Type Description
port.number Definition The port number associated with the process.
tcl.z Verb: Access Invokes phantom process.
phantom.process.scheduler Definition Description of scheduler.
phantom.ports Definition Overview of phantom ports.
tcl.phantom-status Verb: Access Displays all phantom lines.
tcl.logon Verb: Access Initiates process on specified port.
tcl.jobs.status Subroutine Determines status of phantom jobs.
tcl.tcl Verb: Access Executes a TCL command on another port.
background.process Definition See 'phantom'.
tcl.start.ss Verb: Access Starts Spooler and Scheduler.
tcl.end Verb: Access Ends process.
tcl.list-jobs Verb: Access Displays information about phantom processes.
filename.jobs Definition Contains information on phantom jobs.
filename.users Definition Description of the 'users' file.
tcl.startsched Verb: Access Starts the phantom scheduler.
tcl.stopsched Verb: Access Deactivates the phantom scheduler.
tcl.phantom-status Verb: Access Displays all phantom lines.
ue.0010 User Exit Creates a phantom process
tcl.phantom-reset Verb: Access Resets selected phantom lines back to 'available'.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.