Claims
- 1. A method for managing contention for data objects that are accessed during execution of one or more tasks, the method comprising the steps of:dividing said one or more tasks into work granules; determining a set of data objects that must be accessed during execution of the work granules; and selecting which work granule from a plurality of currently unassigned work granules of said one or more tasks to assign to a process based on: (a) how many processes are currently accessing each data object in said set of data objects, and (b) the data object associated with each of said currently unassigned work granules.
- 2. The method of claim 1, wherein:the step of determining a set of data objects includes selecting a subset of said set of data objects; and the step of selecting which work granule includes selecting which work granule from a plurality of currently unassigned work granules of said one or more tasks to assign to a process based on: (a) how many processes are currently accessing each data object in said subset of data objects, and (b) the data object from said subset of data objects associated with each of said currently unassigned work granules.
- 3. The method of claim 2, wherein the step of selecting a subset of said set of data objects includes:identifying a node on which said process executes; and determining whether a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has an affinity for said node; and if a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has an affinity for said node, then selecting a currently unassigned work granule that has an affinity for said node.
- 4. The method of claim 3, further including performing, if a subset of data objects will not be accessed during the execution of at least one currently unassigned work granule that has an affinity for said node, the steps ofdetermining whether a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has no affinity for any node; and if a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has no affinity for any node, then selecting a currently unassigned work granule that has no affinity for any node.
- 5. The method of claim 4, further including performing, if a subset of data objects will not be accessed during the execution of at least one currently unassigned work granule that has no affinity for any node, the step of selecting a currently unassigned work granule that has an affinity for another node.
- 6. The method of claim 1, wherein each data object from said set of data objects is associated with a load that represents a number of processes currently assigned a work granule that requires access to said each data object, wherein the step of selecting which work granule includes:determining a target load of processes that is equal to a minimum load of any data object from said set of data objects that is accessed by currently unassigned work granules; selecting a data object, accessed by at least one work granule from said plurality of currently unassigned work granules, that has a load not greater than said target load; and selecting to assign to said process a currently unassigned work granule that accesses said data object.
- 7. The method of claim 6, wherein the step of selecting a data object includes:randomly selecting a data object from said set of data objects; determining whether the load for said data object is not greater than said target load; and wherein the step of selecting to assign to said process is performed when said load for said data object is not greater than said target load.
- 8. The method of claim 6, further including the step of selecting another data object from said set of data objects that has a load that is not greater than said target load when said load for said data object is greater than said target load.
- 9. The method of claim 6, wherein the plurality of processes has a quantity of processes, the method further including the steps of:in response to said process completing execution of a particular work granule, determining that the quantity of processes is an even multiple of a quantity of work granules in a set of work granules, wherein said set of work granules consists of the particular work granule and any uncompleted work granules currently assigned to said plurality of processes; and in response to determining that the quantity of processes is an even multiple, assigning another currently unassigned work granule that accesses said data object.
- 10. The method of claim 8, wherein said set of data objects is associated with an order, wherein the step of selecting another data object includes selecting a data object that is next in order and that has a load not greater than said target load.
- 11. The method of claim 1, wherein:the step of dividing said one or more tasks includes dividing a task into a subset of work granules based on database partitions that will be accessed during execution of said subset of work granules; and the step of determining a set of data objects that must be accessed during execution of the work granules includes determining a set of data objects accessed by said subset of work granules.
- 12. The method of claim 1, wherein said processes include processes executing work granules from multiple tasks.
- 13. A computer-readable medium carrying one or more sequences of one or more instructions for managing contention for data objects that are accessed during execution of one or more tasks, the one or more sequences of one or more instructions including instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:dividing said one or more tasks into work granules; determining a set of data objects that must be accessed during execution of the work granules; and selecting which work granule from a plurality of currently unassigned work granules of said one or more tasks to assign to a process based on: (a) how many processes are currently accessing each data object in said set of data objects, and (b) the data object associated with each of said currently unassigned work granules.
- 14. The computer-readable medium of claim 13, wherein:the step of determining a set of data objects includes selecting a subset of said set of data objects; and the step of selecting which work granule includes selecting which work granule from a plurality of currently unassigned work granules of said one or more tasks to assign to a process based on: (a) how many processes are currently accessing each data object in said subset of data objects, and (b) the data object from said subset of data objects associated with each of said currently unassigned work granules.
- 15. The computer-readable medium of claim 14, wherein the step of selecting a subset of said set of data objects includes:identifying a node on which said process executes; and determining whether a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has an affinity for said node; and if a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has an affinity for said node, then selecting a currently unassigned work granule that has an affinity for said node.
- 16. The computer-readable medium of claim 15, further including sequences of instructions for performing, if a subset of data objects will not be accessed during the execution of at least one currently unassigned work granule that has an affinity for said node, the steps ofdetermining whether a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has no affinity for any node; and if a subset of data objects will be accessed during the execution of at least one currently unassigned work granule that has no affinity for any node, then selecting a currently unassigned work granule that has no affinity for any node.
- 17. The computer-readable medium of claim 16, further including sequences of instructions for performing, if a subset of data objects will not be accessed during the execution of at least one currently unassigned work granule that has no affinity for any node, the step of selecting a currently unassigned work granule that has an affinity for another node.
- 18. The computer-readable medium of claim 13, wherein each data object from said set of data objects is associated with a load that represents a number of processes currently assigned a work granule that requires access to said each data object, wherein the step of selecting which work granule includes:determining a target load of processes that is equal to a minimum load of any data object from said set of data objects that is accessed by currently unassigned work granules; selecting a data object, accessed by at least one work granule from said plurality of currently unassigned work granules, that has a load not greater than said target load; and selecting to assign to said process a currently unassigned work granule that accesses said data object.
- 19. The computer-readable medium of claim 18, wherein the step of selecting a data object includes:randomly selecting a data object from said set of data objects; determining whether the load for said data object is not greater than said target load; and wherein the step of selecting to assign to said process is performed when said load for said data object is not greater than said target load.
- 20. The computer-readable medium of claim 18, further including the step of selecting another data object from said set of data objects that has a load that is not greater than said target load when said load for said data object is greater than said target load.
- 21. The computer-readable medium of claim 18, wherein the plurality of processes has a quantity of processes, the computer-readable medium further including sequences of instructions for performing the steps of:in response to said process completing execution of a particular work granule, determining that the quantity of processes is an even multiple of a quantity of work granules in a set of work granules, wherein said set of work granules consists of the particular work granule and any uncompleted work granules currently assigned to said plurality of processes; and in response to determining that the quantity of processes is an even multiple, assigning another currently unassigned work granule that accesses said data object.
- 22. The computer-readable medium of claim 20, wherein said set of data objects is associated with an order, wherein the step of selecting another data object includes selecting a data object that is next in order and that has a load not greater than said target load.
- 23. The computer-readable medium of claim 13, wherein:the step of dividing said one or more tasks includes dividing a task into a subset of work granules based on database partitions that will be accessed during execution of said subset of work granules; and the step of determining a set of data objects that must be accessed during execution of the work granules includes determining a set of data objects accessed by said subset of work granules.
- 24. The computer-readable medium of claim 13, wherein said processes include processes executing work granules from multiple tasks.
Parent Case Info
This application is a continuation-in-part of application Ser. No. 09/406,482, filed on Sep. 27, 1999, entitled PARALLEL PARTITION-WISE JOINS, by the following named inventor(s): MOHAMED ZAIT, BENOIT DAGEVILLE.
US Referenced Citations (18)
Continuation in Parts (1)
|
Number |
Date |
Country |
| Parent |
09/406482 |
Sep 1999 |
US |
| Child |
09/415033 |
|
US |