Multiprocessing system and method of controlling the carrying out of tasks in a multiprocessing system

Abstract: Three new, efficient protocols for providing communications between a user's application program, a Multiprocessing Library, and the host Operating System is described. These new protocols are termed WAKEUP, GIVEUP, and CONTEXT-TO-USER-SPACE. They utilize the concept of a conduit through which the Operating System and the user application program can communicate without the need for expensive system calls. A primary use for the new protocols is the scheduling of multiple Central Processing Units (CPUs) into a single user program in a multi-CPU, multiprogramming, multi-tasking environment. WAKEUP allows a master process to quickly request the asynchronous scheduling of slave processes to help execute parallel tasks. GIVEUP allows a slave process time to finish a task before Operating System interruption. Once completed with its task, there is no need to save the context of the slave process. CONTEXT-TO-USE-SPACE allows other slave processes the opportunity to execute interrupted tasks that were not allowed to finish under GIVEUP.

Description: Field of the Invention This invention relates generally to process management in a multiprocessing, multiprogramming computer system. In particular, it is directed to communication between the host Operating System and user application programs. Background of the Invention Since the advent of computing systems, a prominent goal has been to speed up program execution. On uniprocessing systems, the preferred way has been to design faster electronic components to speed electrical signals through the system. For such systems, theoretical limits, such as the speed of light, place an upper bound on the speed of program execution. To extend beyond such limitations, multiprocessing of user programs takes advantage of the processing power of several central processing units (CPUs) concurrently executing a single program. Multiprocessing is possible when some sections of program code are independent from other sections in their order of execution. In that case, multiple CPUs may execute these sections of code concurrently. Ideally, a program would run N times faster if N CPUs were simultaneously executing the program code. However, this best case is not possible for a variety of theoretical and practical reasons. Theoretically, a program will not achieve this maximal speed-up if there are sections of code that must be executed in a non-trivial partial ordering - e.g. some sections of code must wait for other sections to finish executing in order to use their results. These data dependencies dictate how much a given program can be sped up by having more than one CPU executing its code concurrently. They also indicate that a given program may go through sections of code that require at most one CPU and other sections where multiple CPUs may be used. This transition between single CPU mode and multiple CPU mode for a given program creates practical reasons why programs, in general, do not achieve their maximal speed-up. One practical reason involves communication between the user program and the host Operating System. In a multiprogramming environment (i.e. several user programs simultaneously compete for computing resources) it is usually inefficient to allow one program to keep multiple CPUs attached to it when a program is in single CPU mode. These idle CPUs might better serve system throughput by working on other programs until that program returns to multiple CPU mode. When the program does, however, return to multiple CPU mode, it needs to request additional CPUs from the Operating System. In the prior art, the user program and the Operating System have historically had two avenues for communication: the system call, which is a request by the user program for services, and the interrupt, which is a mechanism by which the Operating System reports certain information to the user program. Neither mechanism provides the high-speed communication needed for efficient multi-tasking in a multiprogramming environment. Without a method of high speed communication, a computing system is far from achieving either maximal speed-up or efficient system throughput. A problem occurs when user programs request additional CPUs to process sections of code that are sufficiently small. In the worse case, the time it takes for a single CPU to execute the entire section of code might be the same or less than the time it takes to request extra CPUs for assistance. System throughput decreases by processing these requests. Also, program execution suffers if the program slows down to request and wait for additional CPUs. As a result, exploitable parallelism must occur on a relatively coarse grain of program structure, and opportunities for multiprocessing are lost. Another problem occurs with Operating System interrupts. If the Operating System needs to disconnect a process that is performing useful parallel work in order to connect a process that is currently of higher priority, the context of the process being disconnected must be saved. This interruption introduces two inefficiencies. First, the saving of context is additional overhead. However, the saving and restoring of context is not necessary for some types of parallel work. For example, suppose a process, tasked to execute iterations of a Parallel DO Loop, is interrupted by the Operating System. If this interruption occurs at the end of a particular iteration, then the process would have finished its useful work and returned its results to common memory. In that case, no context needs to be saved to restart the process later. Second, the user program may have to wait for the interrupted process to return before continuing with useful work. Generally, no work beyond the parallel region can be started until all the work in the parallel region has been completed. This is necessary to ensure program correctness. If the interrupted process has not returned to continue its work, other processes that have finished their parallel work are forced to wait. In one aspect, the present invention provides a multiprocessing system in accordance with claim 1. The present invention also provides a method of controlling the carrying out of parallel tasks in a multiprocessing system in accordance with claim 16. An embodiment of the present invention addresses these problems by providing three protocols for high speed, asynchronous communication between the master program (i.e. the process that executes the user program), the Operating System, and a Multiprocessing Library which schedules slave processes to perform slices of parallel work, called "tasks". These protocols utilize an agreed-upon data buffer, called a "conduit," to facilitate this communication. The first protocol, WAKEUP, allows the master process to request additional CPUs to work in parallel regions of code. The master process does not stop or slow down to request additional CPUs. The master process, detecting a parallel region, sets flags in the conduit that are associated with slave processes. The Operating System asynchronously polls these flags and awakens any sleeping slave processes. The awakened slave processes are subsequently scheduled by the Multiprocessing Library to execute parallel tasks. The second protocol, GIVEUP, allows a slave process enough time to finish a task before the Operating System disconnects it. Instead of blindly disconnecting, the Operating System sets a flag in the conduit that the Multiprocessing Library subsequently reads as a request to return a particular CPU attached to a slave process. When the process attached to the CPU has finished its work (e.g. finished a parallel DO Loop iteration), it returns itself to the Multiprocessing Library for another task assignment. Instead of giving the process another task, the Multiprocessing Library returns the CPU to the Operating System. The slave process is put to sleep without the need to save its context. The third protocol, CONTEXT-TO-USER-SPACE, is employed when the Operating System cannot wait for a slave process to finish a task before interruption. In that case, the context of the interrupted process is saved in user-space, instead of system space. The Operating System sets a flag in the conduit. The Multiprocessing Library later interprets the flag as a process that was interrupted during useful work. The Multiprocessing Library will assign the work of the interrupted process to the first available slave process that returns for an additional task assignment. An embodiment of the present invention will now be described, by way of example, with reference to the accompanying drawings, in which: FIGURE 1 is a block diagram illustrating the creation of a Multiprocessing Group; FIGURE 2 shows the constituent parts of the conduit; FIGURE 3 shows the constituent parts of a process thread structure in the conduit; FIGURE 4 shows the constituent parts of a task context structure in the conduit; FIGURE 5 illustrates a WAKEUP protocol; FIGURE 6 illustrates a GIVEUP protocol; and FIGURE 7 illustrates a CONTEXT-TO-USER-SPACE protocol. Detailed Description of a Preferred Embodiment In the following Detailed Description of a Preferred Embodiment, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration, a specific embodiment in which the invention may be practiced. It is to be understood that other embodiments may be utilized and implementation changes may be made without departing from the scope of the present invention. The present embodiment describes three separate protocols: WAKEUP, GIVEUP and CONTEXT-TO-USER-SPACE. These protocols form an integral part of the Cooperative Parallel Interface. The protocols, through the Interface, allow high speed communication between a user program and a host Operating System. The preferred embodiment utilizes a separate Multiprocessing Library that controls the scheduling of processes that are slaves to the user program's master process. Additionally, a separate data buffer, the conduit, facilitates asynchronous communication between the user program, the Multiprocessing Library, and the host Operating System. FIGURE 1 illustrates how a Multiprocessing Group is formed. Dashed line 5 represents diagrammatically a multiprocessing system within which the software and data components of the invention function. Although not shown explicitly, it shall be understood that system 5 includes a shared memory used for interprocessor communication. Although the present invention is not limited to a particular type of multiprocessing system, known systems on which it will function include the Cray X-MP and Y-MP multiprocessor systems. Descriptions of these systems are found, for example, in U. S. Patent No. 4,636,942 issued January 13, 1987, entitled "Computer Vector Multiprocessing Control"; U. S. Patent No. 4,754,398 issued June 28, 1988, entitled, "Apparatus and Method for Multiprocessor Communication"; and in U. S. Application Serial No. 308,401, filed February 9, 1990, entitled "System for Multiprocessor Communication". As used herein, the term "system space" refers to the portion of memory reserved for the Operating System; "user-space" refers to that space allocated to use by user programs. The user source program 10 is preferably compiled by the automatically parallelizing compiler 11 that looks for regions of parallel processing that occur within the user source program 10. The compiler may also include mechanisms for the user to specify parallel regions manually as well as detecting parallelism automatically. The manner in which the user-program is compiled for parallel processing of tasks is not, however, part of nor essential to the present invention. The Multiprocessing Library 12 creates all the additional processes that a user program will need at job start-up. A library routine, TSKSTART 13, uses a system call to spawn all the necessary slave processes 15. The preferred embodiment spawns one slave process for each physical CPU. It should be understood, however, that any arbitrary number of slave processes will suffice. These processes, together with master process, belong to the same Multiprocessing Group 19. FIGURES 2 - 4 depict the data structures used to implement the present embodiment. In FIGURE 2, the Multiprocessing Library 12 implements an agreed-upon data buffer, called a conduit, in user-space to facilitate communication. The conduit 20 contains individual thread structures and context structures. For example, slave process N has a thread structure labelled 21 and a task context structure labelled 22. The Multiprocessing Library 12 associates a thread structure for each individual process in the Multiprocessing Group 19 at job program start-up. The Multiprocessing Library 12 makes this association with a system call and the association persists throughout the execution of the user program. FIGURE 3 shows the constituent parts of an individual process thread structure 21. Each thread structure contains the following types of data: Library requests and pointers Operating System requests and pointers Library statistics Operating System statistics Trace information. Within each thread structure, there are certain flag words - the wakeup word, giveup word, and context save flag. The wakeup word is set by the master process 14. The giveup word is set by the Operating System. At program start-up, the master process 14 begins execution in single CPU mode and continues until a parallel section of code is encountered. While the master process 14 is in single CPU mode, the slave processes 15 are in "sleep" state. When the master process 14 encounters a multiple CPU mode section, tasks (i.e. parallel work) recorded in Multiprocessing Library 12 are given to slave processes to execute. Slave processes and tasks are created at job start-up time. Processes are in a "sleep" state and tasks are "idle" until the Master Process encounters a parallel region. Each task that is created has an associated context structure 22 (FIGURE 4) that is located in the conduit 20. FIGURE 4 shows the constituent parts of a task context structure. Each task contains the following types of data: Private data storage area 41 Space to hold a full set of user registers and associated privileged registers and status words Operating System communication and state flags Other miscellaneous task storage areas. Apart from the task private data area 41, the task context structure 22 is reserved for use by the Multiprocessing Library 12 and the Operating System. The conduit 20 provides the mechanism for a process-to-task scheduling paradigm. This scheduling paradigm is defined by the three major protocols of the Cooperative Parallel Interface: WAKEUP, GIVEUP, and CONTEXT-TO-USER-SPACE. It is understood that the preferred embodiment employs the above-mentioned data structures; however, other data structures may be similarly used to implement the protocols. FIGURE 5 illustrates the WAKEUP protocol. WAKEUP addresses the problem that occurs when a master process encounters a multiple CPU region and requests additional CPUs. WAKEUP allows the master process to set flags in the conduit quickly and continue to execute the program code serially. The Operating System asynchronously reads the flags and handles the requests. Each thread structure contains a "wakeup word" that is written by the master process and read by the Operating System. As mentioned above, when the master process 14 begins execution, it starts in single CPU mode. Slave processes that are not executing are in "sleep" state. The master task is that task which executes the serial portions of the user program. When the master process 14 encounters a multiple CPU region of code, it sets the wakeup word of every sleeping slave's thread structure to some non-zero value. As depicted in FIGURE 5, slave process N 18 is sleeping and the master process 14 sets its wakeup word 50 to a non-zero value. The Operating System 51 polls the wakeup words asynchronously. Since slave N's wakeup word 50 is non-zero, slave process N 18 is "awakened" and placed in the run queue. The newly scheduled processes begin executing in the Multiprocessing Library 12. The Multiprocessing Library 12 then schedules a task to each awakened process. At the time that the master process sets the wakeup words in the thread structures, it also writes to a word that is read by the library that indicates which contexts (or tasks) are to be scheduled to participate in the parallel work. The task is thus scheduled to participate in the parallel work. When the task has completed its portion of parallel work, the task returns to the Multiprocessing Library 12 and is placed in the "idle" state. If the Multiprocessing Library 12 does not have another task to schedule the process, the process spin waits in user-space for a set amount of time, called the "slave hold time". The process spin waiting in the Multiprocessing Library 12 checks to see if there is a task that has been disconnected with its context stored in the conduit 20, or if there is a task that is yet to be scheduled. If so, the process will start executing the task. If there is no such task to be scheduled, the process will clear its wakeup word 50 and give up its CPU by way of a system call at the expiration of its slave hold time. FIGURE 6 illustrates the GIVEUP protocol. GIVEUP avoids the problem associated with disconnecting a process in the middle of a task. GIVEUP postpones the disconnection until the task has been completed in order to minimize the number of context saves. Each thread structure contains a "giveup word" 60 that is written by the Operating System 51 and read by the Multiprocessing Library 12. Additionally, each thread structure contains a "context save flag" 61 that is written by the Multiprocessing Library 12 and read by the Operating System 51. The context save flag has three settings: "save-in-user-space"; "save-in-system-space"; and "don't-save-at-all" if in the hold loop. Essentially, a context save flag is set to save-in-user-space if and only if the associated process is assigned a task. The first two settings tell the Operating System 51 where to save the register set for this process when it is interrupted, the last that no save is to be performed. Before the Operating System 51 interrupts a process, it checks to see if the process has a thread structure associated with it. If it does not, then the process is disconnected. If it does, then the Operating System 51 checks to see if the context save flag is set to "save-in-user-space". If it is not, then the process is not currently doing any parallel work and may be disconnected. If it is set to save-in-user-space, then the process is currently doing parallel work. In this case, the Operating System 51 sets the giveup word 60 to a negative value indicating to that process that it should give up the CPU at its earliest convenience. The patience of the Operating System 51 with respect to GIVEUP requests is, however, finite. If the process does not give up the CPU within a given time period, the Operating System 51 will interrupt the process. This time period is arbitrary; however, it should be large enough to allow the process to finish a reasonable task. When the process has completed its task and returns, the multiprocessing library 12 checks its giveup word 60. If it is set to a negative value, the process immediately reschedules back to the Operating System 51. When rescheduling for a GIVEUP request, the process does not clear its wakeup word 50. This forces the Operating System to reconnect the process in order for the process to spin wait for its slave hold time period. This is different from when a process reschedules to the Operating System because its slave hold time has expired. FIGURE 7 illustrates the CONTEXT-TO-USER-SPACE protocol. CONTEXT-TO-USER-SPACE addresses the problem that occurs when disconnections cannot be avoided and must occur during useful parallel work. As previously mentioned, no work beyond the parallel region can be started until all work in the parallel region is complete. This assures program correctness. Disconnecting a process in the middle of parallel work causes all other processes to wait until the disconnected process has been rescheduled and has completed its portion of work. CONTEXT-TO-USER-SPACE is a protocol that allows the Multiprocessing Library 12 to schedule a disconnected task to another process that is connected and looking for work. While a process is executing in the Multiprocessing Library 12 and is in the process of having a task scheduled to it, the context save flag 61 is set to "save-in-system-space." In this state, if a process is interrupted, the registers for that process are saved in system space. User programs can not access this portion of memory. As soon as the Multiprocessing Library 12 has scheduled a task to a process but before allowing the process to execute the task, the Multiprocessing Library 12 sets the context save flag 61 to "save-in-user-space". This setting indicates to the Operating System 51 that the process is currently executing in a parallel region. When the Operating System 51 interrupts a process with its context save flag set to save-in-user-space, it saves the user registers into the task's context structure 71 that is currently connected to that process. The Operating System 51 then sets an indicator in the context structure to signify to the Multiprocessing Library 12 that this task was interrupted during a parallel region. This allows the Multiprocessing Library 12 to schedule this interrupted task to the next available process. Immediately upon completing a task and returning to the library, the save flag is set to save-in-system-space. Once a process determines that there are no schedulable tasks, it sets the save flag to don't-save-at-all and spins in the slave hold loop. The only time that the save flag is set to don't-save-at-all is when a process is spinning in the hold loop or doing other work in portions of the library where it would be faster for another process to just start over again with the work in progress rather that saving and restoring the context of the interrupted process. More specifically, if a process is in the hold loop waiting for a task to become schedulable, there is no reason to save its registers if it is interrupted. Its registers are not holding anything important so there is no need to go through the work and delay of saving and restoring them. The don't-save-at-all flag indicates that no context need be saved. Instead, when the Operating System disconnects the process, the program counter register is set to begin executing in the Multiprocessing library, the rest of the exchange package is zeroed, and the process is placed at the bottom of the run queue. When the process is finally scheduled again by the Operating System, it will begin executing in the Multiprocessing Library. Thus, the present invention provides methods for facilitating the efficient use of a multiprocessing system, providing efficient distribution and execution of parallel tasks in parallelized processes.

Claims: A multiprocessing system (5) comprising an operating system (51), a master process (14) and slave processes (15), the operating system (51) and processes (14, 15) being arranged to communicate information regarding the carrying out of parallel tasks by the slave processes (15) between the operating system (51) and a process or processes (14, 15) characterised in that the operating system (51) and the processes (14, 15) are arranged to communicate information regarding the carrying out of parallel tasks by the slave processes (15) by one of said operating system (51) and a process or processes (14, 15) causing a flag (50, 60, 61) to be set in a data buffer (20) of the multiprocessing system and the other of said operating system (51) and the process or processes reading the set flag (50, 60, 61) by polling the data buffer (20). A multiprocessing system according to claim 1, wherein the master process (14) is adapted to set a wake-up flag (50) in the data buffer (20) to asynchronously activate a sleeping slave process (15) to enable parallel tasks to be assigned when the master process encounters a multiple CPU region of code, and wherein the operating system (51) is adapted to asynchronously poll the data buffer (20) for the wakeup flag (50) and then activate the slave process (15). A multiprocessing system according to claim 2, further comprising a multiprocessing library (12) adapted to schedule a parallel task to an activated slave process (15). A multiprocessing system according to claim 2, further comprising a multiprocessing library (12) adapted to schedule a further parallel task to an activated slave process (15) if a further task is available upon completion of a task by the slave process. A multiprocessing system according to claim 4, wherein the multiprocessing library (12) is adapted to schedule as the further parallel task a task that has been disconnected with its context stored in the data buffer (20). A multiprocessing system (5) according to any one of claims 2 to 5, wherein a slave process (15) is adapted to spin wait for a predetermined time upon completion of a task and then to release its CPU to the operating system (51) if it has not been assigned another task. A multiprocessing system according to claim 1 or 2, wherein the operating system (51) is adapted to set a giveup flag (60) in the data buffer (20) to delay interruption of a slave process (15) by the operating system (51) until the slave process (15) has completed its task or a predetermined time has expired, the slave process (15) being adapted to poll the data buffer (20) for the giveup flag (60) and then return the CPU to the operating system (51), and the operating system (51) being adapted to interrupt the slave process (15) at the end of the predetermined time if the slave process has not yet finished its task and returned the CPU back to the operating system (51). A multiprocessing system according to claim 7, wherein a slave process (15) is adapted to poll the associated giveup flag (60) after completion of an assigned task. A multiprocessing system according to claim 7 or 8, wherein each slave process (15) has an associated thread structure (21) and the operating system (51) is adapted to check whether the slave process has an associated thread structure (21) before interrupting the slave process, to set the associated giveup flag (60) if the slave process has an associated thread structure and to interrupt the slave process (15) if the slave process does not have an associated thread structure (21). A multiprocessing system according to any one of claims 7 to 9, further comprising a multiprocessing library (12) adapted to set the context-save flag (61) to a save-in-user-space value if the slave process (15) is carrying out a parallel task, the operating system (51) being adapted to check the context-save flag (61) when the operating system interrupts the slave process (15) and to save the context of the interrupted task in user space if the context-save flag (61) is set to save-in-user-space so that the context may be retrieved by another slave process (15). A multiprocessing system according to claim 10, wherein the multiprocessing library (12) is adapted to set the context-save flag (61) to a don't-save-at-all value if the slave process (15) has no context worth saving and the operating system (51) is adapted not to save the context of an interrupted slave process (15) if the context flag (61) is set to the don't-save at all value. A multiprocessing system according to any one of claims 7 to 11, wherein the system is adapted to reschedule an interrupted task on a priority basis. A multiprocessing system according to any one of claims 1, 2, 7, 8 or 9 wherein a multiprocessing library (12) is adapted to cause a context-save flag (61) to be set in the data buffer (20) to a save-in-user-space value when a slave process (15) is performing a parallel task, the operating system (51) is adapted to cause the context of the slave process (15) to be saved in user space if the slave process is interrupted when the context-save flag (61) is set, and to set a flag in the data buffer (20) to inform a multiprocessing library (12) that the process was interrupted while performing a parallel task, and wherein the multiprocesing library (12) is adapted to asynchronously poll the data buffer (20) for a context-save flag (61) to detect an interrupted task and then assign the interrupted task to the first available slave process (15). A multiprocessing system according to claim 13 wherein the context-save flag (61) is adapted to be set to a save-in-system-space value when an interrupted task is assigned to the first available slave process (15) in order to inform the operating system (51) to save the context of the slave process (15) in system space if the slave process (15) was not performing a parallel task when interrupted. A multiprocessing system according to claim 13 or 14, wherein the system is adapted to cause the first available slave process (15) to retrieve the context of an interrupted task from user space and to use the context to continue executing the task. A method of controlling the carrying out of parallel tasks in a multiprocessing system comprising an operating system (51), a master process (14) and slave processes (15) which method comprises communicating information regarding the carrying out of parallel tasks by slave processes (15) between the processes (14, 15) and the operating system (51), characterised by communicating information from one of said operating system (51) and a process or processes (14, 15) to the other said operating system (51) and the process or processes (14, 15) by said one of said operating system (51) and the process of processes (14, 15) causing a flag (50, 60, 61) to be set in a data buffer (20) of the multiprocessing system and the other of said operating system (51) and the process or processes (14, 15) reading the set flag by polling the data buffer (20). A method according to claim 16, wherein the master process (14) sets a wakeup flag (50) in the data buffer (20) to asynchronously activate a sleeping slave process (15) to enable a parallel task to be assigned when the master process encounters a multiple CPU region of code and the operating system (51) asynchronously polls the data buffer (20) for the wake up flag (50) and then activates the slave process (15). A method according to claim 17, wherein a multiprocessing library (12) schedules a parallel task to the activated slave process (15). A method according to claim 17, wherein a multiprocessing library (12) schedules a further parallel task to an activated slave process (15) upon completion of a task, if a further task is available. A multiprocessing system according to claim 19, wherein the further parallel task is a task that has been disconnected with its context stored in the data buffer (20). A method according to claim 17, 18, 19 or 20, wherein a slave process (15) spins waiting for a predetermined time after completion of a task and then releases its CPU to the operating system (51) if it is not assigned another task. A method according to claim 16 or 17, wherein the operating system (51) sets a giveup flag (60) in the data buffer (20) to delay interrupting of a slave process (15) by the operating system (51) until the slave process has completed its task or a predetermined time has expired, the slave process (15) polls the data buffer (20) for the giveup flag (60) and then returns the CPU to the operating system (51) and the operating system interrupts the slave process (15) at the end of the predetermined time if the slave process (15) has not yet finished its task and returned the CPU back to the operating system (21). A method according to claim 22 wherein a slave process (15) checks its associated giveup flag (60) after completion of an assigned task. A method according to claim 22 or 23, wherein each slave process (15) has an associated thread structure (21) and the operating system (51) checks before interrupting a slave process (15) whether the slave process has an associated thread structure (21), if the slave process has an associated thread structure the operating system sets the associated giveup flag (60) and if the slave process does not have an associated thread structure the operating system (51) interrupts the slave process (15). A method according to claim 22, 23 or 24 wherein a multi-processing library (12) sets the context-save flag (61) to a save-in-user-space value if the slave process (15) is carrying out a parallel task and the operating system (51) checks the context-save flag (61) if it interrupts the slave process (15) and saves the context in user space if the context-save flag (61) is set to save-in-user-space so that the context may be retrieved by another slave process (15). A method according to claim 25, wherein the multiprocesing library (12) sets the context-save flag (61) to a don't-save-at-all value if the slave process (15) has no context worth saving and the operating system (51) does not save the context of the interrupted slave process (15) if the context-save flag (61) is set to the don't-save-at-all value. A method according to any one of claims 22 to 26, wherein an interrupted process (15) is rescheduled on a priority basis. A method according to claim 16, 17 or 22, wherein a multiprocessing library (12) causes a context-save flag (61) to be set to a save-in-user-space value when a slave process (15) is performing a parallel task, the operating system causes the context of the slave process (15) to be saved in user space if the slave process (15) is interrupted when the context-save flag (61) is set and sets a flag in the data buffer (20) to inform a multi-processing library (12) that the process was interrupted while performing a parallel task and wherein the multi-processing library (12) asynchronously polls the data buffer (20) for the context-save flag (61) to detect the interrupted task and then assign the interrupted task to the first available slave process (15). A method according to claim 28, wherein the context-save flag (61) is set to a save-in-system-space value when an interrupted task is assigned to the first available slave process (15) to inform the operating system (51) to save the context of the given slave process (15) in system space if the slave process (15) is interrupted because the slave process (15) is not currently performing a parallel task. A method according to claim 28 or 29, wherein the first available slave process (15) retrieves the context of the interrupted given task from user space and uses the context to continue executing the task.

Inventors: ANDREASEN CLAYTON D, BARRIUSO FRANK R, FURTNEY MARK, HOEL TIMOTHY W, LACROIX SUZANNE L, REINHARDT STEVEN P, ANDREASEN, CLAYTON D., BARRIUSO, FRANK R., FURTNEY, MARK, HOEL, TIMOTHY W., LACROIX, SUZANNE L., REINHARDT, STEVEN P.
Applicants: CRAY RESEARCH INC, CRAY RESEARCH, INC.
Application year: 1991
Main classification: G06F9
IPC codes: G06F9, G06F15