Digital data processing apparatus having hardware multithreading support including a register set reserved for special class threads
AssigneeInternational Business Machines Corporation
InventorDavid Alan Kra
Life of this patent
Estimating the term…
Abstract
Asymmetric hardware support for a special class of threads is provided. Preferably, the special class threads are high-priority, I/O bound threads. In a first aspect, a multithreaded processor contains N sets of registers for supporting concurrent execution of N threads. At least one of the register sets is dedicated for use by a special class of threads, and can not be used by other threads even if idle. In a second aspect, the special class of threads can fill only the a limited portion of the cache memory, in order to reduce flushing of the cache which might otherwise occur.
Claims20
A method for dispatching threads to a multithreaded processor in a data processing system, said multithreaded processor containing a plurality of register sets for supporting the maintenance of thread state and concurrent execution of a plurality of threads, each register set of said plurality of register sets corresponding to a respective thread being concurrently executed by said multithreaded processor and containing a respective plurality of processor registers for storing processor execution state of the corresponding respective thread, said method comprising the steps of:
- identifying a first subset of threads dispatchable to said multithreaded processor as threads of a special class, said first subset comprising a plurality of threads dispatchable to said multithreaded processor and being fewer than all threads dispatchable to said multithreaded processor;
- dispatching said dispatchable threads to said multithreaded processor for execution;
- wherein said dispatching step comprises, with respect to each instance of dispatching a dispatchable thread to said multithreaded processor for execution, identifying a corresponding register set from among said plurality of register sets for exclusive use by the respective dispatchable thread being dispatched for the duration of a time the respective dispatchable thread being dispatched is active in said multithreaded processor,
- wherein at least one register set of said plurality of register sets is reserved for use by dispatchable threads of said special class, and can be identified by said dispatching step as a corresponding register set from among said plurality of register sets for exclusive use by the respective dispatchable thread being dispatched only for dispatchable threads of said special class;
- wherein, if none of said dispatchable threads of said special class is available for dispatch to said multithreaded processor and a register set which is reserved for use by dispatchable threads of said special class is not being used by any thread executing in said multithreaded processor, then the register set which is reserved for use by dispatchable threads of said special class remains unused until a dispatchable thread of said special class is available for dispatch to said multithreaded processor, notwithstanding that one or more dispatchable threads not of said special class is available for dispatch to said multithreaded processor.
A method for executing threads in a multithreaded processor of a digital data processing system, said multithreaded processor containing a plurality of register sets for supporting concurrent execution of a plurality of active threads in said multithreaded processor, each register set corresponding to a respective one of said active threads and containing a respective plurality of processor registers, the method comprising the steps of:
- identifying a subset of said threads as threads of a special class, wherein said subset contains a plurality of said threads and wherein a plurality of said threads are not contained in said subset;
- activating each respective thread for execution in said multithreaded processor;
- assigning a respective unused register set of said plurality of register sets to each thread activated for execution in said multithreaded processor for maintenance of processor execution state of the corresponding thread in the processor registers of the register set while the corresponding thread is active in said multithreaded processor, wherein at least one register set of said plurality of registers sets is permanently reserved for exclusive use by said threads of said special class and not available for assignment to threads not belonging to said special class;
- and
- relinquishing the respective register set for use by another thread when the corresponding thread to which the register set was assigned by said assigning step is no longer active in said multithreaded processor;
- wherein, if none of said threads of said special class is available for execution in said multithreaded processor and a register set which is permanently reserved for exclusive use by threads of said special class is not being used by any thread executing in said multithreaded processor, then the register set which is permanently reserved for exclusive use by threads of said special class remains unused until a thread of said special class is available for execution in said multithreaded processor, notwithstanding that one or more threads not belonging to said special class is available for execution in said multithreaded processor.
A digital data processing device, comprising:
- a processor, said processor containing a plurality of register sets for supporting the maintenance of thread state and concurrent execution of a plurality of threads, each register set of said plurality of register sets corresponding to a respective thread being concurrently executed by said processor and containing a respective plurality of processor registers for storing processor execution state of the corresponding respective thread;
- a memory for storing instructions executable by said processor;
- an operating system embodied as a plurality of processor-executable instructions, said operating system including a dispatcher for selecting threads for dispatch to said processor, wherein each instance of dispatching a thread to said processor includes associating a corresponding register set from among said plurality of register sets for exclusive use by the respective thread being dispatched for the duration of a time the respective thread being dispatched is active in said processor;
- wherein said threads include a plurality of threads of a special class and a plurality of threads not belonging to said special class, and wherein at least one said register set is reserved for use by said threads of a special class, and can be associated in an instance of dispatching a thread as a corresponding register set from among said plurality of register sets for exclusive use by the respective thread being dispatched only for threads of said special class;
- wherein, if none of said threads of said special class is available for dispatch to said processor and a register set which is reserved for use by threads of said special class is not being used by any thread executing in said processor, then the register set which is reserved for use by threads of said special class remains unused until a thread of said special class is available for dispatch to said processor, notwithstanding that one or more threads not belonging to said special class is available for dispatch to said processor.
A computer readable medium comprising a computer program product for supporting dispatching functions, comprising:
- a dispatcher for a multithreaded processor implemented as a plurality of computer-executable instructions tangibly recorded on computer-readable recording media, wherein said instructions, when executed by at least one computer system, cause the at least one computer system to select threads for dispatch to said multi-threaded processor;
- wherein said multi-threaded processor contains a plurality of register sets for supporting the maintenance of thread state and concurrent execution of a plurality of threads, each register set of said plurality of register sets corresponding to a respective thread being concurrently executed by said multi-threaded processor and containing a respective plurality of processor registers for storing processor execution state of the corresponding respective thread;
- wherein, upon each instance of dispatching a thread to said multi-threaded processor, said dispatcher selects a corresponding register set from among said plurality of registers sets of said multi-threaded processor to which the respective thread is being dispatched for exclusive use by the respective thread being dispatched for the duration of a time the respective thread being dispatched is active in said multi-threaded processor;
- and
- wherein said threads include a plurality of threads of a special class and a plurality of threads not belonging to said special class, and wherein at least one said register set is reserved for use by said threads of a special class, and can be selected by said dispatcher as a corresponding register set from among said plurality of registers sets for exclusive use by the respective thread being dispatched only for threads of said special class
- wherein, if none of said threads of said special class is available for dispatch to said multi-threaded processor and a register set which is reserved for use by threads of said special class is not being used by any thread executing in said multi-threaded processor, then the register set which is reserved for use by threads of said special class remains unused until a thread of said special class is available for dispatch to said multi-threaded processor, notwithstanding that one or more threads not belonging to said special class is available for dispatch to said multi-threaded processor.
Dependencies are inferred from the claim text.