Transaction and task scheduler
First Claim
Patent Images
1. A method implemented by a computer device, the method comprising:
- determining a transaction of a first thread being executed is blocked from accessing a memory of the computing device by a second thread;
waiting for at least one transaction of the second thread to commit;
detecting that the at least one transaction has committed data to the memory, the at least one transaction having changed the content of the memory that the transaction of the first thread has been blocked from accessing, wherein the detecting includes (1) referring to an accessed address index of a doubly-indexed data structure that lists each memory address that is blocked from being accessed by the transaction of the first thread, and (2) referring to a blocked transaction index of the doubly-indexed data structure that indexes each blocked transaction and corresponding memory addresses of each blocked transaction;
determining the memory is available based on the detecting that the at least one transaction has committed data to the memory;
initiating execution of the blocked transaction of the first thread based on the determining that the memory is available, wherein the initiating includes first referencing the accessed address index to identify each memory location affected by the at least one committed transaction, and then rescheduling each blocked transaction in the blocked transaction index; and
executing the blocked transaction of the first thread.
2 Assignments
0 Petitions
Accused Products
Abstract
The described implementations relate to efficient scheduling of transactions and tasks. A memory location, address, or variable previously accessed by a blocked entity is observed periodically to determine an appropriate time to wake and retry the blocked entity. If the previous accessed memory location, address or variable changes state, a scheduler wakes the blocked entity and the blocked entity retries processing. A doubly-indexed data structure of blocked entities and memory locations associated with the blocked entities may be used to efficiently determine when a retrying execution would be profitable.
-
Citations
15 Claims
-
1. A method implemented by a computer device, the method comprising:
-
determining a transaction of a first thread being executed is blocked from accessing a memory of the computing device by a second thread; waiting for at least one transaction of the second thread to commit; detecting that the at least one transaction has committed data to the memory, the at least one transaction having changed the content of the memory that the transaction of the first thread has been blocked from accessing, wherein the detecting includes (1) referring to an accessed address index of a doubly-indexed data structure that lists each memory address that is blocked from being accessed by the transaction of the first thread, and (2) referring to a blocked transaction index of the doubly-indexed data structure that indexes each blocked transaction and corresponding memory addresses of each blocked transaction; determining the memory is available based on the detecting that the at least one transaction has committed data to the memory; initiating execution of the blocked transaction of the first thread based on the determining that the memory is available, wherein the initiating includes first referencing the accessed address index to identify each memory location affected by the at least one committed transaction, and then rescheduling each blocked transaction in the blocked transaction index; and executing the blocked transaction of the first thread. - View Dependent Claims (2)
-
-
3. A method implemented by a computer device, the method comprising:
-
accounting for blocked entities in a computer device, wherein each blocked entity is one of a thread, a thread transaction, or a task having one or more associated transactions; and retrying an execution of a blocked entity based on a reference to a doubly-indexed data structure, wherein; one index of the doubly-indexed data structure includes references identifying each of the blocked entities and corresponding memory addresses to be accessed by the respective blocked entity, and another index of the doubly-indexed data structure includes references to each memory location that each blocked entity attempted to access wherein blocking occurred; and a blocked entity is an entity blocked from accessing a memory address of the computer device due to the memory address being in use by a second entity, wherein the retrying includes referencing each of the two indexes of the doubly-indexed data structure before retrying the blocked entity;
first referencing the another index to identify each memory location affected by a committed transaction, and then rescheduling each of the blocked entities in the one index of the doubly-indexed data structure that includes references identifying each of the blocked entities and corresponding memory addresses to be accessed by the respective blocked entity. - View Dependent Claims (4, 5, 6, 7, 14, 15)
-
-
8. A method implemented by a computer device, the method comprising:
-
maintaining a data structure comprising; an index of entities blocked from accessing memory addresses of the computing device wherein each of the entities comprises a thread, a thread transaction, and a task having associated transactions, and wherein each entry of the index of entities comprises memory addresses corresponding to and affected by each respective blocking transaction; and an index of memory addresses, and corresponding blocked entities, that blocked entities attempted to access before being blocked; referencing the index of entities of the data structure to identify each memory location affected by a blocking transaction after the blocking transaction commits; rescheduling each of the blocked entities in the index of memory addresses of the data structure after the blocking transaction commits; and retrying an execution of the blocked entity following the referencing of the index of entities and the index of memory addresses. - View Dependent Claims (9, 10, 11, 12, 13)
-
Specification