WO2005022385A1 - Mechanisms for dynamic configuration of virtual processor resources - Google Patents

Mechanisms for dynamic configuration of virtual processor resources Download PDF

Info

Publication number
WO2005022385A1
WO2005022385A1 PCT/US2004/027976 US2004027976W WO2005022385A1 WO 2005022385 A1 WO2005022385 A1 WO 2005022385A1 US 2004027976 W US2004027976 W US 2004027976W WO 2005022385 A1 WO2005022385 A1 WO 2005022385A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual
resources
recited
virtual processing
multiprocessor
Prior art date
Application number
PCT/US2004/027976
Other languages
French (fr)
Inventor
Kevin Kissell
Original Assignee
Mips Technologies, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US10/684,348 external-priority patent/US20050050305A1/en
Application filed by Mips Technologies, Inc. filed Critical Mips Technologies, Inc.
Priority to EP04782455A priority Critical patent/EP1660998A1/en
Priority to JP2006524900A priority patent/JP4740851B2/en
Publication of WO2005022385A1 publication Critical patent/WO2005022385A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4441Reducing the execution time required by the program code
    • G06F8/4442Reducing the number of cache misses; Data prefetching

Definitions

  • the present invention relates in general to the field of virtual multiprocessors, and in particular to mechanisms that provide for dynamic configuration of resources within a virtual multiprocessor between one or more virtual processing elements.
  • microprocessors operate using a clock signal running at a fixed frequency. Each clock cycle, the circuits of the microprocessor perform their respective functions. According to Hennessy and Patterson, the true measure of a microprocessor's performance is the time required to execute a program or collection of programs. From this perspective, the performance of a microprocessor is a function of its clock frequency, the average number of clock cycles required to execute an instruction (or alternately stated, the average number of instructions executed per clock cycle), and the number of instructions executed in the program or collection of programs. Semiconductor scientists and engineers continue to provide advances in the art that enable microprocessors to run at increasingly faster clock frequencies.
  • Pipelining overlaps execution of multiple instructions within pipeline stages of the microprocessor in a manner substantially similar to stages in an assembly line. In an ideal situation, each clock cycle one instruction moves down the pipeline to a new stage, which performs a different function on the instructions. Thus, although each individual instruction takes multiple clock cycles to complete, because the multiple cycles of the individual instructions overlap, the average clocks per instruction is reduced.
  • the parallelism mechanisms discussed above pertain to parallelism at the individual instruction-level.
  • the performance improvement that may be achieved through exploitation of instruction-level parallelism is limited.
  • Various constraints imposed by limited instruction-level parallelism and other performance- constraining issues have recently renewed an interest in exploiting parallelism at the level of blocks, or sequences, or streams, or threads of instructions.
  • This level of parallelism is commonly referred to as thread-level parallelism.
  • a thread is simply a sequence, or stream, of program instructions.
  • a multithreaded microprocessor concurrently executes multiple threads according to some scheduling policy that dictates the fetching and issuing of instructions of the various threads, such as interleaved, blocked, or simultaneous multithreading.
  • a multithreaded microprocessor typically allows the multiple threads to share the functional units of the microprocessor (e.g., instruction fetch and decode units, caches, branch prediction units, and load/store, integer, floating-point, SIMD, etc. execution units) in a concurrent fashion.
  • multithreaded microprocessors include multiple sets of hardware/firmware resources, or thread contexts, for storing the unique state of each thread to facilitate the ability to quickly switch between threads to fetch and issue instructions.
  • each thread context includes its own program counter for instruction fetching and thread identification information, and typically also includes its own general purpose register set.
  • One example of a performance-constraining issue addressed by multithreading microprocessors is the fact that accesses to memory outside the microprocessor that must be performed due to a cache miss typically have a relatively long latency.
  • the memory access time of a contemporary microprocessor-based computer system is commonly between one and two orders of magnitude greater than the cache hit access time. Consequently, while the pipeline is stalled waiting for the data from memory, some or all of the pipeline stages of a single-threaded microprocessor may be idle performing no useful work for many clock cycles.
  • Multithreaded microprocessors may alleviate this problem by issuing instructions from other threads during the memory fetch latency, thereby enabling the pipeline stages to make forward progress performing useful work, somewhat analogously to, but at a finer level of granularity than, an operating system performing a task switch in response to a page fault.
  • Other examples of performance- constraining issues are pipeline stalls and their accompanying idle cycles due to a branch misprediction and concomitant pipeline flush, or due to a data dependence, or due to a long latency instruction such as a divide instruction.
  • the ability of a multithreaded microprocessor to issue instructions from other threads to pipeline stages that would otherwise be idle may significantly reduce the time required to execute the program or collection of programs comprising the threads.
  • the microprocessor switches control to an interrupt service routine, which requires saving of the current program state, servicing the interrupt, and restoring the current program state after the interrupt has been serviced.
  • a multithreaded microprocessor provides the ability for event service code to be its own thread having its own thread context. Consequently, in response to the input/output device signaling an event, the microprocessor can quickly - perhaps in a single clock cycle - switch to the event service thread, thereby avoiding incurring the conventional interrupt service routine overhead.
  • the degree of instruction-level parallelism dictates the extent to which a microprocessor may take advantage of the benefits of pipelining and superscalar instruction issue
  • the degree of thread-level parallelism dictates the extent to which a microprocessor may take advantage of multithreaded execution.
  • An important characteristic of a thread is its independence of the other threads being executed on the multithreaded microprocessor.
  • a thread is independent of another thread to the extent its instructions do not depend on instructions in other threads.
  • the independent characteristic of threads enables the microprocessor to execute the instructions of the various threads concurrently. That is, the microprocessor may issue instructions of one thread to execution units without regard to the instructions being issued of other threads.
  • the threads themselves must be programmed to synchronize data accesses with one another to insure proper operation such that the microprocessor instruction issue stage does not need to be concerned with the dependences.
  • a processor with multiple thread contexts concurrently executing multiple threads may reduce the time required to execute a program or collection of programs comprising the multiple threads.
  • the introduction of multiple thread contexts also introduces a new set of problems, particularly for system software, to manage the multiple instruction streams and their associated thread contexts.
  • the present inventors have noted yet another level that is required for improving the parallelism associated with instruction execution in a microprocessor. In this and related applications, the present inventors address the provision of virtual processing elements within the same microprocessor.
  • a multithreaded virtual processing element in addition to implementing multiple program counters and thread contexts to ensure the effective switching of program threads, implements all of the resources necessary to provide for a single instantiation of a given instruction set and privileged resource architecture that is sufficient to execute a per-processor operating system image.
  • a microprocessor that implements N virtual processing elements i.e., a "virtual multiprocessor" having N virtual processing elements
  • the physical difference between a virtual multiprocessor according to the present invention and a conventional symmetric multiprocessor is that, in addition to sharing memory and some level of connectivity, the virtual processing elements within a virtual multiprocessor also share on-chip resources, or attributes, of the virtual multiprocessor such as, for example, instruction fetch and issue logic; address translation logic (e.g., translation lookaside buffer logic); functional units such as integer units, floating point units, multimedia units, media acceleration units, and SIMD units; and coprocessors.
  • the virtual processing units must share performance attributes, or utilization aspects (e.g., "bandwidth), of the virtual multiprocessor, which are determined largely based upon the number of threads that are allocated to each of the virtual processing elements, the extent that the threads associated with one virtual processing element can take priority over the threads associated with other virtual processing elements when execution is required, and the allocation of certain processor-wide resources (e.g., load/store buffers) to the virtual processing elements.
  • performance attributes or utilization aspects (e.g., "bandwidth)
  • bandwidth e.g., "bandwidth”
  • these tasks might be accomplished by using two different processors: a real-time digital signal processor to handle the multimedia data and an interactive processor core which runs a multitasking operating system. Yet, the present invention allows for these two functions to be performed on the same virtual multiprocessor. Two virtual processing elements of the virtual multiprocessor would be employed: one dedicated to performing the multimedia processing tasks, and the other dedicated to performing the user interface tasks.
  • an apparatus for configuring resources for one or more virtual processing elements in a virtual multiprocessor.
  • the apparatus includes a virtual multiprocessor context, one or more virtual processing element contexts, and configuration logic.
  • the virtual multiprocessor context prescribes the resources, and controls a configuration state of the virtual multiprocessor.
  • the one or more virtual processing element contexts each exclusively correspond to one of the one or more virtual processing elements.
  • the one or more virtual processing element contexts each have first logic, for prescribing whether the one of the one or more virtual processing elements is permitted to configure the resources; and second logic, for prescribing a subset of the resources that is allocated to said one of the one or more virtual processing elements.
  • the configuration logic is coupled to the virtual multiprocessor context and the one or more virtual processing element contexts. The configuration logic detects whether the one of the one or more virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.
  • One aspect of the present invention contemplates a resource configuration mechanism, for assigning resources to virtual processing elements within a virtual multiprocessor.
  • the resource configuration mechanism has virtual multiprocessor registers, virtual processing element registers for each of the virtual processing elements, and configuration logic.
  • the virtual multiprocessor registers prescribes the resources, and control a configuration state of the virtual multiprocessor.
  • the virtual processing element registers prescribe whether a corresponding virtual processing element is permitted to assign the resources, and prescribe a subset of the resources that is allocated to the corresponding virtual processing element.
  • the configuration logic is coupled to the virtual multiprocessor registers and the virtual processing element registers. The configuration logic detects whether the corresponding virtual processing element is permitted to assign the resources, updates the viitual multiprocessor registers to direct that the virtual multiprocessor enter the configuration state, and assigns the resources by updating selected ones of the virtual processing element registers.
  • the computer program product includes a computer usable medium, having computer readable program code embodied in the medium, configured to describe an apparatus for configuring resources for virtual processing elements in a virtual multiprocessor.
  • the computer readable program code has first program code, second program code, and third program code.
  • the first program code describes a virtual multiprocessor context.
  • the virtual multiprocessor context prescribes the resources, and controls a configuration state of the virtual multiprocessor.
  • the second program code describes virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, and prescribing whether the one of the virtual processing elements is permitted to configure the resources, and prescribing a subset of the resources that is allocated to the one of said virtual processing elements.
  • the third program code describes configuration logic.
  • the configuration logic is coupled to the virtual multiprocessor context and to the virtual processing element contexts. The configuration logic detects whether the one of the virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.
  • the present invention contemplates a computer data signal embodied in a transmission medium.
  • the computer data signal has computer-readable program code that is configured to describe an apparatus for configuring resources for virtual processing elements in a virtual multiprocessor.
  • the computer-readable program code includes first program code, second program code, and third program code.
  • the first program code describes a virtual multiprocessor context, where the virtual multiprocessor context prescribes the resources, and controls a configuration state of the virtual multiprocessor.
  • the second program code describes virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, and prescribing whether the one of the virtual processing elements is permitted to configure the resources, and prescribing a subset of the resources that is allocated to the one of said virtual processing elements.
  • the third program code describes configuration logic that is coupled to the virtual multiprocessor context and to the virtual processing element contexts.
  • the configuration logic detects whether the one of the virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.
  • the present invention embodies a method for configuring resources for virtual processing elements in a virtual multiprocessor.
  • the method includes: via a virtual multiprocessor context, first prescribing the resources, and controlling a configuration state of the virtual multiprocessor; via virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, second prescribing whether the one of the virtual processing elements is permitted to configure the resources, and third prescribing a subset of the resources that is allocated to the one of the virtual processing elements; and via configuration logic that is coupled to the virtual multiprocessor context and to the virtual processing element contexts, detecting whether the one of the virtual processing elements is permitted to configure the resources, and first updating the virtual multiprocessor context to direct that the virtual multiprocessor enter said configuration state, and configuring the resources by second updating a prescribed virtual processing element context.
  • the present invention comprehends a virtual multiprocessing system.
  • the virtual multiprocessing system has a memory and a virtual multiprocessor.
  • the memory stores program instructions associated with a plurality of program threads.
  • the virtual multiprocessor is coupled to the memory.
  • the virtual multiprocessor executes the program instructions on one or more virtual processing elements configured within the virtual multiprocessor.
  • the virtual multiprocessor has a virtual multiprocessor context that prescribes resources for configuration of the one or more virtual processing elements, and that controls a configuration state of the virtual multiprocessor.
  • Each of the one or more virtual processing elements includes a virtual processing element context and configuration logic.
  • the virtual processing element context prescribes whether the each of the one or more virtual processing elements is permitted to configure the resources, and prescribes a subset of the resources that is allocated to a prescribed one of the one or more virtual processing elements.
  • the configuration logic is coupled to the virtual multiprocessor context and the virtual processing element context. The configuration logic detects whether the each of the one or more virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context corresponding to the prescribed one of the one or more virtual processing elements.
  • FIGURE 1 is a block diagram illustrating a multiprocessing environment according to the present invention
  • FIGURE 2 is a block diagram featuring a virtual multiprocessor pipeline according to the present invention.
  • FIGURE 3 is a block diagram showing a dynamically configurable virtual multiprocessor according to the present invention.
  • FIGURE 4 is a table presenting virtual multiprocessing context registers in accordance with an exemplary embodiment of the present invention.
  • FIGURE 5 is a series of block diagrams illustrating exemplary embodiments of each of the virtual multiprocessing context registers of FIGURE 4;
  • FIGURE 6 is a flow chart depicting a method according to the present invention for dynamic configuration of virtual processor resources; and [0026]
  • FIGURE 7 is a flow chart depicting a revocable method according to the present invention for dynamic configuration of virtual processor resources.
  • the multiprocessing environment 100 includes a virtual multiprocessor 101 coupled to a system interface controller 105.
  • the system interface controller 105 is coupled to a system memory 106 and one or more input/output (I/O) devices 107.
  • I/O devices 107 provides an interrupt request line 108 to the virtual multiprocessor 101.
  • the virtual multiprocessor 101 includes one or more virtual processing elements 102.
  • Each of the one or more virtual processing elements 102 has a corresponding virtual processing element context 104 and one or more corresponding thread contexts 103.
  • the multiprocessing environment 100 may be, but is not limited to, a general purpose programmable computer system, server computer, workstation computer, personal computer, notebook computer, personal digital assistant (PDA), or embedded system such as, but not limited to, a network router or switch, printer, mass storage controller, camera, scanner, automobile controller, and the like.
  • the system memory 106 may be embodied as memory, such as RAM and ROM memory, for storing program instructions for execution on the virtual multiprocessor 101, and for storing data to be processed by the virtual multiprocessor 101 according to the program instructions.
  • the program instructions may comprise one or more program threads that the virtual multiprocessor 101 executes concurrently.
  • a program thread, or thread comprises a sequence, or stream, of program instructions and associated sequence of state changes in a corresponding virtual processing element 102 within the virtual multiprocessor 101 that are associated with the execution of the sequence of instructions.
  • Each thread context 103 comprises a hardware state necessary to support execution of a corresponding program thread.
  • each thread context includes a set of general purpose registers, a program counter, and other registers to preserve state of the executing thread such as multiplier state and coprocessor state.
  • Each of the virtual processing elements 102 provides resources to support an instantiation of a full instruction set architecture and privileged resource architecture that are sufficient to execute a per-processor operating system image. In one embodiment, each of the virtual processing elements 102 provide resources to support an instantiation of the full
  • Each of the virtual processing element contexts 104 comprises a hardware state necessary to support execution of the threads executing within a corresponding virtual processing element 102.
  • each of the virtual processing element contexts 104 prescribe resources that are allocated to a corresponding virtual processing element 102 such as address translation logic resources (e.g., translation lookaside buffer entries), functional units (e.g., integer units, floating point units, multimedia units and media acceleration units, SIMD units, coprocessors), and performance attributes.
  • the performance attributes comprise permission to halt and configure the resources allocated to other virtual processing elements 102, the number of and enumeration of threads, enablement/inhibition of the corresponding virtual processing element 102, and bandwidth-related resources (e.g., instruction execution bandwidth or priority, load/store bandwidth, etc.) of the virtual multiprocessor 101 that are allocated to the corresponding virtual processing element 102.
  • bandwidth-related resources e.g., instruction execution bandwidth or priority, load/store bandwidth, etc.
  • the present invention comprehends a variety of bandwidth allocation techniques to include scheduling hints, execution priority assignment, load/store buffer allocation, and the like.
  • the system interface controller 105 interfaces with the virtual multiprocessor 101 via a processor bus coupling the virtual multiprocessor 101 to the system interface controller 105.
  • the system interface controller 105 includes a memory controller for controlling the system memory 106.
  • the system interface controller 105 includes a local bus interface controller for providing a local bus, such as a PCI bus, to which the I/O devices 107 are coupled.
  • the I/O devices 107 may include, but are not limited to, user input devices such as keyboards, mice, scanners and the like; display devices such as monitors, printers and the like; storage devices such as disk drives, tape drives, optical drives and the like; system peripheral devices such as direct memory access controllers (DMAC), clocks, timers, I/O ports and the like; network devices such as media access controllers (MAC) for Ethernet, FibreChannel, Infmiband, or other high-speed network interfaces; data conversion devices such as analog-to-digital (A/D) converters and digital-to-analog converters; and so forth.
  • the I/O devices 107 generate the interrupt signals 108 to the virtual multiprocessor 101 to request service.
  • the virtual multiprocessor 101 is capable of concurrently executing multiple program threads for processing the events signified on the interrupt request lines 108 without requiring the conventional overhead associated with saving the state of the microprocessor 102, transferring control to an interrupt service routine, and restoring state upon completion of the interrupt service routine.
  • the virtual multiprocessor 101 provides two distinct, but not mutually-exclusive, multithreading capabilities.
  • the virtual multiprocessor comprises one or more virtual processing elements (VPEs) 102 to support a corresponding one or more logical processor contexts, each of which appears to an operating system as an independent processing element, through the sharing of resources in the virtual multiprocessor 101.
  • VPEs virtual processing elements
  • N VPEs 102 appears like an N-way symmetric multiprocessor (SMP), which allows existing SMP-capable operating systems to manage the one or more VPEs 102.
  • SMP N-way symmetric multiprocessor
  • each VPE 102 may also include one or more thread contexts 103 for simultaneously executing a corresponding one or more program threads.
  • the virtual multiprocessor 101 also provides a multithreaded programming model wherein program threads can be created and destroyed without operating system intervention in typical cases, and where system service threads can be scheduled in response to external conditions (e.g., input/output service event signals) with minimized interrupt latency.
  • external conditions e.g., input/output service event signals
  • each of the thread contexts 103 include one or more storage elements, such as registers or latches, having fields (e.g., bits) therein that describe the state of execution of a corresponding thread. That is, a given thread context 103 describes the state of its respective thread, which is unique to the thread, rather than state shared with other threads of execution executing concurrently on the virtual processing element 102.
  • a thread - also referred to herein as a program thread, thread of execution, or instruction stream - is a sequence of instructions.
  • Each of the virtual processing elements 102 is capable of concurrently executing multiple threads.
  • each of the virtual processing elements 102 within the virtual multiprocessor 101 is configured to quickly switch between threads to fetch and issue instructions.
  • the present virtual multiprocessor 101 is configured to execute instructions for moving thread context information between the various thread contexts 103, as is described in detail in co-pending U.S. Patent
  • each of the VPE contexts 104 includes a collection of storage elements, such as registers or latches, having fields (e.g., bits) therein that describe the state of execution of a corresponding VPE 102, and which provide for configuration of the resources for the corresponding VPE 102 such as, but not limited to, address translation resources, coprocessing resources (e.g. floating point processors, media processors, etc.), thread capacity and enumeration, permission to enable/inhibit execution of a specified VPE 102, and permission to configure the resources of a specified VPE 102.
  • a VPE 102 may configure its own resources by updating its
  • VPE context 104 the VPE 102 may configure the resources of a different
  • VPE 102 by updating the VPE context 104 that corresponds to the different VPE 102.
  • a virtual multiprocessor 101 with N VPEs 102 appears to an operating system or other symmetric multiprocessing application as an N-way symmetric multiprocessor.
  • the VPEs 102 share particular resources in the virtual multiprocessor 101 such as instruction cache, instruction fetcher, instruction decoder, instruction issuer, instruction scheduler, execution units and coprocessing unit, and data cache, transparently to the operating system.
  • the degree and extent that the resources are shared is prescribed by the VPE contexts 104 and may be dynamically configured at run time or other times by updating the VPE contexts 104. For a given
  • VPE 102 to configure its own resources or resources that are assigned to a different VPE
  • each VPE 102 substantially conforms to a MIPS32 or MIPS64 Instruction Set Architecture (ISA) and a MIPS Privileged Resource
  • PRA Physical Architecture
  • the VPE context 106 includes the VPECONTROL Register 504, VPECONF0 Register 505, VPECONF1 Register 506, and VPESCHEDULE Register 592 of Figures 5D-5G described below.
  • a VPE 102 may be viewed as an exception domain. That is, when one of the thread contexts 103 of a VPE 102 generates an exception, multithreading is suspended on the VPE 102 (i.e., only instructions of the instruction stream associated with the thread context 104 servicing the exception are fetched and issued), and each VPE context 104 includes the state necessary to service the exception. Once the exception is serviced, the exception handler may selectively re- enable multithreading on the VPE 102.
  • FIGURE 2 a block diagram is presented that illustrates a virtual multiprocessor pipeline 200 within a virtual multiprocessor according to the present invention.
  • the pipeline 200 includes a plurality of pipeline stages and additionally includes one or more thread contexts 103.
  • the exemplary embodiment of FIGURE 2 shows four thread contexts 103.
  • each thread context 103 comprises a program counter (PC) 222 for storing an address for fetching a next instruction in the associated instruction stream, a general purpose register (GPR) set 224 for storing intermediate execution results of the instruction stream issuing from the thread based on the program counter 222 value, and other per-thread context 226.
  • PC program counter
  • GPR general purpose register
  • the pipeline 200 includes a multiplier unit (not shown), and the other thread context 226 includes registers for storing results of the multiplier unit specifically associated with multiply instructions in the instruction stream.
  • the other thread context 226 includes information for uniquely identifying each thread context 103.
  • the thread identification information includes information for specifying the execution privilege level of the associated thread, such as whether the thread is a kernel, supervisor, or user level thread.
  • the thread identification information includes information for identifying a task or process comprising the thread.
  • the task identification information may be used as an address space identifier (ASID) for purposes of translating physical addresses into virtual addresses.
  • ASID address space identifier
  • the pipeline 200 includes a scheduler 216 for scheduling execution of the various threads being concurrently executed by the virtual multiprocessor 100.
  • the scheduler 216 is coupled to a VMP context 210, the VPE contexts 104 of FIGURE 1, and to the other per-thread contexts 226.
  • the scheduler 216 is responsible for scheduling fetching of instructions from the program counter 222 of the various thread contexts 104 and for scheduling issuing of the fetched instructions to execution units 212 of the virtual multiprocessor 100, as described below.
  • the scheduler 216 schedules execution of the threads based on a scheduling policy of the virtual multiprocessor 100.
  • the scheduling policy may include, but is not limited to, any of the following scheduling policies.
  • the scheduler 216 employs a round-robin, or time-division- multiplexed, or interleaved, scheduling policy that allocates a predetermined number of clock cycles or instruction issue slots to each ready thread in a rotating order.
  • the round- robin policy is useful in an application in which fairness is important and a minimum quality of service is required for certain threads, such as real-time application program threads.
  • the scheduler 216 employs a blocking scheduling policy wherein the scheduler 216 continues to schedule fetching and issuing of a currently running thread until an event occurs that blocks further progress of the thread, such as a cache miss, a branch misprediction, a data dependency, or a long latency instruction.
  • the pipeline 200 comprises a superscalar pipeline that employs multiple execution units 212, and the scheduler 216 schedules the issue of multiple instructions per clock cycle, and in particular, the issue of instructions from multiple threads per clock cycle, commonly referred to as simultaneous multithreading.
  • the scheduler 216 employs a scheduling policy that utilizes scheduling information provided via the VPE contexts 104 where the scheduling information indicates bandwidth and/or bandwidth-related resources that are allocated to each of the VPEs 102.
  • the pipeline 200 includes an instruction cache 202 for caching program instructions fetched from a system memory.
  • the pipeline 200 provides virtual memory capability
  • the fetch unit 204 includes a translation lookaside buffer (not shown) for caching physical to virtual memory page translations.
  • resources e.g., entries
  • each program, or task, executing in the pipeline 200 is assigned a unique task ID, or address space ID (ASID), which is used to perform memory accesses and in particular memory address translations, and a thread context 103 also includes storage for an ASID associated with the thread.
  • ASID address space ID
  • the pipeline 200 also includes a fetch unit 204, coupled to the instruction cache 202, for fetching program instructions from the instruction cache 202 and system memory.
  • the fetch unit 204 fetches instructions at an instruction fetch address provided by a multiplexer 244.
  • the multiplexer 244 receives a plurality of instruction fetch addresses from the corresponding plurality of program counters 222.
  • Each of the program counters 222 stores a current instruction fetch address for a different program thread.
  • the embodiment of Figure 2 illustrates four different program counters 222 associated with four different threads.
  • the multiplexer 244 selects one of the four program counters 222 based on a selection input provided by the scheduler 216. In one embodiment, the various threads executing on the microprocessor 100 share the fetch unit 204.
  • the pipeline 200 also includes a decode unit 206, coupled to the fetch unit 204, for decoding program instructions fetched by the fetch unit 204.
  • the decode unit 206 decodes the opcode, operand, and other fields of the instructions.
  • the various threads executing on the microprocessor 100 share the decode unit 206.
  • the pipeline 200 also includes execution units 212 for executing instructions.
  • the execution units 212 may include, but are not limited to, one or more integer units for performing integer arithmetic, Boolean operations, shift operations, rotate operations, and the like; floating point units for performing floating point operations; load/store units for performing memory accesses and in particular accesses to a data cache 242 coupled to the execution units 212; multimedia acceleration units for performing multimedia operations, and a branch resolution unit for resolving the outcome and target address of branch instructions.
  • the data cache 242 includes a translation lookaside buffer for caching physical to virtual memory page translations.
  • the execution units 212 In addition to the operands received from the data cache 242, the execution units 212 also receive operands from registers of the general purpose register sets 224. In particular, an execution unit 212 receives operands from a register set 224 of the thread context 104 allocated to the thread to which the instruction belongs. A multiplexer 248 selects operands from the appropriate register set 224 for provision to the execution units 212. In addition, the multiplexer 248 receives data from each of the other per-thread contexts 226 and program counters 222, for selective provision to the execution units 212 based on the thread context 104 of the instruction being executed by the execution unit 212. In one embodiment, the various execution units 212 may concurrently execute instructions from multiple concurrent threads.
  • the pipeline 200 also includes an instruction issue unit 208, coupled to the scheduler 216 and coupled between the decode unit 206 and the execution units 212, for issuing instructions to the execution units 212 as instructed by the scheduler 216, and in response to information about the instructions decoded by the decode unit 206.
  • the instruction issue unit 208 insures that instructions are not issued to the execution units 212 if they have data dependencies on other instructions previously issued to the execution units 212.
  • an instruction queue (not shown) is imposed between the decode unit 206 and the instruction issue unit 208 for buffering instructions awaiting issue to the execution units 212 for reducing the likelihood of starvation of the execution units 212.
  • the various threads executing in the pipeline 200 share the instruction issue unit 208.
  • the pipeline 200 also includes a write-back unit 214, coupled to the execution units 212, for writing back results of instructions into the general purpose register sets 224, program counters 222, and other thread contexts 226.
  • a demultiplexer 246 receives the instruction result from the write-back unit 214 and stores the instruction result into the appropriate register set 224, program counters 222, and other thread contexts 226 associated with the instruction's thread.
  • the instruction results are also provided for storage into the VPE contexts 104 and a virtual multiprocessor (VMP) context 210.
  • VMP virtual multiprocessor
  • the VMP context 210 comprises a collection of storage elements, such as registers or latches, having one of more fields (e.g., bits) in the storage elements that describe the state of execution of the virtual multiprocessor 101.
  • the VMP context 210 stores state related to global resources of the virtual multiprocessor 101 that are shared among the VPEs 102, as described hereinabove.
  • the VMP context prescribes resources that can be allocated to the VPEs 102 during configuration and also controls whether the virtual multiprocessor 101 is in a configuration state for configuration of the resources.
  • the VMP context 210 comprises an MVPCONTROL Register 501, MVPCONF0 Register 502, and MVPCONF1 Register 503 of FIGURES 5A-5C described below.
  • stages 202, 204, 206, 208, 212, 214 of the pipeline 200 of FIGURE 2 are provided to clearly teach the present invention without obfuscating essential aspects.
  • staging of the pipeline 200 may be modified by increasing or decreasing the number of stages, or by allocating functions differently to stages, to improve performance, without departing from the spirit and scope of the present invention.
  • FIGURE 3 a block diagram is presented showing a dynamically configurable virtual multiprocessor 300 according to the present invention.
  • the multiprocessor 300 includes one or more VPEs 302-304, enumerated as VPE 1 302, VPE
  • Each VPE 302-304 has a corresponding VPE context 305- 307.
  • the VPEs 302-304 are coupled to the execute logic 212, along with the VMP context 210, as described above with reference to FIGURE 2.
  • the execute logic 212 includes VPE configuration logic 310.
  • the VPE configuration logic 310 is coupled to an exception signal 311. Also shown in the block diagram are one or more resources 322, 324, 324, 326, 328 enumerated as RESOURCE 1 322, RESOURCE 2 324, RESOURCE
  • configuration of the resources 322-328 is accomplished by executing a configuration instruction sequence issued by a VPE 302-304 that is permitted to configure the resources 322-328.
  • permission to configure the resources 322-328 is prescribed by the VPE context 305-307 of the corresponding VPE 302-304.
  • the VPE configuration logic 310 accesses the VPE context 305- 307 that corresponds to the VPE 302-304 whose program thread caused the configuration instruction sequence to be fetched to determine whether the VPE 302-304 is permitted to configure the resources 322-328.
  • the configuration logic 310 causes the exception signal 311 to be asserted and the configuration instruction sequence is not executed. If the VPE 302-304 is permitted to configure the resources 322-328, then the VPE configuration logic 310 executes the configuration instruction sequence to direct the virtual multiprocessor 300 to enter a configuration state, and to update one or more prescribed VPE contexts 305-307, thus reconfiguring the resources. In one embodiment, the configuration instruction sequence directs the virtual multiprocessor 300 to enter the configuration state by updating the VMP context 210. In one embodiment, the sequence of configuration instructions comprises instructions conforming to the MIPS32/MIPS64 Multithreading (MT) Application Specific Extensions (ASE) architecture.
  • MT MIPS32/MIPS64 Multithreading
  • ASE Application Specific Extensions
  • the block diagram shows a particular embodiment of configured resources 322- 328 resulting from execution of the configuration instruction sequence, and diagrammatically illustrating how particular resources 322-328 can be dynamically configured according to the present invention to optimize performance of threads concurrently executing in a given multithreading multiprocessing application.
  • the diagrammatic division of RESOURCE 1 322 corresponds to address translation resources (e.g., translation lookaside buffer entries). From the division shown, it is indicated that VPE 1 302 is assigned a proportion of the address translation resources that is less than those allocated to the remaining VPEs 303-304. Perhaps the threads executing on VPE 1 302 are short and repetitive relative to other threads and thus do not require extensive address translation resources.
  • RESOURCE 2 324 represents contexts corresponding to multithreaded coprocessors (e.g., floating point element, media element, SIMD element, etc.). It is illustrated that VPE 2 303, as prescribed within its VPE context 306, is allocated a lesser number of contexts relative to the other VPEs 302, 307, perhaps due to the operations directed by instruction threads issued by VPE 2 303 which do not require extensive coprocessing resources. In addition, consider that RESOURCE 3 326 represents resource configuration permissions. As is diagrammatically represented, only VPE 2 303 is permitted to configure the resources 322-328 in the virtual multiprocessor 300.
  • VPE 302-304 may grant configuration permission to other VPEs 302-304, or revoke their configuration permissions, or revoke its own configuration permission. This is accomplished by updating prescribed VPE contexts 305-307 as described herein.
  • RESOURCE M 328 is a bandwidth resource that allocates bandwidth of the virtual multiprocessor 300 to its VPEs 302-304 in accordance with an implemented scheduling policy as described above. According, it is diagrammatically represented that each of the exemplary VPEs 302-304 are accorded equal portions of the multiprocessor bandwidth, either via direct execution bandwidth allocation, or by setting execution priorities approximately equal, or by some other technique for prescribing bandwidth or bandwidth-related resources.
  • One such technique for prescribing bandwidth-related resources that is contemplated by the present invention is allocation of load/store bandwidth to the VPEs 302-304. For example, if the number of memory operation buffers (not shown) in the virtual multiprocessor 300 which are shared among the VPEs 302-304 is less than the number of executing threads, then prior to executing the memory operations associated with a thread of a given VPE 302-304, the virtual multiprocessor 300 will evaluate whether or not the given thread should be switched out because such operations would exceed the bandwidth-related resource allocation prescribed for the given VPE 302-304.
  • bandwidth allocation advantageously addresses situations where a small number of threads associated with one VPE 302-304, generate, for example, long sequences of cache misses that would otherwise monopolize the bandwidth-related resources (in this instance, memory operation buffers), thus preventing threads from other VPEs 302-304 from executing.
  • bandwidth-related resource quotas By specifying bandwidth- related resource quotas, such situations are precluded in the virtual multiprocessor 300 according to the present invention.
  • FIGURE 4 a table 400 is presented depicting virtual multiprocessing context registers in accordance with an exemplary embodiment of the present invention.
  • the virtual multiprocessing context registers are employed to configure either a virtual multiprocessor context 210 or a virtual processing element context 104, as described above.
  • the virtual multiprocessing context comprises registers MVPCONTROL, MVPCONF0, and MVPCONF1.
  • the virtual processing element context for each VPE within a virtual multiprocessor comprises registers VPECONTROL, VPECONFO, VPECONF1, and VPESCHEDULE.
  • the table 400 shows that the registers comport with the multithreading application specific extensions to the MIPS32/MIPS64 instruction set and privileged resource architecture which assigns a CP0 register number and register select number for to each of the shown registers for accessing contents therein.
  • the structure and contents of the above registers will now be discussed with reference to FIGURE 5.
  • FIGURE 5 is a series of block diagrams illustrating exemplary embodiments of each of the virtual multiprocessing context registers 501-506, 592 of FIGURE 4.
  • FIGURES 5A-5F include an illustration of the fields of the each of the registers and a table describing the various fields. Fields of particular relevance are discussed in more detail herein.
  • Each of the registers illustrated in Figure 5 may be selectively read and/or written by VPE that has permission to dynamically configure resources, as indicated by the value of its MVP field 553 within its VPECONFO register 505.
  • Certain fields within the registers 501-506, 592 can be written only by a VPE whose MVP field 553 indicates that it has configuration permission. Otherwise, the certain fields are read only, as controlled by the configuration logic 310.
  • the MVPCONTROL register 501 has an STLB field 511, a VPC field 512, and an EVP field 513.
  • a VPE 102 having configuration permission as describe above may update the VPC field 512 and the EVP field 513 to place the virtual multiprocessor 101 in a configuration state for configuration of resources. Clearing the VPC field 512 and setting the EVP field 513 causes new resource values to be latched in the configuration registers 501-506, 592 and for virtual processing to resume.
  • a VPE 102 having configuration permission may update the STLB field 511 to cause sharing of address translation resources.
  • the MVPCONF0 register 502 and the MVPCONF1 register 503 are read-only registers that are read by a VPE 102 having configuration permission to determine the number and extent of configurable resources that are provided within a given virtual multiprocessor 101.
  • Field TLBS indicates that address translation resources are sharable and that address translation resource sharing may be configured by setting field STLB 511 of the MVPCONTROL register 501.
  • Field PVPE 524 prescribed the total number of VPEs 102 provided for by the virtual multiprocessor 101. In the embodiment of FIGURE 5, up to sixteen VPEs 102 may be employed.
  • Field PTC 525 indicates the total number of thread contexts 103 provided for by the virtual multiprocessor 101. In the embodiment shown, up to 256 thread contexts 103 may be instantiated.
  • Field C1M 531 indicates that allocatable coprocessors are media-extension capable.
  • Field C1F 532 indicates whether allocatable coprocessor are floating point capable.
  • Fields 533-535 indicate the total number of other ISA-specific resources available for allocation to VPEs 102.
  • Resources are allocated to a particular VPE 104 by writing to its VPE number to field TARGVPE 334 of its VPECONTROL register 504.
  • One embodiment for writing field 334 is via MIPS MTTR and MFTR instructions described above.
  • field VPA 552 in register VPECONFO 505 is set to enable/disable a designated VPE 102.
  • Field MVP 553 is set to confer or revoke resource configuration permissions.
  • Fields MINTC 554 and MAXTC 555 are updated to allocate the number and enumeration of thread contexts 103 to a designated VPE 102.
  • Fields NCX 561, NCP2 56i2, and NCP1 563 are updated to allocate coprocessor resources to a particular VPE 102 in a MIPS32/MIPS64 multithreading application specific extension embodiment of the present invention.
  • the tables of FIGURES 5E and 5F show that the noted resource allocation fields 552-555, 561-563 are read-only fields.
  • the configuration logic 310 enables the noted fields 552-555, 561-563 to be updated (i.e., written).
  • Register VPESCHEDULE 592 comprises a scheduler hint field 529 that can be updated to configure bandwidth resources across VPEs 102 in the virtual multiprocessor 101.
  • FIGURES 4 and 5 illustrate an exemplary embodiment of the present invention where certain resources can be dynamically configured in a MIPS32/MIPS64 multithreading application specific extension environment
  • the present inventor notes that the exemplary embodiment is provided according to a known instruction set architecture to teach aspects of the invention.
  • the present inventor also notes that other architectures are comprehended as well.
  • FIGURE 6 a flow chart 600 is presented depicting a method according to the present invention for dynamic configuration of virtual processor resources. The method begins at block 602 where a VPE according to the present invention desires to dynamically reconfigure resources. Flow then proceeds to block 604.
  • VPE context corresponding to the requesting VPE is read. Flow then proceeds to decision block 606.
  • VPE context is evaluated to determine whether the requesting VPE is permitted to dynamically configure resources in the virtual multiprocessor. If so, then flow proceeds to block 608. If not, then flow proceeds to block 607.
  • VMP context within the virtual multiprocessor is accessed to determine what and how many resources are available for configuration. Flow then proceeds to block 614.
  • a target VPE is selected for configuration of its allocated resources. Flow then proceeds to block 616.
  • the resources are configured for the selected VPE by updating its corresponding VPE context. Flow then proceeds to block 618.
  • the new configuration of resources for the selected VPE is latched by exiting the configuration state and virtual processing within the virtual multiprocessor is re-enabled. Flow then proceeds to block 620.
  • FIGURE 7 is a flow chart 700 depicting a revocable method according to the present invention for dynamic configuration of virtual processor resources. All blocks 702-720 of the flow chart 700 of FIGURE 7 are equivalent to corresponding blocks 602- 620 of the flow chart 600 of FIGURE 6, where the hundreds digit is replaced with a 7, except for an additional block 717 wherein the VPE context for the selected VPE is updated to revoke its permission to dynamically configure resources. It is noted that the requesting VPE of block 702 can be the same as the selected VPE of block 717, thus enabling a VPE to revoke its own configuration permission. After latching the new configuration in block 718, the requesting VPE can no longer configure resources.
  • the present invention can be embodied in software (e.g., computer readable code, program code, instructions and/or data) disposed, for example, in a computer usable (e.g., readable) medium.
  • software e.g., computer readable code, program code, instructions and/or data
  • a computer usable (e.g., readable) medium e.g., readable
  • this can be accomplished through the use of general programming languages (e.g., C, C++, JAVA, etc.), GDSII databases, hardware description languages (HDL) including Verilog HDL, VHDL, and so on, or other available programs, databases, and/or circuit (i.e., schematic) capture tools.
  • Such software can be disposed in any known computer usable (e.g., readable) medium including semiconductor memory, magnetic disk, optical disc (e.g., CD-ROM, DVD-ROM, etc.) and as a computer data signal embodied in a computer usable (e.g., readable) transmission medium (e.g., carrier wave or any other medium including digital, optical, or analog-based medium).
  • the software can be transmitted over communication networks including the Internet and intranets.
  • the invention can be embodied in software (e.g., in HDL as part of a semiconductor intellectual property core, such as a microprocessor core, or as a system- level design, such as a System on Chip or SOC) and transformed to hardware as part of the production of integrated circuits.
  • the invention may be embodied as a combination of hardware and software.

Abstract

The apparatus includes a virtual multiprocessor context, one or more virtual processing element contexts, and configuration logic. The virtual multiprocessor context, prescribes the resources, and controls a configuration state of the virtual multiprocessor. The one or more virtual processing element contexts each exclusively correspond to one of the one or more virtual processing elements. The one or more virtual processing element contexts each have first logic, for prescribing whether the one of the one or more virtual processing elements is permitted to configure the resources; and second logic, for prescribing a subset of the resources that is allocated to said one of the one or more virtual processing elements. The configuration logic is coupled to the virtual multiprocessor context and the one or more virtual processing element contexts. The configuration logic detects whether the one of the one or more virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.

Description

MECHANISMS FOR DYNAMIC CONFIGURATION OF VIRTUAL PROCESSOR RESOURCES
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of the following U.S. Provisional Applications, which are each herein incorporated by reference for all intents and purposes.
Figure imgf000003_0001
[0002] This application is a continuation-in-part of the following co-pending non- provisional U.S. Patent Applications, each of which have a common assignee and at least one common inventor, and each of which are herein incorporated by reference for all intents and purposes.
Figure imgf000003_0002
DOCKET: MIPS.0193-00-US
INTEGRATED MECHANISM FOR 10/684348 SUSPENSION AND DEALLOCATION OF 10/10/03 (MIPS.0189-00-US) COMPUTATIONAL THREADS OF EXECUTION IN A PROCESSOR [0003] Both of the above-noted co-pending non-provisional U.S. Patent Applications claim the benefit of the following U.S. Provisional Applications:
Figure imgf000004_0001
[0004] This application is related to the following co-pending non-provisional U.S. Patent Applications, which are each herein incorporated by reference for all intents and purposes.
Figure imgf000004_0002
BACKGROUND OF THE INVENTION
FIELD OF THE INVENTION
[0005] The present invention relates in general to the field of virtual multiprocessors, and in particular to mechanisms that provide for dynamic configuration of resources within a virtual multiprocessor between one or more virtual processing elements.
DESCRIPTION OF THE RELATED ART
[0006] Present day designers employ many techniques to increase microprocessor performance. Most microprocessors operate using a clock signal running at a fixed frequency. Each clock cycle, the circuits of the microprocessor perform their respective functions. According to Hennessy and Patterson, the true measure of a microprocessor's performance is the time required to execute a program or collection of programs. From this perspective, the performance of a microprocessor is a function of its clock frequency, the average number of clock cycles required to execute an instruction (or alternately stated, the average number of instructions executed per clock cycle), and the number of instructions executed in the program or collection of programs. Semiconductor scientists and engineers continue to provide advances in the art that enable microprocessors to run at increasingly faster clock frequencies. These advances predominately enable the reduction of transistor sizes, which results in faster switching times within an integrated circuit designed therefrom. The number of instructions executed is largely fixed by the task to be performed by the program, although it is also affected by the instruction set architecture of the microprocessor. However, large performance increases have been realized by architectural and organizational techniques that improve the instructions per clock cycle, in particular by techniques that allow for parallel execution of instructions (i.e., "parallelism").
[0007] One parallelism technique that has improved the instructions per clock cycle of microprocessors, as well as their clock frequency, is pipelining. Pipelining overlaps execution of multiple instructions within pipeline stages of the microprocessor in a manner substantially similar to stages in an assembly line. In an ideal situation, each clock cycle one instruction moves down the pipeline to a new stage, which performs a different function on the instructions. Thus, although each individual instruction takes multiple clock cycles to complete, because the multiple cycles of the individual instructions overlap, the average clocks per instruction is reduced. The performance improvements of pipelining may be realized to the extent that the instructions in the program permit it, namely to the extent that an instruction does not depend upon its ;vedecessors in order to execute and can therefore execute in parallel with its predecessors, which is commonly referred to as instruction-level parallelism. Another way in which instruction-level parallelism is exploited by contemporary microprocessors is the issuing of multiple instructions for execution during the same clock cycle to different functional units, which each perform their directed functions during that clock cycle. A microprocessor that accomplishes instruction-level parallelism in this manner is commonly referred to as a "superscalar" microprocessor.
[0008] The parallelism mechanisms discussed above pertain to parallelism at the individual instruction-level. However, the performance improvement that may be achieved through exploitation of instruction-level parallelism is limited. Various constraints imposed by limited instruction-level parallelism and other performance- constraining issues have recently renewed an interest in exploiting parallelism at the level of blocks, or sequences, or streams, or threads of instructions. This level of parallelism is commonly referred to as thread-level parallelism. A thread is simply a sequence, or stream, of program instructions. A multithreaded microprocessor concurrently executes multiple threads according to some scheduling policy that dictates the fetching and issuing of instructions of the various threads, such as interleaved, blocked, or simultaneous multithreading. A multithreaded microprocessor typically allows the multiple threads to share the functional units of the microprocessor (e.g., instruction fetch and decode units, caches, branch prediction units, and load/store, integer, floating-point, SIMD, etc. execution units) in a concurrent fashion. However, multithreaded microprocessors include multiple sets of hardware/firmware resources, or thread contexts, for storing the unique state of each thread to facilitate the ability to quickly switch between threads to fetch and issue instructions. For example, each thread context includes its own program counter for instruction fetching and thread identification information, and typically also includes its own general purpose register set.
[0009] One example of a performance-constraining issue addressed by multithreading microprocessors is the fact that accesses to memory outside the microprocessor that must be performed due to a cache miss typically have a relatively long latency. The memory access time of a contemporary microprocessor-based computer system is commonly between one and two orders of magnitude greater than the cache hit access time. Consequently, while the pipeline is stalled waiting for the data from memory, some or all of the pipeline stages of a single-threaded microprocessor may be idle performing no useful work for many clock cycles. Multithreaded microprocessors may alleviate this problem by issuing instructions from other threads during the memory fetch latency, thereby enabling the pipeline stages to make forward progress performing useful work, somewhat analogously to, but at a finer level of granularity than, an operating system performing a task switch in response to a page fault. Other examples of performance- constraining issues are pipeline stalls and their accompanying idle cycles due to a branch misprediction and concomitant pipeline flush, or due to a data dependence, or due to a long latency instruction such as a divide instruction. Again, the ability of a multithreaded microprocessor to issue instructions from other threads to pipeline stages that would otherwise be idle may significantly reduce the time required to execute the program or collection of programs comprising the threads. Another problem, particularly in embedded systems, is the wasted overhead associated with interrupt servicing. Typically, when an input/output device signals an interrupt event to the microprocessor, the microprocessor switches control to an interrupt service routine, which requires saving of the current program state, servicing the interrupt, and restoring the current program state after the interrupt has been serviced. A multithreaded microprocessor provides the ability for event service code to be its own thread having its own thread context. Consequently, in response to the input/output device signaling an event, the microprocessor can quickly - perhaps in a single clock cycle - switch to the event service thread, thereby avoiding incurring the conventional interrupt service routine overhead.
[0010] Just as the degree of instruction-level parallelism dictates the extent to which a microprocessor may take advantage of the benefits of pipelining and superscalar instruction issue, the degree of thread-level parallelism dictates the extent to which a microprocessor may take advantage of multithreaded execution. An important characteristic of a thread is its independence of the other threads being executed on the multithreaded microprocessor. A thread is independent of another thread to the extent its instructions do not depend on instructions in other threads. The independent characteristic of threads enables the microprocessor to execute the instructions of the various threads concurrently. That is, the microprocessor may issue instructions of one thread to execution units without regard to the instructions being issued of other threads. To the extent that the threads access common data, the threads themselves must be programmed to synchronize data accesses with one another to insure proper operation such that the microprocessor instruction issue stage does not need to be concerned with the dependences.
[0011] As may be observed from the foregoing, a processor with multiple thread contexts concurrently executing multiple threads may reduce the time required to execute a program or collection of programs comprising the multiple threads. However, the introduction of multiple thread contexts also introduces a new set of problems, particularly for system software, to manage the multiple instruction streams and their associated thread contexts. And the present inventors have noted yet another level that is required for improving the parallelism associated with instruction execution in a microprocessor. In this and related applications, the present inventors address the provision of virtual processing elements within the same microprocessor. Taken to this level, a multithreaded virtual processing element, in addition to implementing multiple program counters and thread contexts to ensure the effective switching of program threads, implements all of the resources necessary to provide for a single instantiation of a given instruction set and privileged resource architecture that is sufficient to execute a per-processor operating system image. Effectively, a microprocessor that implements N virtual processing elements (i.e., a "virtual multiprocessor" having N virtual processing elements) appears to operating system software as an N-way symmetric multiprocessor. The physical difference between a virtual multiprocessor according to the present invention and a conventional symmetric multiprocessor is that, in addition to sharing memory and some level of connectivity, the virtual processing elements within a virtual multiprocessor also share on-chip resources, or attributes, of the virtual multiprocessor such as, for example, instruction fetch and issue logic; address translation logic (e.g., translation lookaside buffer logic); functional units such as integer units, floating point units, multimedia units, media acceleration units, and SIMD units; and coprocessors. In addition, the virtual processing units must share performance attributes, or utilization aspects (e.g., "bandwidth), of the virtual multiprocessor, which are determined largely based upon the number of threads that are allocated to each of the virtual processing elements, the extent that the threads associated with one virtual processing element can take priority over the threads associated with other virtual processing elements when execution is required, and the allocation of certain processor-wide resources (e.g., load/store buffers) to the virtual processing elements. For example, consider an embedded system in which two distinct kinds of processing are taking place: real-time compression of audio or video data, and operation of a graphical user interface. Using th late 20 century technology, these tasks might be accomplished by using two different processors: a real-time digital signal processor to handle the multimedia data and an interactive processor core which runs a multitasking operating system. Yet, the present invention allows for these two functions to be performed on the same virtual multiprocessor. Two virtual processing elements of the virtual multiprocessor would be employed: one dedicated to performing the multimedia processing tasks, and the other dedicated to performing the user interface tasks. Employing two virtual processing elements solves the problem of the co-existence, or co-instantiation of two different software paradigms, but it does not guarantee the real-time performance requirements in the same way as a dedicated processor, because the multimedia virtual processing element and the user interface virtual processing element must share certain resources within the virtual multiprocessor and the performance of applications executing on a virtual multiprocessor are, as alluded to above, based upon how those resources, or attributes are allocated to each of the virtual processing elements therein.
[0012] To fabricate a virtual multiprocessor that has resources precisely tailored to a specific multiprocessing application would be excessively cost-ineffective in a market where multiprocessing applications exhibit a very wide and diverse set of resource requirements. Thus, the present inventor has observed that it is very desirable to provide a virtual multiprocessor that can be employed across this wide range of multiprocessing applications. He has additionally noted that it is desirable that the virtual multiprocessor include mechanisms for configuration of resources to various virtual processing elements therein by software. Such mechanisms should allow the virtual multiprocessor to be configured with one or more virtual processing elements, where each of the virtual processing elements is configured to execute one or more threads. Furthermore, it is desired that the resources be dynamically configurable by trusted virtual processing elements at run-time, and moreover that a mechanism be provided to revoke configuration privileges.
SUMMARY OF THE INVENTION
[0013] The present invention, among other applications, is directed to solving the above- noted problems and addresses other problems, disadvantages, and limitations of the prior art. The present invention provides superior mechanisms for dynamically configuring the resources of a virtual multiprocessor. In one embodiment, an apparatus is provided for configuring resources for one or more virtual processing elements in a virtual multiprocessor. The apparatus includes a virtual multiprocessor context, one or more virtual processing element contexts, and configuration logic. The virtual multiprocessor context, prescribes the resources, and controls a configuration state of the virtual multiprocessor. The one or more virtual processing element contexts each exclusively correspond to one of the one or more virtual processing elements. The one or more virtual processing element contexts each have first logic, for prescribing whether the one of the one or more virtual processing elements is permitted to configure the resources; and second logic, for prescribing a subset of the resources that is allocated to said one of the one or more virtual processing elements. The configuration logic is coupled to the virtual multiprocessor context and the one or more virtual processing element contexts. The configuration logic detects whether the one of the one or more virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.
[0014] One aspect of the present invention contemplates a resource configuration mechanism, for assigning resources to virtual processing elements within a virtual multiprocessor. The resource configuration mechanism has virtual multiprocessor registers, virtual processing element registers for each of the virtual processing elements, and configuration logic. The virtual multiprocessor registers prescribes the resources, and control a configuration state of the virtual multiprocessor. The virtual processing element registers prescribe whether a corresponding virtual processing element is permitted to assign the resources, and prescribe a subset of the resources that is allocated to the corresponding virtual processing element. The configuration logic is coupled to the virtual multiprocessor registers and the virtual processing element registers. The configuration logic detects whether the corresponding virtual processing element is permitted to assign the resources, updates the viitual multiprocessor registers to direct that the virtual multiprocessor enter the configuration state, and assigns the resources by updating selected ones of the virtual processing element registers.
[0015] Another aspect of the present invention comprehends a computer program product for use with a computing device. The computer program product includes a computer usable medium, having computer readable program code embodied in the medium, configured to describe an apparatus for configuring resources for virtual processing elements in a virtual multiprocessor. The computer readable program code has first program code, second program code, and third program code. The first program code describes a virtual multiprocessor context. The virtual multiprocessor context prescribes the resources, and controls a configuration state of the virtual multiprocessor. The second program code describes virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, and prescribing whether the one of the virtual processing elements is permitted to configure the resources, and prescribing a subset of the resources that is allocated to the one of said virtual processing elements. The third program code describes configuration logic. The configuration logic is coupled to the virtual multiprocessor context and to the virtual processing element contexts. The configuration logic detects whether the one of the virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.
[0016] In yet another aspect, the present invention contemplates a computer data signal embodied in a transmission medium. The computer data signal has computer-readable program code that is configured to describe an apparatus for configuring resources for virtual processing elements in a virtual multiprocessor. The computer-readable program code includes first program code, second program code, and third program code. The first program code describes a virtual multiprocessor context, where the virtual multiprocessor context prescribes the resources, and controls a configuration state of the virtual multiprocessor. The second program code describes virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, and prescribing whether the one of the virtual processing elements is permitted to configure the resources, and prescribing a subset of the resources that is allocated to the one of said virtual processing elements. The third program code describes configuration logic that is coupled to the virtual multiprocessor context and to the virtual processing element contexts. The configuration logic detects whether the one of the virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context.
[0017] In a further aspect, the present invention embodies a method for configuring resources for virtual processing elements in a virtual multiprocessor. The method includes: via a virtual multiprocessor context, first prescribing the resources, and controlling a configuration state of the virtual multiprocessor; via virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, second prescribing whether the one of the virtual processing elements is permitted to configure the resources, and third prescribing a subset of the resources that is allocated to the one of the virtual processing elements; and via configuration logic that is coupled to the virtual multiprocessor context and to the virtual processing element contexts, detecting whether the one of the virtual processing elements is permitted to configure the resources, and first updating the virtual multiprocessor context to direct that the virtual multiprocessor enter said configuration state, and configuring the resources by second updating a prescribed virtual processing element context.
[0018] In yet another aspect, the present invention comprehends a virtual multiprocessing system. The virtual multiprocessing system has a memory and a virtual multiprocessor. The memory stores program instructions associated with a plurality of program threads. The virtual multiprocessor is coupled to the memory. The virtual multiprocessor executes the program instructions on one or more virtual processing elements configured within the virtual multiprocessor. The virtual multiprocessor has a virtual multiprocessor context that prescribes resources for configuration of the one or more virtual processing elements, and that controls a configuration state of the virtual multiprocessor. Each of the one or more virtual processing elements includes a virtual processing element context and configuration logic. The virtual processing element context prescribes whether the each of the one or more virtual processing elements is permitted to configure the resources, and prescribes a subset of the resources that is allocated to a prescribed one of the one or more virtual processing elements. The configuration logic is coupled to the virtual multiprocessor context and the virtual processing element context. The configuration logic detects whether the each of the one or more virtual processing elements is permitted to configure the resources, updates the virtual multiprocessor context to direct that the virtual multiprocessor enter the configuration state, and configures the resources by updating a prescribed virtual processing element context corresponding to the prescribed one of the one or more virtual processing elements.
BRIEF DESCRIPTION OF THE DRAWINGS
[0019] These and other objects, features, and advantages of the present invention will become better understood with regard to the following description, and accompanying drawings where:
[0020] FIGURE 1 is a block diagram illustrating a multiprocessing environment according to the present invention;
[0021] FIGURE 2 is a block diagram featuring a virtual multiprocessor pipeline according to the present invention;
[0022] FIGURE 3 is a block diagram showing a dynamically configurable virtual multiprocessor according to the present invention;
[0023] FIGURE 4 is a table presenting virtual multiprocessing context registers in accordance with an exemplary embodiment of the present invention;
[0024] FIGURE 5 is a series of block diagrams illustrating exemplary embodiments of each of the virtual multiprocessing context registers of FIGURE 4;
[0025] FIGURE 6 is a flow chart depicting a method according to the present invention for dynamic configuration of virtual processor resources; and [0026] FIGURE 7 is a flow chart depicting a revocable method according to the present invention for dynamic configuration of virtual processor resources.
DETAILED DESCRIPTION
[0027] The following description is presented to enable one of ordinary skill in the art to make and use the present invention as provided within the context of a particular application and its requirements. Various modifications to the preferred embodiment will, however, be apparent to one skilled in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described herein, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In view of the above background discussion on parallelism and associated multithreading and multiprocessing techniques employed within present day processors, a discussion of the present invention will now be presented with reference to FIGURES 1- 7.
[0028] Referring to Figure 1, a block diagram illustrating a multiprocessing environment 100 according to the present invention is shown. The multiprocessing environment 100 includes a virtual multiprocessor 101 coupled to a system interface controller 105. The system interface controller 105 is coupled to a system memory 106 and one or more input/output (I/O) devices 107. Each of the I/O devices 107 provides an interrupt request line 108 to the virtual multiprocessor 101. The virtual multiprocessor 101 includes one or more virtual processing elements 102. Each of the one or more virtual processing elements 102 has a corresponding virtual processing element context 104 and one or more corresponding thread contexts 103. The multiprocessing environment 100 may be, but is not limited to, a general purpose programmable computer system, server computer, workstation computer, personal computer, notebook computer, personal digital assistant (PDA), or embedded system such as, but not limited to, a network router or switch, printer, mass storage controller, camera, scanner, automobile controller, and the like. [0029] The system memory 106 may be embodied as memory, such as RAM and ROM memory, for storing program instructions for execution on the virtual multiprocessor 101, and for storing data to be processed by the virtual multiprocessor 101 according to the program instructions. The program instructions may comprise one or more program threads that the virtual multiprocessor 101 executes concurrently. A program thread, or thread, comprises a sequence, or stream, of program instructions and associated sequence of state changes in a corresponding virtual processing element 102 within the virtual multiprocessor 101 that are associated with the execution of the sequence of instructions.
Each thread context 103 comprises a hardware state necessary to support execution of a corresponding program thread. In one embodiment, each thread context includes a set of general purpose registers, a program counter, and other registers to preserve state of the executing thread such as multiplier state and coprocessor state. Each of the virtual processing elements 102 provides resources to support an instantiation of a full instruction set architecture and privileged resource architecture that are sufficient to execute a per-processor operating system image. In one embodiment, each of the virtual processing elements 102 provide resources to support an instantiation of the full
MIPS32/MIPS64 instruction set architecture and privileged resource architecture. Each of the virtual processing element contexts 104 comprises a hardware state necessary to support execution of the threads executing within a corresponding virtual processing element 102. In one embodiment, each of the virtual processing element contexts 104 prescribe resources that are allocated to a corresponding virtual processing element 102 such as address translation logic resources (e.g., translation lookaside buffer entries), functional units (e.g., integer units, floating point units, multimedia units and media acceleration units, SIMD units, coprocessors), and performance attributes. In a particular embodiment, the performance attributes comprise permission to halt and configure the resources allocated to other virtual processing elements 102, the number of and enumeration of threads, enablement/inhibition of the corresponding virtual processing element 102, and bandwidth-related resources (e.g., instruction execution bandwidth or priority, load/store bandwidth, etc.) of the virtual multiprocessor 101 that are allocated to the corresponding virtual processing element 102. The present invention comprehends a variety of bandwidth allocation techniques to include scheduling hints, execution priority assignment, load/store buffer allocation, and the like.
[0030] The system interface controller 105 interfaces with the virtual multiprocessor 101 via a processor bus coupling the virtual multiprocessor 101 to the system interface controller 105. In one embodiment, the system interface controller 105 includes a memory controller for controlling the system memory 106. In one embodiment, the system interface controller 105 includes a local bus interface controller for providing a local bus, such as a PCI bus, to which the I/O devices 107 are coupled.
[0031] The I/O devices 107 may include, but are not limited to, user input devices such as keyboards, mice, scanners and the like; display devices such as monitors, printers and the like; storage devices such as disk drives, tape drives, optical drives and the like; system peripheral devices such as direct memory access controllers (DMAC), clocks, timers, I/O ports and the like; network devices such as media access controllers (MAC) for Ethernet, FibreChannel, Infmiband, or other high-speed network interfaces; data conversion devices such as analog-to-digital (A/D) converters and digital-to-analog converters; and so forth. The I/O devices 107 generate the interrupt signals 108 to the virtual multiprocessor 101 to request service. Advantageously, the virtual multiprocessor 101 is capable of concurrently executing multiple program threads for processing the events signified on the interrupt request lines 108 without requiring the conventional overhead associated with saving the state of the microprocessor 102, transferring control to an interrupt service routine, and restoring state upon completion of the interrupt service routine.
[0032] In one embodiment, the virtual multiprocessor 101 provides two distinct, but not mutually-exclusive, multithreading capabilities. First, the virtual multiprocessor comprises one or more virtual processing elements (VPEs) 102 to support a corresponding one or more logical processor contexts, each of which appears to an operating system as an independent processing element, through the sharing of resources in the virtual multiprocessor 101. To an operating system, a virtual multiprocessor 101 having N VPEs 102 appears like an N-way symmetric multiprocessor (SMP), which allows existing SMP-capable operating systems to manage the one or more VPEs 102. Second, each VPE 102 may also include one or more thread contexts 103 for simultaneously executing a corresponding one or more program threads. Consequently, the virtual multiprocessor 101 according to the present invention also provides a multithreaded programming model wherein program threads can be created and destroyed without operating system intervention in typical cases, and where system service threads can be scheduled in response to external conditions (e.g., input/output service event signals) with minimized interrupt latency.
[0033] In one embodiment, each of the thread contexts 103 include one or more storage elements, such as registers or latches, having fields (e.g., bits) therein that describe the state of execution of a corresponding thread. That is, a given thread context 103 describes the state of its respective thread, which is unique to the thread, rather than state shared with other threads of execution executing concurrently on the virtual processing element 102. A thread - also referred to herein as a program thread, thread of execution, or instruction stream - is a sequence of instructions. Each of the virtual processing elements 102 is capable of concurrently executing multiple threads. By storing the state of each thread in the thread contexts 103, each of the virtual processing elements 102 within the virtual multiprocessor 101 is configured to quickly switch between threads to fetch and issue instructions. Advantageously, the present virtual multiprocessor 101 is configured to execute instructions for moving thread context information between the various thread contexts 103, as is described in detail in co-pending U.S. Patent
Application Serial Number (Docket: MIPS.0194-00-US), entitled
"MECHANISMS FOR SOFTWARE MANAGEMENT OF MULTIPLE COMPUTATIONAL CONTEXTS," which has herein been incorporated by reference above. [0034] In one embodiment, each of the VPE contexts 104 includes a collection of storage elements, such as registers or latches, having fields (e.g., bits) therein that describe the state of execution of a corresponding VPE 102, and which provide for configuration of the resources for the corresponding VPE 102 such as, but not limited to, address translation resources, coprocessing resources (e.g. floating point processors, media processors, etc.), thread capacity and enumeration, permission to enable/inhibit execution of a specified VPE 102, and permission to configure the resources of a specified VPE 102. In one embodiment, a VPE 102 may configure its own resources by updating its
VPE context 104. Alternatively, the VPE 102 may configure the resources of a different
VPE 102 by updating the VPE context 104 that corresponds to the different VPE 102.
Consequently, a virtual multiprocessor 101 with N VPEs 102 appears to an operating system or other symmetric multiprocessing application as an N-way symmetric multiprocessor. In one embodiment, the VPEs 102 share particular resources in the virtual multiprocessor 101 such as instruction cache, instruction fetcher, instruction decoder, instruction issuer, instruction scheduler, execution units and coprocessing unit, and data cache, transparently to the operating system. The degree and extent that the resources are shared is prescribed by the VPE contexts 104 and may be dynamically configured at run time or other times by updating the VPE contexts 104. For a given
VPE 102 to configure its own resources or resources that are assigned to a different VPE
102, its own VPE context 104 must prescribe that the given VPE 102 is permitted to configure resources of the virtual multiprocessor 101, as will be described in more detail below. Accordingly, if the VPE context 104 of the given VPE 102 indicates that the given VPE 102 is permitted to configure resources, then the given VPE 102 may update the all VPE contexts 104 to provide for dynamic resource configuration, including modification of resource configuration permissions, which includes the ability to revoke configuration permissions. In one embodiment, each VPE 102 substantially conforms to a MIPS32 or MIPS64 Instruction Set Architecture (ISA) and a MIPS Privileged Resource
Architecture (PRA), and each of the VPE contexts 104 includes the MIPS PRA
Coprocessor 0 and system state necessary to describe an instantiation thereof. In one embodiment, the VPE context 106 includes the VPECONTROL Register 504, VPECONF0 Register 505, VPECONF1 Register 506, and VPESCHEDULE Register 592 of Figures 5D-5G described below. In one respect, a VPE 102 may be viewed as an exception domain. That is, when one of the thread contexts 103 of a VPE 102 generates an exception, multithreading is suspended on the VPE 102 (i.e., only instructions of the instruction stream associated with the thread context 104 servicing the exception are fetched and issued), and each VPE context 104 includes the state necessary to service the exception. Once the exception is serviced, the exception handler may selectively re- enable multithreading on the VPE 102.
[0035] Now turning to FIGURE 2, a block diagram is presented that illustrates a virtual multiprocessor pipeline 200 within a virtual multiprocessor according to the present invention. The pipeline 200 includes a plurality of pipeline stages and additionally includes one or more thread contexts 103. The exemplary embodiment of FIGURE 2 shows four thread contexts 103. In one embodiment, each thread context 103 comprises a program counter (PC) 222 for storing an address for fetching a next instruction in the associated instruction stream, a general purpose register (GPR) set 224 for storing intermediate execution results of the instruction stream issuing from the thread based on the program counter 222 value, and other per-thread context 226. In one embodiment, the pipeline 200 includes a multiplier unit (not shown), and the other thread context 226 includes registers for storing results of the multiplier unit specifically associated with multiply instructions in the instruction stream. In one embodiment, the other thread context 226 includes information for uniquely identifying each thread context 103. In one embodiment, the thread identification information includes information for specifying the execution privilege level of the associated thread, such as whether the thread is a kernel, supervisor, or user level thread. In one embodiment, the thread identification information includes information for identifying a task or process comprising the thread. In particular, the task identification information may be used as an address space identifier (ASID) for purposes of translating physical addresses into virtual addresses. [0036] The pipeline 200 includes a scheduler 216 for scheduling execution of the various threads being concurrently executed by the virtual multiprocessor 100. The scheduler 216 is coupled to a VMP context 210, the VPE contexts 104 of FIGURE 1, and to the other per-thread contexts 226. In particular, the scheduler 216 is responsible for scheduling fetching of instructions from the program counter 222 of the various thread contexts 104 and for scheduling issuing of the fetched instructions to execution units 212 of the virtual multiprocessor 100, as described below. The scheduler 216 schedules execution of the threads based on a scheduling policy of the virtual multiprocessor 100. The scheduling policy may include, but is not limited to, any of the following scheduling policies. In one embodiment, the scheduler 216 employs a round-robin, or time-division- multiplexed, or interleaved, scheduling policy that allocates a predetermined number of clock cycles or instruction issue slots to each ready thread in a rotating order. The round- robin policy is useful in an application in which fairness is important and a minimum quality of service is required for certain threads, such as real-time application program threads. In one embodiment, the scheduler 216 employs a blocking scheduling policy wherein the scheduler 216 continues to schedule fetching and issuing of a currently running thread until an event occurs that blocks further progress of the thread, such as a cache miss, a branch misprediction, a data dependency, or a long latency instruction. In one embodiment, the pipeline 200 comprises a superscalar pipeline that employs multiple execution units 212, and the scheduler 216 schedules the issue of multiple instructions per clock cycle, and in particular, the issue of instructions from multiple threads per clock cycle, commonly referred to as simultaneous multithreading. In another embodiment, the scheduler 216 employs a scheduling policy that utilizes scheduling information provided via the VPE contexts 104 where the scheduling information indicates bandwidth and/or bandwidth-related resources that are allocated to each of the VPEs 102.
[0037] The pipeline 200 includes an instruction cache 202 for caching program instructions fetched from a system memory. In one embodiment, the pipeline 200 provides virtual memory capability, and the fetch unit 204 includes a translation lookaside buffer (not shown) for caching physical to virtual memory page translations. In this embodiment, resources (e.g., entries) within the translation lookaside buffer are allocated to each of the VPEs 102 that share the pipeline 200, as prescribed by the VPE contexts 104. In one embodiment, each program, or task, executing in the pipeline 200 is assigned a unique task ID, or address space ID (ASID), which is used to perform memory accesses and in particular memory address translations, and a thread context 103 also includes storage for an ASID associated with the thread.
[0038] The pipeline 200 also includes a fetch unit 204, coupled to the instruction cache 202, for fetching program instructions from the instruction cache 202 and system memory. The fetch unit 204 fetches instructions at an instruction fetch address provided by a multiplexer 244. The multiplexer 244 receives a plurality of instruction fetch addresses from the corresponding plurality of program counters 222. Each of the program counters 222 stores a current instruction fetch address for a different program thread. The embodiment of Figure 2 illustrates four different program counters 222 associated with four different threads. The multiplexer 244 selects one of the four program counters 222 based on a selection input provided by the scheduler 216. In one embodiment, the various threads executing on the microprocessor 100 share the fetch unit 204.
[0039] The pipeline 200 also includes a decode unit 206, coupled to the fetch unit 204, for decoding program instructions fetched by the fetch unit 204. The decode unit 206 decodes the opcode, operand, and other fields of the instructions. In one embodiment, the various threads executing on the microprocessor 100 share the decode unit 206.
[0040] The pipeline 200 also includes execution units 212 for executing instructions. The execution units 212 may include, but are not limited to, one or more integer units for performing integer arithmetic, Boolean operations, shift operations, rotate operations, and the like; floating point units for performing floating point operations; load/store units for performing memory accesses and in particular accesses to a data cache 242 coupled to the execution units 212; multimedia acceleration units for performing multimedia operations, and a branch resolution unit for resolving the outcome and target address of branch instructions. In one embodiment, the data cache 242 includes a translation lookaside buffer for caching physical to virtual memory page translations. In addition to the operands received from the data cache 242, the execution units 212 also receive operands from registers of the general purpose register sets 224. In particular, an execution unit 212 receives operands from a register set 224 of the thread context 104 allocated to the thread to which the instruction belongs. A multiplexer 248 selects operands from the appropriate register set 224 for provision to the execution units 212. In addition, the multiplexer 248 receives data from each of the other per-thread contexts 226 and program counters 222, for selective provision to the execution units 212 based on the thread context 104 of the instruction being executed by the execution unit 212. In one embodiment, the various execution units 212 may concurrently execute instructions from multiple concurrent threads.
[0041] The pipeline 200 also includes an instruction issue unit 208, coupled to the scheduler 216 and coupled between the decode unit 206 and the execution units 212, for issuing instructions to the execution units 212 as instructed by the scheduler 216, and in response to information about the instructions decoded by the decode unit 206. In particular, the instruction issue unit 208 insures that instructions are not issued to the execution units 212 if they have data dependencies on other instructions previously issued to the execution units 212. In one embodiment, an instruction queue (not shown) is imposed between the decode unit 206 and the instruction issue unit 208 for buffering instructions awaiting issue to the execution units 212 for reducing the likelihood of starvation of the execution units 212. In one embodiment, the various threads executing in the pipeline 200 share the instruction issue unit 208.
[0042] The pipeline 200 also includes a write-back unit 214, coupled to the execution units 212, for writing back results of instructions into the general purpose register sets 224, program counters 222, and other thread contexts 226. A demultiplexer 246 receives the instruction result from the write-back unit 214 and stores the instruction result into the appropriate register set 224, program counters 222, and other thread contexts 226 associated with the instruction's thread. The instruction results are also provided for storage into the VPE contexts 104 and a virtual multiprocessor (VMP) context 210.
[0043] In one embodiment The VMP context 210 comprises a collection of storage elements, such as registers or latches, having one of more fields (e.g., bits) in the storage elements that describe the state of execution of the virtual multiprocessor 101. In particular, the VMP context 210 stores state related to global resources of the virtual multiprocessor 101 that are shared among the VPEs 102, as described hereinabove. In particular, the VMP context prescribes resources that can be allocated to the VPEs 102 during configuration and also controls whether the virtual multiprocessor 101 is in a configuration state for configuration of the resources. In one embodiment, the VMP context 210 comprises an MVPCONTROL Register 501, MVPCONF0 Register 502, and MVPCONF1 Register 503 of FIGURES 5A-5C described below.
[0044] The particular stages 202, 204, 206, 208, 212, 214 of the pipeline 200 of FIGURE 2 are provided to clearly teach the present invention without obfuscating essential aspects. One skilled in the art will appreciate that staging of the pipeline 200 may be modified by increasing or decreasing the number of stages, or by allocating functions differently to stages, to improve performance, without departing from the spirit and scope of the present invention.
[0045] Referring now to FIGURE 3, a block diagram is presented showing a dynamically configurable virtual multiprocessor 300 according to the present invention. The multiprocessor 300 includes one or more VPEs 302-304, enumerated as VPE 1 302, VPE
2 303, through VPE N 304. Each VPE 302-304 has a corresponding VPE context 305- 307. The VPEs 302-304 are coupled to the execute logic 212, along with the VMP context 210, as described above with reference to FIGURE 2. The execute logic 212 includes VPE configuration logic 310. The VPE configuration logic 310 is coupled to an exception signal 311. Also shown in the block diagram are one or more resources 322, 324, 324, 326, 328 enumerated as RESOURCE 1 322, RESOURCE 2 324, RESOURCE
3 326. through RESOURCE M 328. [0046] In operation, configuration of the resources 322-328 is accomplished by executing a configuration instruction sequence issued by a VPE 302-304 that is permitted to configure the resources 322-328. In one embodiment, permission to configure the resources 322-328 is prescribed by the VPE context 305-307 of the corresponding VPE 302-304. When a configuration instruction sequence is received by the execute logic 212 within the pipeline 200, the VPE configuration logic 310 accesses the VPE context 305- 307 that corresponds to the VPE 302-304 whose program thread caused the configuration instruction sequence to be fetched to determine whether the VPE 302-304 is permitted to configure the resources 322-328. If not, then the configuration logic 310 causes the exception signal 311 to be asserted and the configuration instruction sequence is not executed. If the VPE 302-304 is permitted to configure the resources 322-328, then the VPE configuration logic 310 executes the configuration instruction sequence to direct the virtual multiprocessor 300 to enter a configuration state, and to update one or more prescribed VPE contexts 305-307, thus reconfiguring the resources. In one embodiment, the configuration instruction sequence directs the virtual multiprocessor 300 to enter the configuration state by updating the VMP context 210. In one embodiment, the sequence of configuration instructions comprises instructions conforming to the MIPS32/MIPS64 Multithreading (MT) Application Specific Extensions (ASE) architecture.
[0047] The block diagram shows a particular embodiment of configured resources 322- 328 resulting from execution of the configuration instruction sequence, and diagrammatically illustrating how particular resources 322-328 can be dynamically configured according to the present invention to optimize performance of threads concurrently executing in a given multithreading multiprocessing application. For example, consider that the diagrammatic division of RESOURCE 1 322 corresponds to address translation resources (e.g., translation lookaside buffer entries). From the division shown, it is indicated that VPE 1 302 is assigned a proportion of the address translation resources that is less than those allocated to the remaining VPEs 303-304. Perhaps the threads executing on VPE 1 302 are short and repetitive relative to other threads and thus do not require extensive address translation resources. Consider also that RESOURCE 2 324 represents contexts corresponding to multithreaded coprocessors (e.g., floating point element, media element, SIMD element, etc.). It is illustrated that VPE 2 303, as prescribed within its VPE context 306, is allocated a lesser number of contexts relative to the other VPEs 302, 307, perhaps due to the operations directed by instruction threads issued by VPE 2 303 which do not require extensive coprocessing resources. In addition, consider that RESOURCE 3 326 represents resource configuration permissions. As is diagrammatically represented, only VPE 2 303 is permitted to configure the resources 322-328 in the virtual multiprocessor 300. It is noted that a given VPE 302-304 that has been granted configuration permission (in this case VPE 2 303) may grant configuration permission to other VPEs 302-304, or revoke their configuration permissions, or revoke its own configuration permission. This is accomplished by updating prescribed VPE contexts 305-307 as described herein. Consider that RESOURCE M 328 is a bandwidth resource that allocates bandwidth of the virtual multiprocessor 300 to its VPEs 302-304 in accordance with an implemented scheduling policy as described above. According, it is diagrammatically represented that each of the exemplary VPEs 302-304 are accorded equal portions of the multiprocessor bandwidth, either via direct execution bandwidth allocation, or by setting execution priorities approximately equal, or by some other technique for prescribing bandwidth or bandwidth-related resources. One such technique for prescribing bandwidth-related resources that is contemplated by the present invention is allocation of load/store bandwidth to the VPEs 302-304. For example, if the number of memory operation buffers (not shown) in the virtual multiprocessor 300 which are shared among the VPEs 302-304 is less than the number of executing threads, then prior to executing the memory operations associated with a thread of a given VPE 302-304, the virtual multiprocessor 300 will evaluate whether or not the given thread should be switched out because such operations would exceed the bandwidth-related resource allocation prescribed for the given VPE 302-304. Such an approach to bandwidth allocation advantageously addresses situations where a small number of threads associated with one VPE 302-304, generate, for example, long sequences of cache misses that would otherwise monopolize the bandwidth-related resources (in this instance, memory operation buffers), thus preventing threads from other VPEs 302-304 from executing. By specifying bandwidth- related resource quotas, such situations are precluded in the virtual multiprocessor 300 according to the present invention.
[0048] Now referring to FIGURE 4, a table 400 is presented depicting virtual multiprocessing context registers in accordance with an exemplary embodiment of the present invention. The virtual multiprocessing context registers are employed to configure either a virtual multiprocessor context 210 or a virtual processing element context 104, as described above. The virtual multiprocessing context comprises registers MVPCONTROL, MVPCONF0, and MVPCONF1. The virtual processing element context for each VPE within a virtual multiprocessor comprises registers VPECONTROL, VPECONFO, VPECONF1, and VPESCHEDULE. The table 400 shows that the registers comport with the multithreading application specific extensions to the MIPS32/MIPS64 instruction set and privileged resource architecture which assigns a CP0 register number and register select number for to each of the shown registers for accessing contents therein. The structure and contents of the above registers will now be discussed with reference to FIGURE 5.
[0049] FIGURE 5 is a series of block diagrams illustrating exemplary embodiments of each of the virtual multiprocessing context registers 501-506, 592 of FIGURE 4. FIGURES 5A-5F include an illustration of the fields of the each of the registers and a table describing the various fields. Fields of particular relevance are discussed in more detail herein. Each of the registers illustrated in Figure 5 may be selectively read and/or written by VPE that has permission to dynamically configure resources, as indicated by the value of its MVP field 553 within its VPECONFO register 505. Certain fields within the registers 501-506, 592 can be written only by a VPE whose MVP field 553 indicates that it has configuration permission. Otherwise, the certain fields are read only, as controlled by the configuration logic 310. [0050] The MVPCONTROL register 501 has an STLB field 511, a VPC field 512, and an EVP field 513. A VPE 102 having configuration permission as describe above may update the VPC field 512 and the EVP field 513 to place the virtual multiprocessor 101 in a configuration state for configuration of resources. Clearing the VPC field 512 and setting the EVP field 513 causes new resource values to be latched in the configuration registers 501-506, 592 and for virtual processing to resume. A VPE 102 having configuration permission may update the STLB field 511 to cause sharing of address translation resources.
[0051] The MVPCONF0 register 502 and the MVPCONF1 register 503 are read-only registers that are read by a VPE 102 having configuration permission to determine the number and extent of configurable resources that are provided within a given virtual multiprocessor 101. Field TLBS indicates that address translation resources are sharable and that address translation resource sharing may be configured by setting field STLB 511 of the MVPCONTROL register 501. Field PVPE 524 prescribed the total number of VPEs 102 provided for by the virtual multiprocessor 101. In the embodiment of FIGURE 5, up to sixteen VPEs 102 may be employed. Field PTC 525 indicates the total number of thread contexts 103 provided for by the virtual multiprocessor 101. In the embodiment shown, up to 256 thread contexts 103 may be instantiated. Field C1M 531 indicates that allocatable coprocessors are media-extension capable. Field C1F 532 indicates whether allocatable coprocessor are floating point capable. Fields 533-535 indicate the total number of other ISA-specific resources available for allocation to VPEs 102.
[0052] Resources are allocated to a particular VPE 104 by writing to its VPE number to field TARGVPE 334 of its VPECONTROL register 504. One embodiment for writing field 334 is via MIPS MTTR and MFTR instructions described above.
[0053] The value of field VPA 552 in register VPECONFO 505 is set to enable/disable a designated VPE 102. Field MVP 553 is set to confer or revoke resource configuration permissions. Fields MINTC 554 and MAXTC 555 are updated to allocate the number and enumeration of thread contexts 103 to a designated VPE 102. Fields NCX 561, NCP2 56i2, and NCP1 563 are updated to allocate coprocessor resources to a particular VPE 102 in a MIPS32/MIPS64 multithreading application specific extension embodiment of the present invention. As noted above, the tables of FIGURES 5E and 5F show that the noted resource allocation fields 552-555, 561-563 are read-only fields. This is true for all VPEs 102 that do not have resource configuration permission, as indicated by the state of the MVP bit 553 in the VPECONFO register 505. But for a VPE 102 that is granted resource configuration permission, the configuration logic 310 enables the noted fields 552-555, 561-563 to be updated (i.e., written).
[0054] Register VPESCHEDULE 592 comprises a scheduler hint field 529 that can be updated to configure bandwidth resources across VPEs 102 in the virtual multiprocessor 101.
[0055] Although FIGURES 4 and 5 illustrate an exemplary embodiment of the present invention where certain resources can be dynamically configured in a MIPS32/MIPS64 multithreading application specific extension environment, the present inventor notes that the exemplary embodiment is provided according to a known instruction set architecture to teach aspects of the invention. The present inventor also notes that other architectures are comprehended as well.
[0056] Now turning to FIGURE 6, a flow chart 600 is presented depicting a method according to the present invention for dynamic configuration of virtual processor resources. The method begins at block 602 where a VPE according to the present invention desires to dynamically reconfigure resources. Flow then proceeds to block 604.
[0057] At block 604, the VPE context corresponding to the requesting VPE is read. Flow then proceeds to decision block 606.
[0058] At decision block 606, the VPE context is evaluated to determine whether the requesting VPE is permitted to dynamically configure resources in the virtual multiprocessor. If so, then flow proceeds to block 608. If not, then flow proceeds to block 607.
[0059] At block 607, since the requesting VPE does not have resource configuration permission, an exception is declared and flow proceeds to block 620.
[0060] At block 608, virtual processing within the virtual multiprocessor is disabled to allow for resource configuration. Flow then proceeds to block 610.
[0061] At block 610, a configuration state is established in the virtual multiprocessor. Flow then proceeds to block 612.
[0062] At block 612, the VMP context within the virtual multiprocessor is accessed to determine what and how many resources are available for configuration. Flow then proceeds to block 614.
[0063] At block 614, a target VPE is selected for configuration of its allocated resources. Flow then proceeds to block 616.
[0064] At block 616, the resources are configured for the selected VPE by updating its corresponding VPE context. Flow then proceeds to block 618.
[0065] At block 618, the new configuration of resources for the selected VPE is latched by exiting the configuration state and virtual processing within the virtual multiprocessor is re-enabled. Flow then proceeds to block 620.
[0066] At block 620, the method completes.
[0067] FIGURE 7 is a flow chart 700 depicting a revocable method according to the present invention for dynamic configuration of virtual processor resources. All blocks 702-720 of the flow chart 700 of FIGURE 7 are equivalent to corresponding blocks 602- 620 of the flow chart 600 of FIGURE 6, where the hundreds digit is replaced with a 7, except for an additional block 717 wherein the VPE context for the selected VPE is updated to revoke its permission to dynamically configure resources. It is noted that the requesting VPE of block 702 can be the same as the selected VPE of block 717, thus enabling a VPE to revoke its own configuration permission. After latching the new configuration in block 718, the requesting VPE can no longer configure resources.
[0068] Although the present invention and its objects, features, and advantages have been described in detail, other embodiments are encompassed by the invention. For example, in addition to implementations of the present invention using hardware, the present invention can be embodied in software (e.g., computer readable code, program code, instructions and/or data) disposed, for example, in a computer usable (e.g., readable) medium. Such software enables the function, fabrication, modeling, simulation, description and/or testing of the apparatus and method described herein. For example, this can be accomplished through the use of general programming languages (e.g., C, C++, JAVA, etc.), GDSII databases, hardware description languages (HDL) including Verilog HDL, VHDL, and so on, or other available programs, databases, and/or circuit (i.e., schematic) capture tools. Such software can be disposed in any known computer usable (e.g., readable) medium including semiconductor memory, magnetic disk, optical disc (e.g., CD-ROM, DVD-ROM, etc.) and as a computer data signal embodied in a computer usable (e.g., readable) transmission medium (e.g., carrier wave or any other medium including digital, optical, or analog-based medium). As such, the software can be transmitted over communication networks including the Internet and intranets. It is understood that the invention can be embodied in software (e.g., in HDL as part of a semiconductor intellectual property core, such as a microprocessor core, or as a system- level design, such as a System on Chip or SOC) and transformed to hardware as part of the production of integrated circuits. Also, the invention may be embodied as a combination of hardware and software.
[0069] Finally, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the spirit and scope of the invention as defined by the appended claims.
[0070] I claim:

Claims

1. An apparatus for configuring resources for one or more virtual processing elements in a virtual multiprocessor, the apparatus comprising: a virtual multiprocessor context, for prescribing the resources, and for controlling a configuration state of the virtual multiprocessor; one or more virtual processing element contexts, each exclusively corresponding to one of the one or more virtual processing elements, said each comprising: first logic, for prescribing whether said one of the one or more virtual processing elements is permitted to configure the resources; and second logic, for prescribing a subset of the resources that is allocated to said one of the one or more virtual processing elements; and configuration logic, coupled to said virtual multiprocessor context and said one or more virtual processing element contexts, for detecting whether said one of the one or more virtual processing elements is permitted to configure the resources, for updating said virtual multiprocessor context to direct that the virtual multiprocessor enter said configuration state, and for configuring the resources by updating a prescribed virtual processing element context.
2. The apparatus as recited in claim 1, wherein the one or more virtual processing elements execute concurrently within the virtual multiprocessor, and wherein the virtual multiprocessor appears as a symmetric multiprocessor to a symmetric multiprocessing operating system.
3. The apparatus as recited in claim 1, wherein said each of the one or more virtual processing elements comprise one or more thread contexts that are configured to concurrently execute one or more threads.
4. The apparatus as recited in claim 3, wherein each of the one or more thread contexts share configured resources, wherein said configured resources have been allocated from the resources to a corresponding one of the one or more virtual processing elements.
5. The apparatus as recited in claim 1, wherein the resources comprise one or more attributes of the virtual multiprocessor, and wherein configuration of the resources for a particular virtual processing element determines the manner in which said particular virtual processing element performs relative to all other ones of the one or more virtual processing elements within the virtual multiprocessor.
5. The apparatus as recited in claim 1, wherein the resources comprise translation lookahead buffer attributes.
6. The apparatus as recited in claim 1, wherein the resources comprise coprocessing attributes.
7. The apparatus as recited in claim 1, wherein the resources comprise floating point processing attributes.
8. The apparatus as recited in claim 1, wherein the resources comprise media acceleration attributes.
9. The apparatus as recited in claim 1, wherein the resources comprise permission to configure the resources.
10. The apparatus as recited in claim 1, wherein the resources comprise thread contexts.
11. The apparatus as recited in claim 1, wherein the resources comprise bandwidth of the virtual multiprocessor.
12. The apparatus as recited in claim 1, wherein the resources comprise virtual processing element enablement.
13. The apparatus as recited in claim 1, wherein each of the one or more virtual processing elements comprises an instantiation of the MIPS32/MIPS64 instruction and privileged resource architecture.
14. The apparatus as recited in claim 1, wherein said prescribed virtual processing element context corresponds to said one of the one or more virtual processing elements.
15. The apparatus as recited in claim 14, wherein said one of the one or more virtual processing elements may revoke its own permission to configure the resources.
16. The apparatus as recited in claim 1, wherein said prescribed virtual processing element context corresponds to a different one of the one or more virtual processing elements.
17. The apparatus as recited in claim 16, wherein said one of the one or more virtual processing elements may revoke the permission to configure the resources for said different one of the one or more virtual processing elements.
18. The apparatus as recited in claim 1, wherein said virtual multiprocessing context comprises one or more registers, and wherein said configuration state is controlled by writing a value to a configuration state field therein.
19. The apparatus as recited in claim 1, wherein said first logic comprises a master virtual processor field within one or more virtual processor context registers, and wherein a particular value of said master virtual processor field prescribes whether said one of the one or more virtual processing elements is permitted to configure the resources.
20. The apparatus as recited in claim 1, wherein said second logic comprises one or more fields within one or more virtual processor context registers, and wherein said one or more fields can be updated only by a given virtual processing element that is permitted to configure the resources.
21. The apparatus of claim 20 , wherein, if said given virtual processing element is not permitted to configure the resources, then said configuration logic causes an exception.
22. The apparatus as recited in claim 1, wherein one or more program instructions are executed by said one of the one or more virtual processing elements to establish said configuration state and to configure the resources.
23. A resource configuration mechanism, for assigning resources to virtual processing elements within a virtual multiprocessor, the resource configuration mechanism comprising: virtual multiprocessor registers, for prescribing the resources, and for controlling a configuration state of the virtual multiprocessor; for each of the virtual processing elements, virtual processing element registers, for prescribing whether a corresponding virtual processing element is permitted to assign the resources, and for prescribing a subset of the resources that is allocated to said corresponding virtual processing element; and configuration logic, coupled to said virtual multiprocessor registers and said virtual processing element registers, for detecting whether said corresponding virtual processing element is permitted to assign the resources, for updating said virtual multiprocessor registers to direct that the virtual multiprocessor enter said configuration state, and for assigning the resources by updating selected ones of said virtual processing element registers.
24. The apparatus as recited in claim 23, wherein the resources comprise translation lookahead buffer attributes.
25. The apparatus as recited in claim 23, wherein the resources comprise coprocessing attributes.
26. The apparatus as recited in claim 23, wherein the resources comprise floating point processing attributes.
27. The apparatus as recited in claim 23, wherein the resources comprise media acceleration attributes.
28. The apparatus as recited in claim 23, wherein the resources comprise permission to configure the resources.
29. The apparatus as recited in claim 23, wherein the resources comprise thread contexts.
30. The apparatus as recited in claim 23, wherein the resources comprise bandwidth of the virtual multiprocessor.
31. The apparatus as recited in claim 23, wherein the resources comprise virtual processing element enablement.
32. The apparatus as recited in claim 23, wherein each of the virtual processing . elements comprises an instantiation of the MIPS32/MIPS64 instruction and privileged resource architecture.
33. The apparatus as recited in claim 23, wherein said corresponding virtual processing element may revoke its own permission to assign the resources.
34. The apparatus as recited in claim 23, wherein said corresponding virtual processing element may revoke the permission to configure the resources for a different one of the virtual processing elements.
35. A computer program product for use with a computing device, the computer program product comprising: a computer usable medium, having computer readable program code embodied in said medium, configured to describe an apparatus for configuring resources for virtual processing elements in a virtual multiprocessor, said computer readable program code comprising: first program code, configured to describe a virtual multiprocessor context, said virtual multiprocessor context prescribing said resources, and for controlling a configuration state of said virtual multiprocessor; second program code, configured to describe virtual processing element contexts, each exclusively corresponding to one of said virtual processing elements, and prescribing whether said one of said virtual processing elements is permitted to configure said resources, and prescribing a subset of said resources that is allocated to said one of said virtual processing elements; and third program code, configured to describe configuration logic, said configuration logic being coupled to said virtual multiprocessor context and to said virtual processing element contexts, for detecting whether said one of said virtual processing elements is permitted to configure said resources, for updating said virtual multiprocessor context to direct that said virtual multiprocessor enter said configuration state, and for configuring said resources by updating a prescribed virtual processing element context.
36. The computer program product as recited in claim 35, wherein said resources comprise one or more attributes of said virtual multiprocessor, and wherein configuration of said resources for said prescribed virtual processing element determines the manner in which said prescribed virtual processing element performs relative to all other ones of said virtual processing elements within said virtual multiprocessor.
37. The computer program product as recited in claim 35, wherein said resources comprise translation lookahead buffer attributes.
38. The computer program product as recited in claim 35, wherein said resources comprise coprocessing attributes.
39. The computer program product as recited in claim 35, wherein said resources comprise floating point processing attributes.
40. The computer program product as recited in claim 35, wherein said resources comprise media acceleration attributes.
41. The computer program product as recited in claim 35, wherein said resources comprise permission to configure said resources.
42. The computer program product as recited in claim 35, wherein said resources comprise thread contexts.
43. The computer program product as recited in claim 35, wherein said resources comprise bandwidth of said virtual multiprocessor.
44. The computer program product as recited in claim 35, wherein said resources comprise virtual processing element enablement.
45. The computer program product as recited in claim 35, wherein each of said virtual processing elements comprises an instantiation of the MIPS32/MIPS64 instruction and privileged resource architecture.
46. A computer data signal embodied in a transmission medium, comprising: computer-readable program code, configured to describe an apparatus for configuring resources for virtual processing elements in a virtual multiprocessor, said computer-readable program code comprising: first program code, configured to describe a virtual multiprocessor context, said virtual multiprocessor context prescribing said resources, and for controlling a configuration state of said virtual multiprocessor; second program code, configured to describe virtual processing element contexts, each exclusively corresponding to one of said virtual processing elements, and prescribing whether said one of said virtual processing elements is permitted to configure said resources, and prescribing a subset of said resources that is allocated to said one of said virtual processing elements; and third program code, configured to describe configuration logic, said configuration logic being coupled to said virtual multiprocessor context and to said virtual processing element contexts, for detecting whether said one of said virtual processing elements is permitted to configure said resources, for updating said virtual multiprocessor context to direct that said virtual multiprocessor enter said configuration state, and for configuring said resources by updating a prescribed virtual processing element context.
47. The computer data signal as recited in claim 46, wherein said resources comprise one or more attributes of said virtual multiprocessor, and wherein configuration of said resources for said prescribed virtual processing element determines the manner in which said prescribed virtual processing element performs relative to all other ones of said virtual processing elements within said virtual multiprocessor.
48. The computer data signal as recited in claim 46, wherein said resources comprise translation lookahead buffer attributes.
49. The computer data signal as recited in claim 46, wherein said resources comprise coprocessing attributes.
50. The computer data signal t as recited in claim 46, wherein said resources comprise floating point processing attributes.
51. The computer data signal t as recited in claim 46, wherein said resources comprise media acceleration attributes.
52. The computer data signal as recited in claim 46, wherein said resources comprise permission to configure said resources.
53. The computer data signal as recited in claim 46, wherein said resources comprise thread contexts.
54. The computer data signal as recited in claim 46, wherein said resources comprise bandwidth of said virtual multiprocessor.
55. The computer data signal as recited in claim 46, wherein said resources comprise virtual processing element enablement.
56. The computer data signal as recited in claim 46, wherein each of said virtual processing elements comprises an instantiation of the MIPS32/MIPS64 instruction and privileged resource architecture.
57. A method for configuring resources for virtual processing elements in a virtual multiprocessor, the method comprising: via a virtual multiprocessor context, first prescribing the resources, and controlling a configuration state of the virtual multiprocessor; via virtual processing element contexts, each exclusively corresponding to one of the virtual processing elements, second prescribing whether the one of the virtual processing elements is permitted to configure the resources, and third prescribing a subset of the resources that is allocated to the one of the virtual processing elements; and via configuration logic that is coupled to the virtual multiprocessor context and to the virtual processing element contexts, detecting whether the one of the virtual processing elements is permitted to configure the resources, and first updating the virtual multiprocessor context to direct that the virtual multiprocessor enter said configuration state, and configuring the resources by second updating a prescribed virtual processing element context.
58. The method as recited in claim 57, wherein said second updating comprises: allocating one or more attributes of the virtual multiprocessor.
59. The method as recited in claim 58, wherein said allocating comprises: assigning translation lookahead buffer attributes.
60. The method as recited in claim 58, wherein said allocating comprises: assigning coprocessing attributes.
61. The method as recited in claim 58, wherein said allocating comprises: assigning floating point processing attributes.
62. The method as recited in claim 58, wherein said allocating comprises: assigning media acceleration attributes.
63. The method as recited in claim 58, wherein said allocating comprises: assigning permission to configure the resources.
64. The method as recited in claim 58, wherein said allocating comprises: assigning thread contexts.
65. The method as recited in claim 58, wherein said allocating comprises: assigning bandwidth of the virtual multiprocessor.
66. The method as recited in claim 58, wherein said allocating comprises: enabling a given virtual processing element.
67. The method as recited in claim 57, wherein each of the virtual processing elements comprises an instantiation of the MIPS32/MIPS64 instruction and privileged resource architecture.
68. A virtual multiprocessing system, comprising: a memory, configured to store program instructions associated with a plurality of program threads; and a virtual multiprocessor, coupled to said memory, configured to execute said program instructions on one or more virtual processing elements configured within said virtual multiprocessor, wherein said virtual multiprocessor has a virtual multiprocessor context that prescribes resources for configuration of said one or more virtual processing elements, and that controls a configuration state of said virtual multiprocessor, wherein each of said one or more virtual processing elements comprise: a virtual processing element context, for prescribing whether said each of said one or more virtual processing elements is permitted to configure said resources, and for prescribing a subset of said resources that is allocated to a prescribed one of said one or more virtual processing elements; and
configuration logic, coupled to said virtual multiprocessor context and said virtual processing element context, for detecting whether said each of said one or more virtual processing elements is permitted to configure said resources, for updating said virtual multiprocessor context to direct that said virtual multiprocessor enter said configuration state, and for configuring said resources by updating a prescribed virtual processing element context corresponding to said prescribed one of said one or more virtual processing elements.
PCT/US2004/027976 2003-08-28 2004-08-27 Mechanisms for dynamic configuration of virtual processor resources WO2005022385A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP04782455A EP1660998A1 (en) 2003-08-28 2004-08-27 Mechanisms for dynamic configuration of virtual processor resources
JP2006524900A JP4740851B2 (en) 2003-08-28 2004-08-27 Mechanism for dynamic configuration of virtual processor resources

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
US60/499,180 2003-08-28
US60/502,358 2003-09-12
US60/502,359 2003-09-12
US10/684,348 2003-10-10
US10/684,348 US20050050305A1 (en) 2003-08-28 2003-10-10 Integrated mechanism for suspension and deallocation of computational threads of execution in a processor
US10/684,350 2003-10-10

Publications (1)

Publication Number Publication Date
WO2005022385A1 true WO2005022385A1 (en) 2005-03-10

Family

ID=34274797

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/US2004/027827 WO2005022384A1 (en) 2003-08-28 2004-08-27 Apparatus, method, and instruction for initiation of concurrent instruction streams in a multithreading microprocessor
PCT/US2004/027976 WO2005022385A1 (en) 2003-08-28 2004-08-27 Mechanisms for dynamic configuration of virtual processor resources

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/US2004/027827 WO2005022384A1 (en) 2003-08-28 2004-08-27 Apparatus, method, and instruction for initiation of concurrent instruction streams in a multithreading microprocessor

Country Status (1)

Country Link
WO (2) WO2005022384A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009087233A1 (en) * 2008-01-11 2009-07-16 International Business Machines Corporation Performing a configuration virtual topology change
US7594089B2 (en) 2003-08-28 2009-09-22 Mips Technologies, Inc. Smart memory based synchronization controller for a multi-threaded multiprocessor SoC
US7610473B2 (en) 2003-08-28 2009-10-27 Mips Technologies, Inc. Apparatus, method, and instruction for initiation of concurrent instruction streams in a multithreading microprocessor
US7676664B2 (en) 2003-08-28 2010-03-09 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7711931B2 (en) 2003-08-28 2010-05-04 Mips Technologies, Inc. Synchronized storage providing multiple synchronization semantics
US7836450B2 (en) 2003-08-28 2010-11-16 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7849297B2 (en) 2003-08-28 2010-12-07 Mips Technologies, Inc. Software emulation of directed exceptions in a multithreading processor
US7870553B2 (en) 2003-08-28 2011-01-11 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US20130152102A1 (en) * 2011-12-12 2013-06-13 Microsoft Corporation Runtime-agnostic management of applications
US9032404B2 (en) 2003-08-28 2015-05-12 Mips Technologies, Inc. Preemptive multitasking employing software emulation of directed exceptions in a multithreading processor

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7203100B2 (en) 2004-11-01 2007-04-10 Sun Mircosystems, Inc. Efficient implementation of a read scheme for multi-threaded register file
US20060136919A1 (en) * 2004-12-17 2006-06-22 Sun Microsystems, Inc. System and method for controlling thread suspension in a multithreaded processor
US8516483B2 (en) * 2005-05-13 2013-08-20 Intel Corporation Transparent support for operating system services for a sequestered sequencer
WO2008077283A1 (en) * 2006-12-27 2008-07-03 Intel Corporation Pointer renaming in workqueuing execution model
US7734900B2 (en) 2008-01-11 2010-06-08 International Business Machines Corporation Computer configuration virtual topology discovery and instruction therefore
JP5548037B2 (en) 2010-06-11 2014-07-16 パナソニック株式会社 Command issuing control device and method
WO2012093488A1 (en) 2011-01-07 2012-07-12 富士通株式会社 Scheduling method, and multi-core processor system
CN107870866B (en) * 2016-09-28 2023-09-26 厦门鑫忆讯科技有限公司 IO command scheduling method and NVM interface controller
CN110955503B (en) * 2018-09-27 2023-06-27 深圳市创客工场科技有限公司 Task scheduling method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5659786A (en) * 1992-10-19 1997-08-19 International Business Machines Corporation System and method for dynamically performing resource reconfiguration in a logically partitioned data processing system
EP0917057A2 (en) * 1997-11-04 1999-05-19 Digital Equipment Corporation Multiprocessor computer architecture with multiple operating system instances and software controlled resource allocation
EP1089173A2 (en) * 1999-09-28 2001-04-04 International Business Machines Corporation Dynamic adjustment of logical processor configuration
US6330656B1 (en) 1999-03-31 2001-12-11 International Business Machines Corporation PCI slot control apparatus with dynamic configuration for partitioned systems

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990014629A2 (en) * 1989-05-26 1990-11-29 Massachusetts Institute Of Technology Parallel multithreaded data processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5659786A (en) * 1992-10-19 1997-08-19 International Business Machines Corporation System and method for dynamically performing resource reconfiguration in a logically partitioned data processing system
EP0917057A2 (en) * 1997-11-04 1999-05-19 Digital Equipment Corporation Multiprocessor computer architecture with multiple operating system instances and software controlled resource allocation
US6330656B1 (en) 1999-03-31 2001-12-11 International Business Machines Corporation PCI slot control apparatus with dynamic configuration for partitioned systems
EP1089173A2 (en) * 1999-09-28 2001-04-04 International Business Machines Corporation Dynamic adjustment of logical processor configuration

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7725689B2 (en) 2003-08-28 2010-05-25 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7610473B2 (en) 2003-08-28 2009-10-27 Mips Technologies, Inc. Apparatus, method, and instruction for initiation of concurrent instruction streams in a multithreading microprocessor
US7730291B2 (en) 2003-08-28 2010-06-01 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7836450B2 (en) 2003-08-28 2010-11-16 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7676664B2 (en) 2003-08-28 2010-03-09 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7694304B2 (en) 2003-08-28 2010-04-06 Mips Technologies, Inc. Mechanisms for dynamic configuration of virtual processor resources
US7711931B2 (en) 2003-08-28 2010-05-04 Mips Technologies, Inc. Synchronized storage providing multiple synchronization semantics
US7725697B2 (en) 2003-08-28 2010-05-25 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US9032404B2 (en) 2003-08-28 2015-05-12 Mips Technologies, Inc. Preemptive multitasking employing software emulation of directed exceptions in a multithreading processor
US7594089B2 (en) 2003-08-28 2009-09-22 Mips Technologies, Inc. Smart memory based synchronization controller for a multi-threaded multiprocessor SoC
US7676660B2 (en) 2003-08-28 2010-03-09 Mips Technologies, Inc. System, method, and computer program product for conditionally suspending issuing instructions of a thread
US7849297B2 (en) 2003-08-28 2010-12-07 Mips Technologies, Inc. Software emulation of directed exceptions in a multithreading processor
US7870553B2 (en) 2003-08-28 2011-01-11 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US8266620B2 (en) 2003-08-28 2012-09-11 Mips Technologies, Inc. Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US10621007B2 (en) 2008-01-11 2020-04-14 International Business Machines Corporation Execution of an instruction for performing a configuration virtual topology change
WO2009087233A1 (en) * 2008-01-11 2009-07-16 International Business Machines Corporation Performing a configuration virtual topology change
US20130152102A1 (en) * 2011-12-12 2013-06-13 Microsoft Corporation Runtime-agnostic management of applications
US9558092B2 (en) * 2011-12-12 2017-01-31 Microsoft Technology Licensing, Llc Runtime-agnostic management of applications

Also Published As

Publication number Publication date
WO2005022384A1 (en) 2005-03-10

Similar Documents

Publication Publication Date Title
US7694304B2 (en) Mechanisms for dynamic configuration of virtual processor resources
US7418585B2 (en) Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US8266620B2 (en) Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US7870553B2 (en) Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
US20060161921A1 (en) Preemptive multitasking employing software emulation of directed exceptions in a multithreading processor
US20060161421A1 (en) Software emulation of directed exceptions in a multithreading processor
WO2005022385A1 (en) Mechanisms for dynamic configuration of virtual processor resources
US20050050305A1 (en) Integrated mechanism for suspension and deallocation of computational threads of execution in a processor
US20050050395A1 (en) Mechanisms for assuring quality of service for programs executing on a multithreaded processor
Torrant Investigation of a simultaneous multithreaded architecture

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200480024801.6

Country of ref document: CN

AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DPEN Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 2004782455

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2006524900

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 1340/DELNP/2006

Country of ref document: IN

WWP Wipo information: published in national office

Ref document number: 2004782455

Country of ref document: EP