EFFICIENT DETERMINISTIC MULTIPROCESSING
First Claim
1. A multiprocessing system for controlling the interleaving of threads of a multithreaded application on a critical path of the multithreaded application, the system comprising:
- multithreaded application code specifying a plurality of threads;
a quantum builder component to divide the multithreaded application code into two or more quanta, each quantum constituting a predetermined number of operations;
a deterministic execution component to specify a deterministic order in accordance with which synchronization code causes threads of the multithreaded application to execute the two or more quanta; and
an adaptive quantum builder component to monitor thread execution and determine whether to invoke the synchronization code prior to executing its predetermined number of operations; and
a quantum completion component to monitor thread execution and, if the synchronization code is not invoked by the adaptive quantum builder component, to invoke the synchronization code in response to a thread executing its predetermined number of operations;
wherein, when a particular input is specified for multiple executions passes of the multithreaded application code, each execution pass produces the same output for the particular input.
1 Assignment
0 Petitions
Accused Products
Abstract
A hardware and/or software facility for controlling the order of operations performed by threads of a multithreaded application on a multiprocessing system is provided. The facility may serialize or selectively-serialize execution of the multithreaded application such that, given the same input to the multithreaded application, the multiprocessing system deterministically interleaves operations, thereby producing the same output each time the multithreaded application is executed. The facility divides the execution of the multithreaded application code into two or more quantum specifying a deterministic number of operations, and the facility specifies a deterministic order in which the threads execute the two or more quantum. The deterministic number of operations may be adapted to follow the critical path of the multithreaded application. Specified memory operations may be executed regardless of the deterministic order, such as those accessing provably local data. The facility may provide dynamic bug avoidance and sharing of identified bug information.
-
Citations
43 Claims
-
1. A multiprocessing system for controlling the interleaving of threads of a multithreaded application on a critical path of the multithreaded application, the system comprising:
-
multithreaded application code specifying a plurality of threads; a quantum builder component to divide the multithreaded application code into two or more quanta, each quantum constituting a predetermined number of operations; a deterministic execution component to specify a deterministic order in accordance with which synchronization code causes threads of the multithreaded application to execute the two or more quanta; and an adaptive quantum builder component to monitor thread execution and determine whether to invoke the synchronization code prior to executing its predetermined number of operations; and a quantum completion component to monitor thread execution and, if the synchronization code is not invoked by the adaptive quantum builder component, to invoke the synchronization code in response to a thread executing its predetermined number of operations; wherein, when a particular input is specified for multiple executions passes of the multithreaded application code, each execution pass produces the same output for the particular input. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method in a multiprocessing system for controlling the order of memory operations executed by threads of a multithreaded application, the method comprising:
-
executing multithreaded application code on a multiprocessing system, the multithreaded application code specifying a plurality of threads; dividing the execution of the multithreaded application code into two or more quanta, each quantum constituting a predetermined number of operations that include memory operations; specifying a deterministic order in which the plurality of threads execute the two or more quanta, wherein, when the multithreaded application code is executed, inter-thread communication specifying memory operations is deterministic; and monitoring thread execution of a quantum to determine whether to end a quantum prior to execution of the predetermined number of operations. - View Dependent Claims (14, 15, 16, 17)
-
-
18. A computer-readable storage medium storing code that is capable of causing a multiprocessing system to control the order of memory operations executed by threads of a multithreaded application, the code comprising:
-
code to divide multithreaded application code into multiple quanta, each quantum constituting a predetermined number of memory operations; code to specify a deterministic order in which the multiple quanta are to be executed; and code to end a quantum before a thread completes execution of the predetermined number of memory operations so that the deterministic execution of the multithreaded application follows a critical path of the multithreaded application.
-
-
19. A method in a multiprocessing system for deploying a multithreaded application and controlling the order of memory operations executed by threads of the multithreaded application, the method comprising:
-
executing multithreaded application code within a virtual machine executing on a multiprocessing system, the multithreaded application code specifying a plurality of threads; dividing the execution of the multithreaded application code into a plurality of quanta, each quantum constituting a predetermined number of operations that include memory operations; specifying a deterministic order in which particular threads execute quanta among the plurality of quanta, wherein, when the multithreaded application code is executed, memory operations specifying inter-thread communication are executed deterministically; tracking the inter-thread communication within the virtual machine to determine whether the specified deterministic order matches a known order in which particular threads execute quanta observed to result in a crash; and in response to determining that the specified deterministic order matches a known order, avoiding further execution of the known order. - View Dependent Claims (20, 21, 22)
-
-
23. A multiprocessing system for dynamic bug avoidance in a deployed multithreaded application, the multiprocessing system comprising:
-
deployed multithreaded application code specifying a plurality of threads; a quantum builder component to divide the code into two or more quanta, each quantum constituting a deterministic number of operations; a deterministic component to specify a deterministic order in which threads of the multithreaded application execute the two or more quanta; and a dynamic bug avoidance component to monitor communications between the plurality of threads in the specified deterministic order and avoid execution of a known concurrency bug, wherein the known concurrency bug is a sequence of communication between the plurality of threads that previously caused the multithreaded application to crash. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30)
-
-
31. A method in a multiprocessing system for recovering parallelism in a multithreaded application specifying a plurality of threads that are executed in a deterministic order, the method comprising:
-
dividing multithreaded application code specifying a plurality of threads into two or more quanta, each quantum constituting a predetermined number of operations to be executed by a thread; for each quantum to be executed by a thread, identifying any operations that access memory locations that are provably local to the thread; and inserting synchronization code within the multithreaded application code to specify a deterministic order in which the plurality of threads execute the two or more quanta, wherein the inserted synchronization code implements a shared-memory data structure for monitoring operations that access memory locations other than the identified operations that access memory locations that are provably local to the thread. - View Dependent Claims (32, 33)
-
-
34. A computer-readable storage medium storing code that is capable of causing a multiprocessing system to control the order of memory operations executed by threads of a multithreaded application, the code comprising:
-
code to divide multithreaded application code into multiple quanta, each quantum constituting a predetermined number of memory operations; code to specify a deterministic order in which the multiple quanta are to be executed; and code to make deterministic the execution, by different threads, of memory operations that access memory locations not proven to be local to a single thread, while allowing concurrent execution, by the single thread, of memory operations that access a memory location proven to be local to the single thread.
-
-
35. A method in a multiprocessing system for recovering parallelism in a multithreaded application specifying a plurality of threads that are executed in a deterministic order, the method comprising:
-
dividing multithreaded application code specifying a plurality of threads into two or more quanta, each quantum constituting a predetermined number of operations to be executed by a thread; parsing a quantum that, for each of one or more different memory locations, contains at least one memory operation that accesses the memory location, for at least one of the memory locations the quantum containing a plurality of memory operations that each access the memory location; and generating from the multithreaded application code result code in which, for each of the different accessed memory locations, synchronization code is inserted only for a first-occurring memory operation that accesses the memory location, wherein the synchronization code is used to specify a deterministic order in which the plurality of threads execute the two or more quanta. - View Dependent Claims (36)
-
-
37. A method in a multiprocessor system for testing multithreaded applications, the method comprising:
-
receiving from a development computer a request to test a multithreaded application specifying a plurality of threads; in the absence of any payment in connection with the received request; dividing multithreaded application into two or more quanta, each quantum constituting a predetermined number of operations to be executed by a thread of the plurality of threads; specifying a deterministic order in which the plurality of threads execute the two or more quanta; and for a plurality of execution passes of the multithreaded application, identifying for each execution pass whether a bug exists for a specified input; when no bug is identified, sending to the development computer an indication that no bug was identified in the multithreaded application; and when one or more bugs are identified, sending to the development computer an indication that one or more bugs were identified; and offering to reveal the identified bugs for a fee. - View Dependent Claims (38, 39, 40, 41, 42)
-
-
43. A computer-readable medium whose contents are capable of causing a computing system to perform a method for testing a computer program, the method comprising:
-
receiving from a development computer a request to test an identified computer program; in the absence of any payment in connection with the received request; testing the computer program to attempt to identify bugs contained by the computer program; when no bug is identified, sending to the development computer an indication that no bug was identified in the computer program; and when one or more bugs are identified, sending to the development computer an indication that one or more bugs were identified; and offering to reveal the identified bugs for a fee.
-
Specification