Skip to content

How to Establish Ghost Tasks

A ghost task is a background task that operates without a terminal or keyboard. You can start a ghost task from a user task, but a ghost task cannot interact with a terminal. For more information on ghost tasks, please refer to the Thoroughbred Basic Developer Guide and to the description of the *GPSD Utility in the Thoroughbred Basic Utilities Manual.

Thoroughbred Basic can support up to 62 ghost tasks. Depending on system resources the actual number that can run at any one time may be smaller. To run ghost tasks, Thoroughbred Basic requires a shared memory segment, which was created during installation, and an appropriate number of semaphores. Each ghost task requires one semaphore ID.

To make sure you have enough semaphores, check the values specified for the following tunable parameters against their minimum recommended values:

SEMMAP (entries in semaphore map):62
SEMMNI (semaphore identifiers):62
SEMMNS (semaphores in system):186

An IPL file can specify up to 62 ghost tasks that will be available to Thoroughbred Basic. Use one of the following methods to modify an IPL file:

  • Edit a Thoroughbred Basic IPL file with vi or some other text editor. You can use this method to create and customize IPL files for each user. For more information on IPL files, please refer to the information on the IPLINPUT File in the Thoroughbred Basic Customization and Tuning Guide – System Files.
  • Use the procedures and information in this section. The install utility can update the default IPLINPUT file.

You can use the information in the following sections to specify that ghost tasks are available to Thoroughbred Basic:

If you plan to specify that ghost tasks will become available to Thoroughbred Basic, you can use the information in the sections titled How to Make Ghost Tasks Available and How to Leave the Install Utility to place ghost task specifications in the IPLINPUT file.

From the operating system prompt in your Thoroughbred Basic home directory type

./install

and press the Enter key. The install utility will display the Installation and Updating Procedures Menu:

Thoroughbred BASIC Installation and Updating Procedures
1) Install New System
2) Install/Update User Logins
3) Install/Update BASIC Directories
4) Install/Update BASIC Printers
5) Install/Update BASIC Terminals
6) Install/Update BASIC Ghost Tasks
Enter Selection (1 - 6) or <CR> to end:

You must enter a valid value in the following field:

Enter Selection (1 - 6) or <CR> to end:

To make ghost tasks available to Thoroughbred Basic, type 6 and press the Enter key. The install utility will display the following message:

Will BASIC use Ghost Tasks? (y/n):

N means that Thoroughbred Basic will not use ghost tasks. The install utility will return you to the Installation and Updating Procedures screen.

Y means that Thoroughbred Basic will use ghost tasks. The install utility will display the following message:

Ghost BASIC should be owned by user other than ‘root’
Enter the login name to own basic:

The root directory contains files and directories that are vital to operating system performance. If root owns the Thoroughbred Basic ghost task facilities, then all Thoroughbred Basic users will have root permissions, which could cause problems like data corruption.

To avoid this problem, you can specify a login name that will own the Thoroughbred Basic ghost task facilities. Type a valid login name and press the Enter key. The install utility will display the Install/Update BASIC Ghost Tasks screen:

Currently Defined Ghost Tasks
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

To make ghost tasks available to Thoroughbred Basic, type a and press the Enter key. The following message will be displayed:

Enter number of ghosts to add or <CR> to end:

You can specify the number of ghost tasks that will be available to Thoroughbred Basic. Valid values are 1 through 62. Type a valid value and press the Enter key.

The install utility will generate a DEV statement for each ghost task you specified and put the DEV statements in the IPLINPUT file. For more information on the IPLINPUT file and the DEV statement, please refer to the Thoroughbred Basic Customization and Tuning Guide – System Files.

Then, the install utility will redisplay the Install/Update BASIC Directories screen, which will contain the current list of ghost tasks available to Thoroughbred Basic. For example, if you specified 62 ghost tasks, the install utility will display the following screen:

Currently Defined Ghost Tasks
G0 G1 G2 G3 G4 G5 G6 G7 G8 G9 GA GB GC GD GE GF GG GH GI GJ
GK GL GM GN GO GP GQ GR GS GT GU GV GW GX GY GZ Ga Gb Gc Gd Ge Gf Gg Gh Gi Gj
Gk Gl Gm Gn Go Gp Gq Gr Gs Gt Gu Gv Gw Gx Gy Gz
Add or Delete? Enter a, d or <CR> to end:

Thoroughbred Basic ghost task names range from G0 through G9, GA through GZ, and Ga through Gz a total of 62 names. The sample screen above displays the 36 possible names.

If you have finished specifying the number of available ghost tasks and want to leave the install utility, please refer to the section titled How to Leave the Install Utility.

To make ghost tasks unavailable to Thoroughbred Basic, and delete the ghost task specifications from the IPLINPUT file, use the install utility to display the Install/Update BASIC Ghost Tasks screen:

Currently Defined Ghost Tasks
G0 G1 G2 G3 G4 G5 G6 G7 G8 G9 GA GB GC GD GE GF GG GH GI GJ
GK GL GM GN GO GP GQ GR GS GT GU GV GW GX GY GZ Ga Gb Gc Gd Ge Gf Gg Gh Gi Gj
Gk Gl Gm Gn Go Gp Gq Gr Gs Gt Gu Gv Gw Gx Gy Gz
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

To delete ghost task specifications from the IPLINPUT file, type d and press the Enter key. The following message will be displayed:

Enter number of ghosts to delete or <CR> to end:

Valid values range from 1 through the number of available ghost tasks. Type a valid value and press the Enter key.

The install utility will remove ghost task specifications, in descending order, from the IPLINPUT file. Then, it will redisplay the Install/Update BASIC Ghost Tasks screen, which will contain the current list of ghost tasks available to Thoroughbred Basic. For example, if you had 36 available ghost tasks and removed 10, the following screen will be displayed:

Currently Defined Ghost Tasks
G0 G1 G2 G3 G4 G5 G6 G7 G8 G9 GA GB GC GD GE GF GG GH GI GJ
GK GL GM GN GO GP GQ GR GS GT GU GV GW GX GY GZ Ga Gb Gc Gd Ge Gf Gg Gh Gi Gj
Gk Gl Gm Gn Go Gp
Add or Delete? Enter a, d or <CR> to end:

In this example, removing 10 ghost tasks removes the GQ through GZ specifications.

To stop making ghost tasks available or unavailable to Thoroughbred Basic, make sure the install utility is displaying the Install/Update BASIC Ghost Tasks screen:

Currently Defined Ghost Tasks
G0 G1 G2 G3 G4 G5 G6 G7 G8 G9 GA GB GC GD GE GF GG GH GI GJ
GK GL GM GN GO GP GQ GR GS GT GU GV GW GX GY GZ Ga Gb Gc Gd Ge Gf Gg Gh Gi Gj
Gk Gl Gm Gn Go Gp
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

Press the Enter key. The install utility will display the Installation and Updating Procedures screen:

Thoroughbred BASIC Installation and Updating Procedures
1) Install New System
2) Install/Update User Logins
3) Install/Update BASIC Directories
4) Install/Update BASIC Printers
5) Install/Update BASIC Terminals
6) Install/Update BASIC Ghost Tasks
Enter Selection (1 - 6) or <CR> to end:

You must enter a valid value in the following field:

Enter Selection (1 - 6) or <CR> to end:

To leave the install utility and return to the operating system prompt, press the Enter key.

From the Customization and Tuning Guide: Devices, version 8.9.1. Open this page in the PDF