System and method for out-of-order resource allocation and deallocation in a threaded machine
First Claim
1. A method, comprising:
- performing, by a computer processor core;
allocating two or more of a plurality of downstream resources of the computer processor core to one or more of a plurality of threads, wherein the plurality of downstream resources comprise two or more elements of a branch predictor structure, an instruction issue structure, a register mapping table, a translation lookaside buffer, a reorder buffer, a load buffer, a store buffer or a pick queue downstream from pre-execution instruction buffer within an instruction processing pipeline of the computer processor core and are dynamically shared between the plurality of threads, wherein allocating the two or more of the plurality of downstream resources of the computer processor core includes allocating each respective one of the two or more of the plurality of downstream resources of the computer processor core to a respective instruction of a respective thread of said one or more of the plurality of threads, said allocating comprising, for individual ones of the respective instructions;
examining contents of individual elements of a data structure in a sequential order of the data structure until a first element in the sequential order of the data structure is located that indicates a corresponding one of the downstream resources is available, wherein the examination is performed before the respective downstream resource for the respective instruction is requested;
updating the located element of the data structure to indicate that the respective downstream resource has been allocated to the respective instruction of the respective thread, wherein the data structure comprises a plurality of sequentially addressable elements, each element mapped to a respective downstream resource of the plurality of downstream resources for indicating allocation of the respective downstream resource, wherein the two or more updated elements corresponding to the two or more downstream resources are updated in an order; and
deallocating at least one of the plurality of downstream resources after the at least one downstream resource has been released for the respective instruction of the respective thread of said one or more of the plurality of threads, said deallocating comprising updating the data structure to indicate that the at least one of the plurality of downstream resources has been deallocated, wherein the deallocated downstream resource is available for allocation to an instruction of a different thread of the plurality threads;
wherein said deallocating updates at least one element of the data structure in a different order than the order for said allocating.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for managing the dynamic sharing of processor resources between threads in a multi-threaded processor are disclosed. Out-of-order allocation and deallocation may be employed to efficiently use the various resources of the processor. Each element of an allocate vector may indicate whether a corresponding resource is available for allocation. A search of the allocate vector may be performed to identify resources available for allocation. Upon allocation of a resource, a thread identifier associated with the thread to which the resource is allocated may be associated with the allocate vector entry corresponding to the allocated resource. Multiple instances of a particular resource type may be allocated or deallocated in a single processor execution cycle. Each element of a deallocate vector may indicate whether a corresponding resource is ready for deallocation. Examples of resources that may be dynamically shared between threads are reorder buffers, load buffers and store buffers.
20 Citations
19 Claims
-
1. A method, comprising:
-
performing, by a computer processor core; allocating two or more of a plurality of downstream resources of the computer processor core to one or more of a plurality of threads, wherein the plurality of downstream resources comprise two or more elements of a branch predictor structure, an instruction issue structure, a register mapping table, a translation lookaside buffer, a reorder buffer, a load buffer, a store buffer or a pick queue downstream from pre-execution instruction buffer within an instruction processing pipeline of the computer processor core and are dynamically shared between the plurality of threads, wherein allocating the two or more of the plurality of downstream resources of the computer processor core includes allocating each respective one of the two or more of the plurality of downstream resources of the computer processor core to a respective instruction of a respective thread of said one or more of the plurality of threads, said allocating comprising, for individual ones of the respective instructions; examining contents of individual elements of a data structure in a sequential order of the data structure until a first element in the sequential order of the data structure is located that indicates a corresponding one of the downstream resources is available, wherein the examination is performed before the respective downstream resource for the respective instruction is requested; updating the located element of the data structure to indicate that the respective downstream resource has been allocated to the respective instruction of the respective thread, wherein the data structure comprises a plurality of sequentially addressable elements, each element mapped to a respective downstream resource of the plurality of downstream resources for indicating allocation of the respective downstream resource, wherein the two or more updated elements corresponding to the two or more downstream resources are updated in an order; and deallocating at least one of the plurality of downstream resources after the at least one downstream resource has been released for the respective instruction of the respective thread of said one or more of the plurality of threads, said deallocating comprising updating the data structure to indicate that the at least one of the plurality of downstream resources has been deallocated, wherein the deallocated downstream resource is available for allocation to an instruction of a different thread of the plurality threads; wherein said deallocating updates at least one element of the data structure in a different order than the order for said allocating. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A processor, comprising:
-
a plurality of downstream resources of the processor accessible to a plurality of threads executing on the processor, wherein the plurality of downstream resources comprise two or more elements of a branch predictor structure, an instruction issue structure, a register mapping table, a translation lookaside buffer, a reorder buffer, a load buffer, a store buffer or a pick queue downstream from pre-execution instruction buffer within an instruction processing pipeline of the processor and are dynamically shared between the plurality of threads; and a select unit configured to; allocate two or more of the plurality of downstream resources of the processor to a respective instruction of a respective thread of one or more of the plurality of threads, wherein to allocate two or more of the plurality of downstream resources the select unit is further configured to, for individual ones of the respective instructions; examine contents of individual elements of a data structure in a sequential order of the data structure until a first element in the sequential order of the data structure is located that indicates a corresponding one of the downstream resources is available, wherein the examination is performed before the respective downstream resource for the respective instruction is requested; update the located respective element of the data structure instantiated in a memory accessible to the processor to indicate that the respective downstream resource has been allocated to the respective instruction of the respective thread, wherein the data structure comprises a plurality of sequentially addressable elements, each element mapped to a respective downstream resource of the plurality of downstream resources for indicating allocation of the respective downstream resource, wherein two or more updated elements corresponding to the two or more allocated downstream resources are updated in an order; and deallocate at least one of the plurality of downstream resources after the at least one downstream resource has been released for the respective instruction of the respective thread of said one or more of the plurality of threads, wherein to deallocate at least one of the plurality of downstream resources the select unit is further configured to; update the data structure to indicate that the at least one of the plurality of downstream resources has been deallocated, wherein the deallocated downstream resource is available for allocation to an instruction of a different thread of the plurality threads; wherein said deallocating updates at least one element of the data structure in a different order than the order for said allocating. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A system, comprising:
-
a processor; and a memory coupled to the processor; wherein the processor comprises a select unit configured to; allocate two or more of a plurality of downstream resources of the processor to a respective instruction of a respective thread of one or more of a plurality of threads, wherein the plurality of downstream resources comprise two or more elements of a branch predictor structure, an instruction issue structure, a register mapping table, a translation lookaside buffer, a reorder buffer, a load buffer, a store buffer or a pick queue downstream from pre-execution instruction buffer within an instruction processing pipeline of the processor and are dynamically shared between the plurality of threads, said allocating comprising, for individual ones of the respective instructions; examining contents of individual elements of a data structure in a sequential order of the data structure until a first element in the sequential order of the data structure is located that indicates a corresponding one of the downstream resources is available, wherein the examination is performed before the respective downstream resource for the respective instruction is requested; updating the located element of the data structure instantiated in the memory to indicate that the respective downstream resource has been allocated to the respective instruction of the respective thread, wherein the data structure comprises a plurality of sequentially addressable elements, each element mapped to a respective downstream resource of the plurality of downstream resources for indicating allocation of the respective downstream resource, wherein the two or more updated elements corresponding to the two or more downstream resources are updated in an order; and deallocate at least one of the plurality of downstream resources after the at least one downstream resource has been released for the respective instruction of the respective thread of said one or more of the plurality of threads; and update the data structure to indicate that the at least one of the plurality of downstream resources has been deallocated, wherein the deallocated downstream resource is available for allocation to an instruction of a different thread of the plurality threads; wherein said deallocating updates at least one element of the data structure in a different order than the order for said allocating. - View Dependent Claims (17, 18, 19)
-
Specification