1. Field of the Invention
This invention relates to stored program digital computer systems, and more particularly, to apparatus for controlling execution of tasks and task switching.
The invention finds particular utility in stored program computer systems configured to operate interactively with terminal operators, or in stored program computer systems having need to execute a large number of jobs operating in a batch mode such as in a large multiprogramming environment.
2. Description of the Prior Art
In the past, stored program computer systems used a combination of hardware and software for performing the task handling and switching function. The combination of hardware and software includes an interrupt structure with a fixed number of interrupt levels or classes incorporated into hardware, with software resolving contention among tasks on the same interrupt level. Additionally, prior art systems had one priority resolution mechanism for CPU tasks and another priority resolution mechanism for input/output tasks. In the present invention, the priority resolution mechanism or task handling function is entirely in hardware, and a common mechanism is used for the CPU and the input/output tasks. By this arrangement task handling performance comparable to prior systems is obtainable with a lower performance central processing unit. In the past, it was only feasible to use computers having high performance central processing units for computer job applications requiring a large number of tasks. Further, unlike an interrupt driven system of the prior art, there is no forced switching to I/O processing level by the need for servicing I/O interrupts. The need for service by an I/O device is posted in the task handling apparatus and the I/O device is serviced only when the associated I/O task becomes the highest priority task in the system. The status of the I/O device requiring service is acquired after the request for service during the next instruction fetch cycle, or at predetermined times during execution of certain current instructions of the active task. An instruction fetch cycle of the active task always includes a test for ascertaining the need for I/O cycles for saving I/O status. Also, during execution of certain instructions such as complex instructions, tests are made for determining the need for handling I/O events. After the I/O event is handled, a task switch may or may not take place, depending upon whether or not the I/O task requesting service has a priority higher than the active task.
USPTO Backgrounds
USPTO Backgrounds