Collision handling apparatus and method
First Claim
1. An apparatus that supports execution of computer program instructions speculatively out of program order comprising:
- a plurality of threads for executing computer program instructions, and a shared memory, which comprises a number of shared memory elements accessible to the plurality of threads;
wherein each of the threads is associated with a respective data structure for collision detection between the plurality of threads, said data structure being arranged to store information indicating which of said number of shared memory elements the associated thread has accessed, and wherein each of the threads includes means for accessing a selected shared memory element in the shared memory, and means for storing information in the associated data structure of the thread, said information indicating the thread'"'"'s access to the selected shared memory element.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention relates to mechanisms for handling and detecting collisions between threads (5, 6, 7) that execute computer program instructions out of program order. According to an embodiment of the present invention each of a plurality of threads (5, 6, 7) are associated with a respective data structure (9, 10, 11) comprising a number of bits (12) that correspond to memory elements (m0, m1, m2, mn) of a shared memory (4). When a thread accesses a memory element in the shared memory, it sets a bit in its associated data structure, which bit corresponds to the accessed memory element. This indicates that the memory element has been accessed by the thread. Collision detection may be carried out after the thread has finished executing by means of comparing the data structure of the thread with the data structures of other threads on which the thread may depend.
38 Citations
36 Claims
-
1. An apparatus that supports execution of computer program instructions speculatively out of program order comprising:
-
a plurality of threads for executing computer program instructions, and a shared memory, which comprises a number of shared memory elements accessible to the plurality of threads;
wherein each of the threads is associated with a respective data structure for collision detection between the plurality of threads, said data structure being arranged to store information indicating which of said number of shared memory elements the associated thread has accessed, and wherein each of the threads includes means for accessing a selected shared memory element in the shared memory, and means for storing information in the associated data structure of the thread, said information indicating the thread'"'"'s access to the selected shared memory element. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A method for recording information regarding accesses to a number of shared memory elements of a shared memory, said shared memory being accessible by a plurality of threads that are arranged to execute computer program instructions speculatively out of program order, wherein each of the threads is associated with a respective data structure for collision detection between the plurality of threads, said data structure being arranged to store information indicating which of said number of shared memory elements the associated thread has accessed, said method comprising the steps of:
-
accessing by a first of the plurality of threads, a selected shared memory element in the shared memory, and storing by the first thread, information in the associated data structure of the first thread, information indicating the first thread'"'"'s access to the selected shared memory element. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24, 25, 26)
-
-
27. A method for handling possible collisions between a plurality of threads, said threads being arranged to execute computer program instructions speculatively out of program order and to access shared memory elements of a shared memory, said method comprising the steps of:
-
executing a first thread;
determining, when the first thread has finished execution, whether each of the threads on which the first thread may depend is ready to be committed;
waiting until each of the threads on which the first thread may depend is ready to be committed, if each of the threads on which the first thread may depend is not ready to be committed; and
checking for a collision between the first thread and each of the threads on which the first thread may depend by comparing a data structure associated with the first thread with a data structure associated with the thread on which the first thread may depend, said data structure storing information regarding which of the shared memory elements the thread with which the data structure is associated has accessed during execution of the thread. - View Dependent Claims (28, 29, 30, 31, 32, 33, 34, 35)
-
-
36-37. -37. (Canceled)
Specification