Patent GB-1511281-A (GB)
Title: Trap semaphore in computer
IPC: G06F9/46
Filed: 1975-04-21
Abstract: 1511281 Data processing HONEYWELL INFORMATION SYSTEMS Inc 21 April 1975 [19 April 1974] 16317/75 Heading G4A A data processing system utilizes a trap semaphore mechanism to detect the occurrence, in any of a first set of processes, of a condition, such as reaching a certain stage of the process or the release of a resource, which is significant to a second process and to trap the second process in response to such detection for direct execution in a trap mode independently of a despatcher which controls the transfer of processes between running, ready and wait states. The main memory of the system includes a system base 1215, Fig. 12, pointed to by a base address register 1202, which provides a J table word (JTW), which points to a J table 1204, and job step (J) and process group (P) numbers for the currently running process. The J number addresses J table 1204 the output 1216 of which points to a P table 1205 which is addressed by the P number to provide the address 1217 of a process control block (PCB) 1206 for the currently running process. Each PCB stores information, including the addresses of memory segments assigned to the process and the contents of all pertinent registers, necessary to start or restart the respective process. The respective PCB together with the contents of a base register 1201 provides, via a segment table word array 1208 or 1207 and segment descriptor 1210 or 1209 the address of a user segment 1211. Each process is in one of four states, running, suspended, ready or waiting; a process in the ready state is ready to run but does not have control of the central processing unit, and a process in the waiting state is waiting for a specific occurrence, such as the reception of a message. The main memory includes a Go segment, Figs. 9 and 12, and a plurality of SD segments. The Go segment includes a number of queues of process links, each process link specifying the process name and the process priority and including a pointer to the next process link in the respective queue, the pointer in the last process link in a queue being 0. A plurality of wait queues, 803a-b, 803f-g, Fig. 9 are provided for processes waiting on different events, the head of each wait queue being pointed to by a respective semaphore 903, 904, the process links in each wait queue being arranged on a priority basis. A ready queue 803c-d is also provided, the head of which is pointed to by an internal process queue word 905 in the system base, the process links again being arranged on a priority basis. Free process links are provided in a free process link queue 805. When a process moves from the ready or waiting state to the running or suspended state it gives up its process link in the Go segment, the freed process link being added to the free process link queue 805. When a process moves from the waiting state to the ready state the priority of the process link at the head of the ready queue is compared with the priority of the running process to see if the running process should be interrupted by a ready process of higher priority. An SD segment contains semaphores controlling queues of message links, and a queue of free message links. A semaphore may be a semaphore without a message, for example indicating whether a disk is available, including fields indicating the maximum number of resources which can be tied to the semaphore, the number of processes (negative count) or resources (positive count) waiting on the semaphore, the head of the queue of processes (if any) and the name of the last process to have obtained a resource from the semaphore. A semaphore with a message is similar except that when resources are queued the head and tail of the queue are identified rather than the last process to have obtained a resource being identified. More general semaphores include a plurality of pointers to, for example, the first available source, the first resource, whether available or not, the first process waiting for an event and the process during a resource.