Background processes A background process is one which is asynchronous from the 1616/OS com- mand processor. It will usually produce no output unless it encounters an error condition. PIDs Every process, whether synchronous or asynchronous, is assigned a unique identifying number, its ‘process ID’, or PID. PIDs under 1616/OS range from 0 to 63. The PID (and other process information) can be listed by the inbuilt command ps . Daemons A daemon is a system related program which runs in thebackground. Usually it manages some aspect of the computer’s behaviour or it supervises access to one of the system’s resources.
A typical daemon is a line printer spooler which monitors a special directory, looking for files to print out. When one is found, the daemon sends it to the printer and waits for another print job. Sending all print jobs through the daemon prevents two print jobs from being printed simultaneously. Look at the cron and at programs on the Utility Disks for typical examples. Pipes A pipeis a first-in, first-out buffer, which is managedby theoperating system. A pipe has two ends: the input and the output. Characters written to the input of a pipe via a write system call appear at the output, available via a read system call. The typical use of a pipe is in communicating between two processes.
One process writes to the input of the pipe, and the other reads the output. Additional pipes may be created to provided bidirectional communication. Internally, a pipe is a 2 kbyte circular buffer. Bytes written into the pipe go onto the head of the buffer. Bytes read are taken from the tail. Reading from an empty pipe or writing to a full one causes a process to be blocked. A new pipe syscall is provided. A pipe is produced at the command line by using the | character between commands. Signals A signal is a mechanism by which one process may send a small message to another one.
When a process is signalled, the system initiates a call to a sectionofcodewithintheprocesscalleda‘signalhandler’. Thesignalhandler is very similar in concept to an interrupt service routine. A process must install the address of its signal handling routine in the operating system when it starts up. If a process has not installed a signal handler, it is killed when someoneattemptstosignalit. The sigsend and sigcatch entriestothe proccntl system call handle signals. The multi-tasking features of 1616/OS impact on the use of the system both at the command line and at the programming level. Multi Tasking User Tutorial Manual Page 57