WO2006074024A2 - A mechanism for instruction set based thread execution on a plurality of instruction sequencers - Google Patents

A mechanism for instruction set based thread execution on a plurality of instruction sequencers Download PDF

Info

Publication number
WO2006074024A2
WO2006074024A2 PCT/US2005/047328 US2005047328W WO2006074024A2 WO 2006074024 A2 WO2006074024 A2 WO 2006074024A2 US 2005047328 W US2005047328 W US 2005047328W WO 2006074024 A2 WO2006074024 A2 WO 2006074024A2
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
sequencer
user
level
execution
Prior art date
Application number
PCT/US2005/047328
Other languages
French (fr)
Other versions
WO2006074024A3 (en
Inventor
Hong Wang
John Shen
Ed Grochowski
James Paul Held
Bryant Bigbee
Shivnandan D. Kaushik
Gautham Chinya
Xiang Zou
Per Hammarlund
Xinmin Tien
Anil Aggarwal
Scott Dion Rodgers
Baiju V. Patel
Richard Hankins
Original Assignee
Intel Corporation
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 US11/173,326 external-priority patent/US8719819B2/en
Application filed by Intel Corporation filed Critical Intel Corporation
Priority to JP2007549602A priority Critical patent/JP5260962B2/en
Priority to DE112005003343T priority patent/DE112005003343B4/en
Priority to CN2005800448962A priority patent/CN101116057B/en
Publication of WO2006074024A2 publication Critical patent/WO2006074024A2/en
Publication of WO2006074024A3 publication Critical patent/WO2006074024A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Definitions

  • Embodiments of the invention relate to methods and apparatus for processing instructions.
  • microprocessor design approaches to improve microprocessor performance have included increased clock speeds, pipelining, branch prediction, super-scalar execution, out-of-order execution, and caches. Many such approaches have led to increased transistor count, and have even, in some instances, resulted in transistor count increasing at a rate greater than the rate of improved performance.
  • multithreading an instruction stream may be divided into multiple instruction streams that can be executed in parallel. Alternatively, multiple independent software streams may be executed in parallel.
  • time-slice multithreading or time-multiplex (“TMUX”) multithreading
  • a single processor switches between threads after a fixed period of time.
  • a single processor switches between threads upon occurrence of a trigger event, such as a long latency cache miss.
  • SoEMT switch-on-event multithreading
  • processors in a multi-processor system such as chip multiprocessor (“CMP") systems (multiple processors on single chip package) and symmetric multi-processor (“SMP”) systems (multiple processors on multiple chips), may each act on one of the multiple software threads concurrently.
  • CMP chip multiprocessor
  • SMP symmetric multi-processor
  • a single physical processor core is made to appear as multiple logical processors to operating systems and user programs.
  • multiple software threads can be active and execute simultaneously on a single processor core.
  • each logical processor maintains a complete set of the architecture state, but many other resources of the physical processor, such as caches, execution units, branch predictors, control logic and buses are shared. For SMT, the instructions from multiple software threads thus execute concurrently on each logical processor.
  • an operating system may control scheduling and execution of the software threads.
  • user-level threads can merely be scheduled for execution by an application running on a processing resource that is managed by an OS. Accordingly, in the typical processing system with multiple processors there is no mechanism to schedule a user-level thread to run on a processor that is not directly managed by the OS.
  • Figures 1 A and 1 B show high-level block diagrams of a multi-sequencer system, in accordance with one embodiment of the invention
  • Figures 1C is a block diagram illustrating selected features of embodiments of a multi-sequencer system that supports control of threads by user- level instructions;
  • Figure 2 shows a logical view of multi-sequencer hardware forming a part of the multi-sequencer system of Figures 1A - 1C;
  • Figure 3a shows a view of an instruction set architecture for the systems of Figures 1A - 1C;
  • Figure 3b illustrates a logical diagram of an embodiment of a processor with two or more instruction sequencers that include a user-level control-transfer instruction and a user-level monitor instruction in their instruction sets.
  • FIGS 4A and 4B shows the format of the SXFR and SEMONITOR instructions, respectively, in accordance to one embodiment of the invention
  • FIG. 5 illustrates how the SXFR instruction can be used to implement inter-sequencer control transfer, in accordance with one embodiment of the invention
  • Figures 6A-6B illustrate tables, in accordance with one embodiment of the invention, that may be used to program a service channel;
  • Figure 7 shows a functional block diagram of the components that make up the thread management logic of the systems of Figures 1A- 1C, in accordance with one embodiment of the invention;
  • Figure 8 illustrate the operation of a proxy execution mechanism, in accordance with one embodiment of the invention.
  • Figure 9 and 10 show examples of logical processors, in accordance with one embodiment of the invention.
  • Figure 11 shows how the SXFR and SEMONITOR instructions may be used to support proxy execution upon a page-fault handling by the OS, in accordance with one embodiment of the invention.
  • Figure 12 shows a processing system in accordance with one embodiment of the invention.
  • Figure 13 illustrates a block diagram of an example computer system that may use an embodiment of a processor component, such as a Central Processing Unit (CPU) or chipset, that includes one or more instruction sequencers configured to execute one or more user-level threads that contain sequencer aware user-level instructions.
  • a processor component such as a Central Processing Unit (CPU) or chipset
  • CPU Central Processing Unit
  • chipset that includes one or more instruction sequencers configured to execute one or more user-level threads that contain sequencer aware user-level instructions.
  • an instruction sequencer includes next instruction pointer logic and at least some processor state.
  • an instruction sequencer may comprise a logical processor, or a physical processor core.
  • the architectural mechanism may comprise just two instructions that together define a signaling mechanism to send and receive a signal between any two sequencers without using an OS Application Program Interface.
  • the signal may comprise an architecturally defined event or scenario, which is mapped to handler-code.
  • the scenario in the signal acts as a trigger to cause the sequencer to vector to the handler-code.
  • the two instructions may be used to create a proxy execution mechanism to cause a servant sequencer to execute code on behalf of a client sequencer, as will be explained in greater detail below.
  • example processor systems include two or more instruction sequencers to execute different threads. At least some of the two or more instruction sequencers include sequencer-aware user-level instructions in their instruction sets that allow for inter sequencer control by a thread management operation on a specified instruction sequencer without intervention from an operating system.
  • the sequencer-aware user-level instructions may include an instruction sequencer control transfer instruction, an instruction sequencer monitoring instruction, a context save instruction, and a context restore instruction.
  • the processor system may also have thread management logic to respond to a user-level instruction to allow a non- sequestered instruction sequencer to create parallel threads of execution on the associated sequestered instruction sequencers without an operating system scheduler.
  • the processor system may have a proxy execution mechanism to allow a client instruction sequencer to trigger a proxy thread to execute on the servant instruction sequencer on behalf of the client instruction sequencer in response to certain triggering conditions encountered during instruction execution on the client sequencer and without intervention of the operating system.
  • the multi-sequencer system 100A includes a memory 102 and multi- sequencer hardware 104.
  • the memory 102 comprises a user-level program 106, which includes a scheduler 108 to schedule instructions for execution on the multi- sequencer hardware 104.
  • the user-level program 106 makes use of a thread AP1 110 to a thread library that provides thread creation, control, and synchronization primitives to the user-level program 106.
  • the multi- sequencer hardware 104 includes a plurality of sequencers, only four of which have been shown in Figure 1 A. The four shown sequencers are designated SIDO, SID1, SID2, and SID3, respectively.
  • a “sequencer” may be a distinct thread execution resource and may be any physical or logical unit capable of executing a thread.
  • An instruction sequencer may include a next instruction pointer logic to determine the next instruction to be executed for the given thread.
  • a sequencer may be a logical thread unit or a physical thread unit.
  • multiple instruction sequencers may be within a same processor core.
  • each instruction sequencers may be within a different processor core.
  • the instruction set architecture may be an abstract model of the processor core that consists of state elements (registers) and instructions that operate on those state elements.
  • the instruction set architecture serves as a boundary between software and hardware by providing an abstract specification of the processor core's behavior to both the programmer and the microprocessor designer.
  • the instruction set may define the set of instructions that the processor core is capable of decoding and executing.
  • Chip Multiprocessing (CMP) embodiments of the multi- sequencer hardware 104 discussed herein refers to only a single thread per sequencer SID0-SID3, it should not be assumed that the disclosures herein are limited to single-threaded processors.
  • the techniques discussed herein may be employed in any Chip Multiprocessing (CMP) or Simultaneous Multithreading Processor (SMT) system, including in a hybrid system with CMP processors and SMT processors where each core of a CMP processor is a SMT processor or a Switch-On-Event Multiprocessor (SoeMT).
  • SoeMT Switch-On-Event Multiprocessor
  • the techniques disclosed herein may be used in system that includes multiple multi-threaded processor cores in a single chip package 104.
  • sequencers SID0-SID3 are not necessarily uniform and may be asymmetrical respect to any factor that affects computation quality such as processing speed, processing capability, and power consumption.
  • the sequencer SIDO may be "heavy weight” in that it is designed to process all instructions of a given instruction set architecture (e.g. IA32 the Instruction Set Architecture).
  • the sequencer SID1 may be "light weight” in that it can only process a selected subset of those instructions.
  • a heavyweight processor may be one that processes instructions at a faster rate than a lightweight processor.
  • the sequencer SIDO is Operating System (OS) - visible, whereas the sequencers SID1 to SID3 are OS sequestered.
  • OS Operating System
  • OS sequestered denotes a sequencer that has transitioned to a sequestered state or condition. A characteristic of such a sequestered state or condition is that the OS does not schedule instructions for a sequencer in such a state.
  • the multi-sequencer hardware or firmware also includes thread management logic 114.
  • the thread management logic 114 virtualizes the sequencers SID0-SID3 so that they appear to the user-level program 106, as uniform.
  • the thread management logic 114 masks the asymmetry of the sequencers SID0-SID3 so that from a logical point of view as seen by an assembly language programmer, the sequencers SID0-SID3 appear uniform, as is depicted in the view 200 shown in Figure 2 of the drawings.
  • the user-level program 106 is tightly coupled to the multi-sequencer hardware 104.
  • the user-level program 106 may be loosely coupled to the multi- sequencer hardware 104 through intermediate drivers.
  • Such a system is depicted by reference numeral 100B, in Figure 1B of the drawings.
  • the system 100B is basically the same as the system 100A, except that instead of using scheduler 108, the user-level program makes use of a kernel level software such as a device driver 116, such as a driver, a hardware abstraction layer, etc, to communicate with kernel level AP1 118 in order to schedule instructions for execution on the multi- sequencer hardware 104.
  • a kernel level software such as a device driver 116, such as a driver, a hardware abstraction layer, etc
  • Fig. 1c is a block diagram illustrating selected features of embodiments 109, 115, 150, 170 of a multi-sequencer system that supports control of threads by user-level instructions.
  • Fig. 1c illustrates selected features of an SMT multi- sequencer multithreading system 109, where each sequencer is a logical processor that may execute a thread concurrently with execution of other threads on other logical processors.
  • Figure 1 also illustrates at least one embodiment of a multi-sequencer system 115 that supports multiple logical sequencers via a switch- on-event (SoeMT) mechanism, such as a time-multiplexing type of switching mechanism, such that each of the logical processors takes turns running its thread - merely one thread executes at a time on such system 115.
  • SoeMT switch- on-event
  • Fig. 1c also illustrates selected features of multiple-core multithreading systems 150, 170.
  • the physical cores for a multi-core multithreading system may be either single-sequencer cores (see, e.g., system 150) or may be multi- sequencer cores (see, e.g., system 170). Such multi-core multithreading embodiments are discussed later, below, while the single-core multi-sequencer systems 109, 115 are discussed immediately below.
  • a single physical processor 103 is made to appear as multiple thread contexts, referred to herein as TCi through TC n (not shown). Each of the n thread contexts is effectively a sequencer.
  • Each thread context TCi through TC n maintains a set of the architecture state ASi - AS n , respectively.
  • the architecture state includes, for at least one embodiment, data registers, segment registers, control registers, debug registers, and most of the model specific registers.
  • the thread contexts TCi- TC n share most other resources of the physical processor 103, such as caches, execution units, branch predictors, control logic and buses.
  • each thread context in the multithreading system 109 can independently generate the next instruction address (and perform, for instance, a fetch from an instruction cache, an execution instruction cache, or trace cache).
  • the processor 103 includes logically independent next-instruction-pointer and fetch logic 120 to fetch instructions for each thread context, even though the multiple logical sequencers may be implemented in a single physical fetch/decode unit 122.
  • the term "sequencer" may encompass at least the next-instruction-pointer and fetch logic 120 for a thread context, along with at least some of the associated architecture state, AS, for that thread context.
  • AS architecture state
  • the sequencers of an SMT system 109 need not be symmetric. For example, two SMT sequencers of the same physical processor may differ in the amount of architectural state information that they each maintain.
  • the multi-sequencer system 109 is a single-core processor 103 that supports concurrent multithreading.
  • each sequencer is a logical processor having its own instruction next- instruction-pointer and fetch logic and its own architectural state information, although the same physical processor core 103 executes all thread instructions.
  • the logical processor maintains its own version of the architecture state, although execution resources of the single processor core 103 may be shared among concurrently-executing threads.
  • Fig. 1c also illustrates an alternative embodiment of a multi-sequencer system 115 that is capable of executing multi-threaded code.
  • the embodiment 115 is labeled as a Switch-on-Event Multithreading ("SOEMT") embodiment.
  • SOEMT Switch-on-Event Multithreading
  • each sequencer is similar to the sequencers of the previous embodiment 109, in that each sequencer is a logical processor having its architectural state information and own instruction next-instruction-pointer.
  • the system 115 differs from that 109 discussed above in that the sequencers each share with the other sequencers the same physical fetch logic 120 in a single fetch/decode unit 122 in the physical processor core 103.
  • the fetch logic 120 may be switched to fetch for different sequencers of the system 115 based on a variety of switch-on-event policies.
  • the switch-on-event triggers may be passage of a specific amount of time or machine cycles, such as time- multiplexing (TMUX).
  • TMUX time- multiplexing
  • the SOEMT triggers may other events, such as cache-miss events, page faults, long-latency instructions, etc.
  • Fig. 1c also illustrates at least two embodiments of multi-core multithreading systems 150, 170.
  • the system may use a processor 103 as a building block.
  • Each of the sequencers may be a processor core 103, with the multiple cores 103i - 103 n , 103i - 103 m residing in a single chip package 160, 180, respectively.
  • chip packages 160, 180 are denoted with broken lines in Fig. 1c to indicate that the illustrated single-chip embodiments of multi-core systems 150, 170 are illustrative merely.
  • processor cores of a multi- core system may reside on separate chips, or may be organized as an SOEMT multi-sequencer system.
  • a first multi-core multithreading system 150 illustrated in Fig. 1c may include two or more separate physical processors 103 1 - 103nthat is each capable of executing a different thread such that execution of at least portions of the different threads may be ongoing at the same time.
  • Each processor 103i through 103 n includes a physically independent fetch unit 122 to fetch instruction information for its respective thread.
  • the fetch/decode unit 122 implements a single next-instruction-pointer and fetch logic 120.
  • Fig. 1c also illustrates a multi-core multithreading system 170 that includes multiple SMT systems 109.
  • each processor 103i-103 m supports multiple thread contexts.
  • each processor 103i - 103m is an SMT processor that supports k sequencers such that the system 170 effectively implements m*k sequencers.
  • the fetch/decode unit 122 for the system 170 implements distinct next-instruction-pointer and fetch logic 120 for each supported thread context.
  • multi-core system 150 For ease of illustration, the following discussion focuses on embodiments of the multi-core system 150. However, this focus should not be taken to be limiting, in that the mechanisms described below may be performed in either a multi-core or single-core multi-sequencer system. Also, either single-core or multi-core systems may be implemented with single-sequencer cores or multi- sequencer cores. For each multi-sequencer core, one or more multithreading techniques may be utilized, including SMT and/or SoeMT. It will be understood that the systems 109, 115, 150, 170 shown in Fig. 1c may include additional features, such as a memory system, execution units, and the like, that are not shown in Fig. 1c.
  • Each sequencer, 103, for the system embodiments 109, 115, 150, 170 illustrated in Fig. 1c may be associated with a unique identifier (discussed below in connection with Fig. 3).
  • Various embodiments of the systems 109, 150 may include a different number, N, of total sequencers.
  • Embodiments of the systems 109, 115, 150, 170 illustrated in Fig. 1c may each support signaling among sequencers.
  • the term "sequencer arithmetic" is used to refer to inter-sequencer signaling for service between two sequencers.
  • Architectural support for sequencer arithmetic may include extensions to an instruction set architecture such that one or more instructions are provided to allow a user direct manipulation of control and state transfers between sequencers.
  • a user-level instruction is said to be "sequencer aware" if it is a sequencer arithmetic instruction or any other type of instruction that includes a logical sequencer address as a parameter, which can be encoded as an instruction operand and/or implicitly referenced upon instruction execution.
  • Such instructions may include sequencer arithmetic instructions that either provide for signaling another sequencer (referred to herein as a “user level control transfer instruction”) or provide for setting up a client sequencer to monitor for such a signal (referred to herein as a "user level monitor instruction)."
  • Sequencer aware instructions may also include other instructions that include a logical sequencer address as a parameter, such as sequencer aware state save and restore instruction.
  • sequencer aware state save and restore instruction Upon execution of such a state save instruction, a first sequencer can create a snapshot copy of the architectural states of a second sequencer.
  • the sequencer aware restore instruction may designate that the save architectural states be loaded to a specified sequencer.
  • Each sequencer aware instruction may also optionally include more than one logical sequencer addresses as parameters.
  • a sequencer- aware instruction may include as a parameter an aggregate of multiple logical sequencer addresses.
  • Such approach may be utilized for multicasting or broadcasting inter-sequencer signals from one sequencer to multiple other sequencers.
  • examples set forth below may refer, unless otherwise specified, to the unicasting case: a first sequencer executes a sequencer-aware instruction that specifies a single other logical sequencer address.
  • Such approach is made for descriptive convenience and illustrative purposes merely, and should not be taken to be limiting.
  • One of skill in the art will realize that embodiments of the mechanisms discussed herein may be applied to broadcasting and multicasting sequencer-aware instructions as well.
  • Figure 3a shows a view of an instruction set architecture for the systems of Figures 1 A - 1C.
  • an Instruction Set Architecture (ISA) view 300 of the systems 100A, and 100B An ISA defines a logical view of a system, as seen by an assembly language programmer, binary translator, assembler, or the like.
  • the systems 100A, and 100B include a logical storage 302 and an instruction set 304.
  • the logical storage 302 defines a visible memory hierarchy, addressing scheme, register set, etc. for the systems 100A, and 100B, whereas the instruction set 304 defines the instructions and the format of the instructions that the systems 100A, and 100B support.
  • the instruction set 304 may comprise the instruction set known as the IA32 instruction set and its extensions, although other instruction sets are possible. Additionally, in an embodiment, the instruction set 304 includes two instructions known as a user-level control-transfer instruction, and a user-level monitoring instruction.
  • An example of a user-level control-transfer instruction may be a SXFR instruction.
  • An example of a user-level monitoring instruction may be a SEMONITOR instruction.
  • SXFR instruction and SEMONITOR instruction will be discussed to assist in understanding of a user- level control-transfer instruction and a user-level monitoring instruction.
  • the SXFR instruction is used to send a signal from a first sequencer to a second sequencer
  • the SEMONITOR instruction is used to configure the second sequencer to monitor for the signal from the first sequencer.
  • these control transfer and monitoring instructions are sequencer aware, as will be discussed later, and can compose more sequencer aware composite instructions.
  • Figure 3b illustrates a logical diagram of an embodiment of a processor with two or more instruction sequencers that include a user-level control-transfer instruction and a user-level monitor instruction in their instruction sets.
  • the processor 332 may include one or more instruction sequencers 338-342 to execute different threads.
  • multiple instruction sequencers can share a decoder unit and/or instruction execution unit.
  • each instruction sequencer can have its own dedicated process instruction pipeline that includes a decoder unit, such as a first decoder unit 334, an instruction execution unit such as a first instruction execution unit 335 , etc.
  • At least some of the multiple instruction sequencers 338-342 include instruction sets 344 that at least include a user-level monitoring instruction (such as a SEMONITOR instruction), a user-level control- transfer instruction (such as a SXFR instruction), a sequencer-aware store instruction (such as a SSAVE instruction), and a sequencer-aware restore instruction (such as a SRSTOR instruction).
  • a user-level monitoring instruction such as a SEMONITOR instruction
  • a user-level control- transfer instruction such as a SXFR instruction
  • a sequencer-aware store instruction such as a SSAVE instruction
  • a sequencer-aware restore instruction such as a SRSTOR instruction
  • the sequencer-aware store and restore instructions may not be part of the instruction set 344. Rather, the user-level control-transfer and monitoring instructions may be part of the instruction set and then used in conjunction with a scenario and a pointer to handler code to compose the sequencer-aware store and restore instructions. Types of scenarios,
  • a first instance of the user-level monitoring instruction 346 may specify one of the instructions sequencers, a pointer to a location of handler code, and one of a number of control-transfer scenarios.
  • the monitoring instruction 346 may cause the executing instruction sequencer, such as a first instruction sequencer 338, to setup the specified instruction sequencer to invoke the handler-code at the specified memory location upon observing or receiving signaling of the specified control-transfer scenario.
  • the first memory location 348 storing the handler code may be a register, a cache, or other similar storage device.
  • the user-level monitoring instruction 346 may be executed first to set up a specified target instruction sequencer to receive a control-transfer signal before the source instruction sequencer sends this control-transfer signal.
  • the executing instruction sequencer may execute a sequencer-aware save instruction in order to save the context state of target instruction sequencer.
  • the context state of the destination instruction sequencer may be stored in a second memory location 350.
  • the second memory location may be a different location within a shared memory array or in a discrete memory area than the first memory location.
  • a first instance of the control-transfer instruction 352 may specify one of the instruction sequencers and one of the many control-transfer scenarios.
  • the specified control-transfer scenario may be stored in, for example, a table 354.
  • the control-transfer instruction 352 causes the executing instruction sequencer to generate a control-transfer signal to be received by the specified target instruction sequencer, such as a second instruction sequencer 340.
  • the specified target instruction sequencer 340 detects the control- transfer signal generated in response to the execution of the control-transfer instruction 352 that specifies that instruction sequencer. The specified target instruction sequencer 340 then executes the handler code specified by the monitoring instruction 346 that specified that instruction sequencer.
  • the first instruction sequencer 338 may execute a sequencer- aware restore instruction to restore the context state of target instruction sequencer from its location in the second memory location 350.
  • a processor may include multisequencer hardware. Each instruction sequencer is capable of executing different threads. At least some of the multiple instruction sequencers are capable of executing user-level instructions.
  • the user-level instructions may be sequencer-aware. Each of the user-level instructions may contain information that specifies at least one of the multiple instructions sequencers. Execution of the instructions on an executing sequencer causes the executing instruction sequencer to perform a thread management operation on the specified one of the multiple instruction sequencers without operating system intervention.
  • the thread management operation may be a thread creation, a thread control, or a thread synchronization operation. Examples of the user-level instructions include the sequencer-aware SXFR, SEMONITOR, SSAVE, and SRSTR instructions described in more detail below.
  • the SXFR instruction includes the instruction format shown in Figure 4A of the drawings.
  • the SXFR instruction includes an opcode 400A, and operands 402A to 410A.
  • the operand 402A corresponds to a sequencer ID (SID) for a destination/target sequencer to which the signal is sent.
  • the operand 404A comprises a scenario or control message, which may be an architecturally defined identifier code representing a condition or anticipated event. A scenario may be used to effect asynchronous control transfer as will be described.
  • Figure 6A of the drawings there is shown a table of scenarios in accordance with one embodiment of the invention.
  • the scenarios may be divided into intra-sequencer scenarios, and inter-sequencer scenarios.
  • the intra- sequencers scenarios fall into the category of resource not available (RNA), which is a category for events generated during execution on a sequencer due to access to a resource not being available on the sequencer.
  • scenarios that fall into the category of RNA include a page fault, a system call on OS- sequestered sequencer that is incapable of directly activating OS service, or a deprecated operation fault.
  • a deprecated operation fault is a fault caused by a limited or deprecated subset of ISA features implemented on the sequencer.
  • a deprecated operation fault may occur when attempting to execute an instruction that requires a floating point adder, on a sequencer that does not physically implement a floating point adder.
  • the mechanism described here can be implemented at different level abstractions, in application software, system level software, or firmware like microcode, or in hardware.
  • Examples of inter-sequencer scenarios include an initialize scenario referenced as an "INIT” scenario, a "FORK/EXEC” scenario, and a "PROXY” scenario.
  • the INIT scenario causes a sequencer whose SID is specified in a SXFR instruction to cause a set of sequencer-specific architectural states (such as general purpose registers or machine specific control registers) to be respectively initialized to a set of initial values
  • the FORK/EXEC scenario causes a thread executing on a sequencer that executes a SXFR instruction to fork or start a parallel thread of execution on a sequencer identified by the destination SID in a SXFR instruction, by set particular values to the destination sequencer states that include at least instruction pointer (EIP) and/or stack pointer (ESP).
  • EIP instruction pointer
  • ESP stack pointer
  • the PROXY scenario is used to cause a sequencer identified by the SID in a SXFR instruction to operate in a proxy execution mode, for example, in order to process instructions on behalf of the sequencer that executed the SXFR instruction.
  • the sequencer that operates in a proxy execution mode may be used to process instructions that cannot be processed on a sequencer that supports only a deprecated set of ISA features.
  • the PROXY scenario may be divided into a BEGIN_PROXY scenario, and an END_PROXY scenario.
  • the BEGIN_PROXY scenario causes an instruction sequencer to operate in proxy execution mode, as described, whereas the END_PROXY scenario terminates operation of the proxy execution mode.
  • the operand 406A comprises a conditional parameter that conditions execution of instructions on a sequencer that executes a SXFR instruction.
  • conditional parameters include a "WAIT” and a "NOWAIT” parameter.
  • WAIT WAIT
  • NOWAIT NOWAIT
  • the WAIT conditional parameter causes the execution of instructions on a sequencer that executes a SXFR instruction to stop while waiting for completion of proxy execution on another sequencer.
  • the NOWAIT conditional parameter specifies that execution on a sequencer that executes a SXFR instruction may continue in parallel with proxy execution on another instruction sequencer.
  • the operand 408A comprises a scenario specific payload or data message.
  • the payload may comprise an instruction pointer at which execution on the sequencer identified by the operand 402A is to commence.
  • the payload may comprise an instruction pointer, a stack pointer, etc. Addresses contained in the payload may be expressed in a variety of addressing modes such as literal, register indirect, and base/offset addressing.
  • the operand 410A specifies a routing function on the SID contained in the operand 402A.
  • the routing function controls whether the signal generated as a result of executing a SXFR instruction is sent as a broadcast, a unicast, or a multicast signal.
  • the routing function can also encode topology-specific hint information that can be used to assist an underlying inter-sequencer interconnect in routing to deliver the signal.
  • the SEMONITOR instruction includes an opcode 400B, and operands 402B to 406B.
  • the operand 402B specifies a scenario, which may, for example, be expressed in terms of a scenario ID.
  • the operand 404B specifies a tuple comprising a sequencer ID (SID) and an instruction pointer (EIP). For descriptive convenience, the tuple is referred to as a "SIDEIP".
  • the SEMONITOR instruction maps a scenario specified in the operand 402B to a SIDEIP specified in the operand 404B.
  • the SEMONITOR instruction may be used to create a mapping table, such as is shown in Figure 6B of the drawings, which maps each scenario to a specific SIDEIP.
  • Each mapping of a scenario to a specific SIDEIP is termed a "service channel".
  • the operand 406B allows a programmer to input one or more control parameters to control how a particular service channel is serviced, as will be explained in greater detail below.
  • a programmer may use the SEMONITOR instruction to program the service channels that a particular sequencer uses to monitor for a given scenario.
  • a sequencer when the anticipated condition corresponding to a scenario is observed, a sequencer incurs a yield event to cause asynchronous control transfer to a yield event handler starting at the SIDEIP mapped to the scenario.
  • a yield event For example, in the case of the anticipated condition corresponding to a fault, once a control yield event is incurred, the current (return) instruction pointer is pushed onto the current stack and control is transferred to the SIDEIP mapped to the observed scenario. In the case of the anticipated condition corresponding to trap, then the next instruction pointer is pushed onto the current stack and control is transferred to the SIDEIP mapped to the observed scenario.
  • a fault may dispose of an instruction before that instruction is executed.
  • a trap may dispose of an instruction after the instruction is executed.
  • an architecturally defined blocking bit may be set to prevent recursive triggering of a yield event until the blocking bit is reset.
  • a special return instruction may atomically reset the blocking bit and return control from the yield event handler back to the original code whose execution generated the yield event.
  • both the SXFR and SEMONITOR are “sequencer-aware” in that they include operands that identify particular sequencers.
  • the SSAVE and SRSTOR instructions are also “sequencer-aware” in that they include operands that identify particular sequencers.
  • these user- level instructions may be "sequencer- aware" in that they have a pointer to instructions in handler code. The handler code when executed by an instruction execution unit references one or more specific instruction sequencers when that handler code is executed.
  • the handler code is associated with the user level instruction because the user level instruction directs the instruction pointer to the start of the handler code and the user level instruction directs the operations of the thread after the handler code is finished executing.
  • the user level instructions may be sequencer aware if the user level instructions have either 1 ) a field that makes a specific reference to one or more instruction sequencers or 2) implicitly references with a pointer to handler code that specifically addresses one or more instruction sequencers when the handler code is executed.
  • the instructions SXFR and SEMONITOR may be used to implement inter-sequencer control transfer as will be described, with reference to Figure 5 of the drawings.
  • a sequencer 500 upon encountering an SXFR instruction at an instruction pointer "I” transfers control to sequencer 502, to cause the sequencer 502 to start executing handler instructions starting at an instruction pointer "J".
  • a SXFR instruction in the format: SXFR (SID, SCENARIOJD, CONDITIONAL_PARAMETER), for example, SXFR (502, BEGIN_PROXY, NOWAIT) may be used to affect the control transfer.
  • SID sequencer identifier
  • the "SCENARIOJD" part of the instruction is a reference to a scenario which, as described above, can be programmed into the system 100A, and 100B to cause asynchronous control transfer.
  • the system 100A, and 100B supports the scenarios shown in the scenario table in Figure 6A of the drawings.
  • Each scenario is encoded to a scenario identifier (ID).
  • ID scenario identifier
  • values corresponding to a particular scenario ID may be programmed into a register, from which it may be read when the SXFR instruction is executed.
  • the mapping table of Figure 6B 1 which maps each scenario to a SIDEIP, is used.
  • the SEMONITOR instruction is used.
  • Execution of the instruction SXFR (502, 1 ), on the sequencer 500 causes a signal including a SCENARIOJD of 1 to be delivered to the sequencer 502.
  • the sequencer 502 In response to the signal, the sequencer 502 incurs a yield event that causes a control transfer to the instruction pointer "J" at which with handler-code associated with the BEGIN_PROXY scenario begins. In an embodiment, instead of immediately executing the handler-code starting at the instruction pointer "J" in response to receiving the signal, the sequencer 502 may queue a number of received signals, and once the number of the signals exceeds a threshold, the sequencer 502 serving the signals by executing handler-code associated with the various signals. In an embodiment, the particular manner in which the sequencer 502 is to process a signal, i.e.
  • the handler-code may contain instructions to cause a service thread to start executing on the instruction sequencer 502.
  • a service thread is any thread that aids or assists in the execution of a first thread executing on another sequencer, i.e. sequencer 500 in the case of Figure 5.
  • sequencer 500 in the case of Figure 5.
  • a sequencer-specific context save instruction and a sequencer-specific context restore instruction is provided in addition to the SXFR and SEMONITOR instructions.
  • the sequencer context save instruction is denoted as SSAVE and the sequencer context restore operation is denoted as SRSTOR. Both SSAVE and SRSTOR are sequencer-aware instructions.
  • a minimal canonical instruction set may merely include the SXFR and SEMONITOR instructions.
  • scenarios for sequencer context save and/or restore are defined. When the SXFR and SEMONITOR instructions are used in conjunction with a scenario and a pointer to handler code. The corresponding handler code on the target sequencer can perform the respective sequencer context save and/or restore operation, achieving the same effects of the dedicated SRSTOR and SSAVE instructions.
  • a sequencer-aware context save instruction may be synthesized by having a scenario that maps to a code block to perform a sequencer-aware context save. Likewise, it is possible to synthesize a sequencer- aware context restore operation using a scenario.
  • both the SSAVE and SRSTOR instructions include an operand corresponding to a SID 1 and operand comprising an address for a "save area" at which the state for the sequencer identified by the SID operand is to be saved.
  • the sequencer 502 in order for the sequencer 502 to be able to execute a service thread to facilitate or help execution of a first thread running on the sequencer 500, it is necessary for the sequencer 502 to have access to the execution context for the first thread.
  • the instruction SSAVE is first executed on the sequencer 502 to save the execution context for the first thread executing on the sequencer 500 in a first memory location 512.
  • the currently running code hereinafter "prior code” on 502 may perform SSAVE to save the execution context of the prior code to a second memory location 514.
  • the save areas, the first memory location 512 and the second memory location 514 are not overlapping.
  • the sequencer 502 executes a SRSTOR instruction indicating the first memory location 512 to change the sequencer states of the sequencer 502 to the execution context/state associated with the processing of the first thread on the sequencer 500. Thereafter, the sequencer 502 may commence execution of the service thread. While the service thread is executing, the options for the sequencer 500 include waiting for the service thread to complete execution, or to switching to execute a second thread. Once the service thread completes execution on the sequencer 502, the sequencer 502 executes a SXFR instruction to send a signal to sequencer 500 to indicate that the execution of the service thread has completed. Prior to sending the signal to the sequencer 500 to indicate that execution of the service thread has completed, the sequencer 502 executes a SSAVE instruction to save an updated execution context for the first thread after completion of the service thread in a first memory location 516.
  • sequencer 500 is waiting for service thread to complete execution, the service thread on sequencer 502 can then perform SRSTOR indicating the third memory location 516 to update the execution context for the first thread on sequencer 500, prior to executing SXFR to notify sequencer 500 to resume code execution. After notifying sequencer 500 of completion of service thread
  • the sequencer 500 upon receipt of the signal to indicate completion of the service thread from the sequencer 502, the sequencer 500 executes a SRSTOR (500, POINTER_TO_SAVE_AREA_B) instruction to change the execution context of the sequencer 500 to that of the first thread upon completion of the service thread.
  • SRSTOR 500, POINTER_TO_SAVE_AREA_B
  • the saving and restoring of an instruction sequencer's context state can be performed remotely on a target sequencer.
  • the source sequencer sends a message for the target instruction sequencer to save and/or restore its sequencer's context state.
  • the thread management logic 114 includes a proxy execution mechanism 700, and a sequencer sequester mechanism 702 as can be seen in Figure 7 of the drawings.
  • sequencers S1 , and S2 may be symmetrical or asymmetrical with respect to each other.
  • the sequencers are asymmetrical, with the sequencer S1 including only processing resources A and B, whereas the sequencer S2 includes processing resources A, D 1 and C.
  • the processing resources of the sequencer S1 must be able to support the execution of the instruction blocks 1 and 2.
  • Time (T1) is located at the end arrow of the block of instructions 2.
  • T1 shows the monitor detects an event that causes the migration of the single thread from the client instruction sequencer S1 to the servant instruction sequencer S2.
  • a third block of instructions is scheduled to execute on the sequencer S1 , however the third block of instructions requires the use of a processing resource not available on the sequencer S1, say, the processing resource D, which is available on the sequencer S2.
  • Time (T2) is located at the beginning of the line to the arrow of the third block of instructions.
  • T2 shows the start of the execution of a block of instructions from the single thread on the servant instruction sequencer S2 on behalf of the client instruction sequencer S1.
  • Time (T3) is located at the end arrow of the third block of instructions.
  • T3 shows the completion of the execution of a block of instructions from the single thread on the servant instruction sequencer S2.
  • the sequencer S2 uses the proxy execution mechanism 700 to signal to the sequencer S1 that execution of the third block of instructions has completed.
  • Time (T4) is located at the beginning of the line to the arrow of a fourth block of instructions.
  • T4 shows the completion of the proxy execution of a block of instructions from the single thread on the servant instruction sequencer S2 and the transfer back to the client instruction sequencer S1.
  • the sequencer S1 can then proceed to execute, a fourth block of instructions, which merely requires processing resources available on the sequencer S1.
  • the sequencer S1 Since, in above example, the sequencer S1 is using the sequencer S2 to execute an instruction block on its behalf, the sequencer S1 is called a "client" sequencer.
  • the resource D may comprise a highly specialized functional unit for a limited set of applications. The functional unit may be relatively power hungry, costly, and complex. Thus, in order to save costs, in a particular implementation the resource D is only implemented on the sequencer S2, and not on the sequencer S1.
  • the proxy execution mechanism 700 masks the asymmetry between the sequencers in a multi-sequencer system by mapping the processing resources available on the various sequencers in a multi- sequencer system so that a client sequencer can use the proxy execution mechanism to migrate a thread to execute on a sequencer that has a processing resource required, or optimized to execute the thread.
  • the proxy execution mechanism 700 may also be used to migrate an instruction block executing on a OS-sequestered sequencer, to an OS-visible sequencer, e.g. in order to perform an OS service, such as the handling of a page fault or a syscall, as will be explained in greater detail below with reference to Figure 11 of the drawings.
  • the proxy execution mechanism 700 may be constructed using the SEMONITOR and SXFR instructions, as described above, and include a mapping mechanism.
  • the proxy execution mechanism 700 may reside in hardware, in firmware (e.g. microcode), or at a system software layer, or application software layer.
  • the proxy execution mechanism 700 may use the SEMONITOR and SXFR instructions to handle two categories of proxy services. The first category is known as an egress service scenario, whereas the second category is known as the ingress service scenario.
  • egress service scenarios are defined to trap or fault these operations.
  • Each egress scenario is mapped to a sequencer ID (and instruction pointer (SIDEIP)) pointing to a servant sequencer.
  • the mapping may be achieved in hardware, firmware or even in software.
  • the proxy access of the servant sequencer can then be achieved using inter-sequencer signaling, as described above.
  • a servant sequencer is responsible for supporting proxy access to the resources that are not present in a client sequencer but present on the servant sequencer.
  • the ingress service scenarios are defined and configured into the service channel and mapped to the local service handlers (handler-code) that perform the proxy execution on behalf of the client sequencers.
  • a list of sample egress and ingress service scenarios is provided in the table of Figure 6A.
  • an egress service scenario corresponds to a trap or fault operation that incurs a "miss" at a client sequencer due to required access to a processing resource not available on the client sequencer yet available on a servant sequencer.
  • an ingress service scenario corresponds to asynchronous interrupt condition indicating the arrival of a request to access a local processing resource, available on the servant sequencer, on behalf of a client sequencer that does not possess the local processing resource.
  • the proxy execution mechanism defines a veneer or layer of abstraction associated with each sequencer in a multi-sequencer so that the client and servant sequencers work in concert to perform proxy resource access.
  • the proxy resource access is transparent to user-level software and to an OS.
  • Each service scenario plays a similar role to that of an opcode in a traditional ISA, except that a service scenario triggers a special handler-code flow.
  • a service scenario ID, and its handler-code flow is akin to the relationship between a Complex Instruction Set Computer (CISC) opcode and its corresponding microcode flow.
  • CISC Complex Instruction Set Computer
  • the CISC can be composed by using the user- level sequencer aware monitor and control transfer instructions as the canonical instruction basis to build the microcode flow.
  • the mapping between a service scenario and its handler-code is achieved via SEMONITOR, while SXFR provides a mechanism for sending control messages between sequencers.
  • the communication of the control messages act as a trigger for the execution of handler-code mapped to the service scenarios.
  • the sequencer sequester mechanism 702 may be used to map or group a particular combination of OS-visible sequencers and OS- sequestered sequencers to form a logical processor.
  • the mapping may be a one- to-many mapping comprising a single OS-visible sequencer mapped to many OS- sequestered sequencers, or a many-to-many mapping comprising many OS-visible sequencers mapped to many OS-sequestered sequencers.
  • Figure 9 shows a multi-sequencer system comprising two logical processors 900 and 902, respectively.
  • Each of the logical processors 900, and 902 comprise a one-to-many mapping in which a single OS-visible sequencer is mapped to many OS- sequestered sequencers.
  • an example multi-sequencer system 1000 may include an ensemble of 18 sequencers in which two OS-visible sequencers are mapped to 16 OS-sequestered sequencers to define a many-to-many mapping. Within the logical processor of the system 1000, both of the OS-visible sequencers can serve as a proxy for any of the OS-sequestered sequencers.
  • the sequencer sequester mechanism 702 may selectively sequester sequencers away from OS control. According to different embodiments of the invention, the sequencers may be sequestered post boot or in some cases even during boot time. In order to sequester a sequencer under OS control, the sequencer sequester mechanism 702 may set an indicator to the OS to specify that the sequencer is in an unavailable state. For example, the sequencer sequester mechanism 702 may impersonate a sequencer's power or power/performance state to indicate to the OS that the sequencer has entered a special unavailable state so that the OS will deem the sequencer as too overloaded or too hot to dispatch computation or schedule instructions for the sequencer.
  • the sequencer sequester mechanism 702 may turn a particular subset of OS-visible sequencers to the special power states to indicate that the subset of sequencers are in the non- available state so that the OS will deem these subset of sequencers as overloaded and thus not dispatch computation to the subset of sequencers.
  • the SXFR and SEMONITOR instructions may be used to schedule computations or threads for the sequestered sequencer.
  • control of the sequestered sequencer may be surrendered back to the OS. This may be achieved by a mechanism setting an indicator to indicate to the OS that the sequestered instruction sequencer is no longer in the non-available state.
  • a privileged state of a sequestered instruction sequencer is synchronized with a counterpart privileged state of non-sequestered instruction sequencers that are still under OS control.
  • N multithreading package i.e. one that maps M threads to N sequencers, where M»N
  • the minimal building block synchronization objects that are required are critical section and event.
  • higher level synchronization objects like mutexes, conditional variables, and semaphores can be constructed.
  • a critical section can be implemented via hardware lock primitives.
  • the sequestered sequencers can inherit state from the non-sequestered sequencers such that the view of virtual memory is the same for both sequestered sequencers and non-sequestered sequencers.
  • An event can be supported by an event-driven multi-sequencer scheduler (centralized or distributed) synthesized with the SXFR and SEMONITOR instructions.
  • a simple POSIX compliant or compatible distributed scheduler that has a global task queue protected by a critical section may be created. Each sequencer effectively runs one copy of the scheduler and attempts to contend access to the head of the task queue to grab the next ready task thread to run on the sequencer. Should one task on a sequencer be waiting for a synchronization variable such as mutex, a conditional variable, or a semaphore, the task will be de-scheduled via yield and put at the tail of the global task queue after entering the corresponding critical section.
  • a synchronization variable such as mutex, a conditional variable, or a semaphore
  • the multiple instruction sequencers with the extended instruction set can also support a single image OS on larger number of processors than natively supported by the OS.
  • an OS capable of supporting a 4-way instruction sequencer could be implemented as the OS for a hardware implementation that actually has 32-way instruction sequencer system. This allows applications to use more processors than the number of sequencers limit supported by the OS.
  • the instruction sequencers may be asymmetric sequencers or symmetric sequencers.
  • FIG. 11of the drawings there is shown a flowchart of operations performed in order to affect an OS service on an OS-sequestered sequencer with sequencer ID SID1 , in response to a trigger event for proxy execution.
  • the OS- sequestered sequencer SID1 executes the instruction SSAVE (1 , ST_1_0), at 1100.
  • the trigger event may be a predefined condition of execution in the architectural state requiring an OS service, such as a trap, a page fault, or a system call.
  • This instruction saves the execution context of a thread whose execution generated the trigger event. For descriptive convenience, the save area for the execution context of the thread is designated (ST_1_0), to which access will not cause page fault in at least one embodiment.
  • ST_1_0 the save area for the execution context of the thread is designated (ST_1_0), to which access will not cause page fault in at least one embodiment.
  • a SXFR instruction is executed in order to pass the egress service scenario "BEGIN_PROXY" to an OS- visible sequencer SIDO. Note that because the SXFR instruction executed at 1102 included the conditional parameter "WAIT", processing of instructions on sequencer SID1 is to be blocked pending completion of the proxy execution thread on the sequencer SIDO.
  • the sequencer SIDO detects the signal from the sequencer SID1 , and yields or "temporarily suspends", execution of the current thread.
  • a SSAVE instruction is executed to save the execution context or state associated with sequencer SIDO.
  • the execution context save area is labeled "ST_0_0" which does not overlap with ST_1_0.
  • a proxy bit is set to 1 to indicate that the sequencer SIDO is operating in proxy execution mode.
  • SRSTOR context restore operation
  • ST_1_0 is the execution context associated with the page fault on SID1.
  • the page fault is replicated or impersonated on the sequencer SIDO.
  • a ring transition is performed to switch control to the OS.
  • the OS services the page fault.
  • the END_PROXY scenario is incurred as an intra-sequencer yield event.
  • a context save is performed to save an execution context "ST_1_1”.
  • the proxy bit is set to 0.
  • a SXFR instruction is executed to pass the service scenario "END_PROXY” to the sequencer SID1.
  • the sequencer SIDO restores state ST_0_0.
  • the sequencer SID1 yields on receiving the "END_PROXY” scenario to restore, at 1126, the context "ST_1_1” so that execution of the thread that encountered the trigger event may recommence.
  • proxy execution may be the migration of a user level thread in response to detecting an asymmetric condition between an OS-visible instruction sequencer and an instruction sequencer under the control of an application level program when executing the user level thread.
  • An asymmetric condition between the instruction sequencers may include at least the following conditions such as the need for a ring/privilege level transition; which includes a page fault or system call, a lack of instruction capability by the instruction sequencer executing the user level thread (e.g., deprecation of certain instruction on one sequencer and resulting invalid op code fault), a difference in instruction execution performance between the two instruction sequencers.
  • States migration during proxy execution may be heavy weight or light weight.
  • Heavy weight migration is a full register state that is saved from a transferring sequencer and restored onto the receiving sequencer. Heavy weight migration has at least one instruction from the user level thread executed on the receiving sequencer for the benefit of the transferring sequencer. Heavy weight migration allows for user level thread being executed to stay at the receiving sequencer or to return to the transferring sequencer after executing one or more instruction on behalf of the transferring instruction sequencer.
  • Light weight migration has many varieties - the idea being to streamline for specific situations. Light weight migration may include transferring some small amount of state so that some small task may be handled. In some light weight migration scenarios, an instruction from the user level thread is not actually executed - e.g., in the page fault situation. The instruction sequencer under the control of an application level program just transfers over the address that causes the page fault. The receiving sequencer just performs a probe load to cause the page to be loaded, and then conveys that this desired task has been accomplished back to the instruction sequencer under the control of the application level program. Thus, migration may not mean that an instruction from the migrating user level thread is actually executed.
  • a proxy execution occurs essentially, anytime a second instruction sequencer performs an action On behalf of ' or 'derived from 1 a first instruction sequencer that is executing a user level thread.
  • one aspect of proxy execution includes the suspension of execution of instructions in a user- level thread in a first instruction sequencer that is under the control of the application level program.
  • FIG. 12 of the drawings shows a processing system 1200, in accordance with one embodiment of the invention. As will be seen, the system 1200 includes a processing component 1202 that is coupled to a storage device 1204.
  • the processing component 1202 includes a plurality of instruction sequencers, only two of which have been shown in Figure 12 of the drawings where they are designation as 1206A 1 and 1206B, respectively.
  • the processing component 1202 also includes a control transfer mechanism 1208 that includes a signaling mechanism 1210, and a monitoring mechanism 1212.
  • the signaling mechanism 1210 may be used to send scenarios/control-transfer messages between the sequencers of the processing component 1202.
  • the signaling mechanism 1210 includes logic to execute the SXFR instruction described above.
  • the monitoring mechanism 1212 may be used to set up any of the instruction sequencers of the processing component 1202 to monitor for a signal that includes a particular control message/scenario.
  • the monitoring mechanism includes logic to decode the SEMONITOR instruction described above.
  • the processing component 1202 also includes a sequencer sequester mechanism 1214, as described above.
  • the storage device 1204 may include an operating system.
  • the operating system may perform context switching by storing a previous task's entire register state and restoring the next task's entire register state.
  • various techniques may be used to set up, for example, the sequencer 1206B to monitor for particular signals from the sequencer 1206A.
  • the sequencer 1206B may be pre- configured (i.e., without requiring any user configuration step) to monitor for signals that carry certain control messages/scenarios.
  • the sequencer 1206B may be pre-configured to monitor for a signal that carries the INIT scenario.
  • a user-level instruction such as SXFR may be used to trigger execution of initialization code on the sequencer 1206B.
  • the initialization code itself may comprise a SEMONITOR instruction that may be used set up the sequencer 1206B to monitor for particular signals (scenarios) from the sequencer 1206A.
  • sequencer-aware SEMONITOR instruction may be executed on the sequencer 1206A to cause the sequencer 1206B to monitor for particular signals/scenarios from the sequencer 1206A.
  • a pointer to a memory location that store bootstrap/initialization code may be saved as part of a context for the sequencer 1206A using the SSAVE instruction described above.
  • FIG. 13 illustrates a block diagram of an example computer system that may use an embodiment of a processor component, such as a CPU or chipset, that includes one or more instruction sequencers configured to execute one or more user-level threads that contain sequencer aware user-level instructions.
  • computer system 1300 comprises a communication mechanism or bus 1311 for communicating information, and an integrated circuit component such as a main processing unit 1312 coupled with bus 1311 for processing information.
  • One or more of the components or devices in the computer system 1300 such as the main processing unit 1312 or a chip set 1336 may use an embodiment of the instruction sequencers configured to execute one or more user-level threads.
  • the main processing unit 1312 may consist of one or more processor cores working together as a unit.
  • Computer system 1300 further comprises a random access memory (RAM) or other dynamic storage device 1304 (referred to as main memory) coupled to bus 1311 for storing information and instructions to be executed by main processing unit 1312.
  • main memory main memory
  • Main memory 1304 also may be used for storing temporary variables or other intermediate information during execution of instructions by main processing unit 1312.
  • Firmware 1303 may be a combination of software and hardware, such as Electronically Programmable Read-Only Memory (EPROM) that has the operations for the routine recorded on the EPROM.
  • EPROM Electronically Programmable Read-Only Memory
  • the firmware 1303 may embed foundation code, basic input/output system code (BIOS), or other similar code.
  • BIOS basic input/output system code
  • the firmware 1303 may make it possible for the computer system 1300 to boot itself.
  • Computer system 1300 also comprises a read-only memory (ROM) and/or other static storage device 1306 coupled to bus 1311 for storing static information and instructions for main processing unit 1312.
  • ROM read-only memory
  • static storage device 1306 may store OS level and application level software.
  • Computer system 1300 may further be coupled to a display device 1321 , such as a cathode ray tube (CRT) or liquid crystal display (LCD), coupled to bus 1311 for displaying information to a computer user.
  • a display device 1321 such as a cathode ray tube (CRT) or liquid crystal display (LCD)
  • CTR cathode ray tube
  • LCD liquid crystal display
  • a chipset may interface with the display device 1321.
  • An alphanumeric input device (keyboard) 1322 may also be coupled to bus 1311 for communicating information and command selections to main processing unit 1312.
  • An additional user input device is cursor control device 1323, such as a mouse, trackball, trackpad, stylus, or cursor direction keys, coupled to bus 1311 for communicating direction information and command selections to main processing unit 1312, and for controlling cursor movement on a display device 1321.
  • cursor control device 1323 such as a mouse, trackball, trackpad, stylus, or cursor direction keys, coupled to bus 1311 for communicating direction information and command selections to main processing unit 1312, and for controlling cursor movement on a display device 1321.
  • a chipset may interface with the input output devices.
  • bus 1311 Another device that may be coupled to bus 1311 is a hard copy device 1324, which may be used for printing instructions, data, or other information on a medium such as paper, film, or similar types of media. Furthermore, a sound recording and playback device, such as a speaker and/or microphone (not shown) may optionally be coupled to bus 1311 for audio interfacing with computer system 1300. Another device that may be coupled to bus 1311 is a wired/wireless communication capability 1325.
  • the software used to facilitate the routine can be embedded onto a machine-readable medium.
  • a machine-readable medium includes any mechanism that provides (i.e., stores and/or transmits) information in a form accessible by a machine (e.g., a computer, network device, personal digital assistant, manufacturing tool, any device with a set of one or more processors, etc.).
  • a machine-readable medium includes recordable/non- recordable media (e.g., read only memory (ROM) including firmware; random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; etc.), as well as electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.); etc.
  • recordable/non- recordable media e.g., read only memory (ROM) including firmware; random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; etc.
  • electrical, optical, acoustical or other form of propagated signals e.g., carrier waves, infrared signals, digital signals, etc.
  • a design may go through various stages, from creation to simulation to fabrication.
  • Data representing a design may represent the design in a number of manners.
  • the hardware may be represented using a hardware description language or functional description language.
  • a circuit-level model with logic/or transistor gates may be produced at some stages of the design process.
  • most designs, at some stage reach a level of data representing the physical placement of various devices in the hardware model.
  • the data representing the hardware model may be the data specifying the presence or absence of various features on different mask layers for masks used to produce the integrated circuit.
  • the data may be stored in any form of a machine-readable medium.
  • Any optical or electrical wave modulated or otherwise generated to transform such information, a memory, or a magnetic or optical storage such as a disc may be the machine-readable medium. Any of these mediums may "carry” or “indicate” the design or software information.
  • an electrical carrier wave indicating or carrying the code or design is transmitted, to the extent that copying, buffering or retransmission of the electrical signal is performed, a new copy is made.
  • a communication provider or a network provider may make copies of an article (carrier wave) embodying techniques of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Executing Machine-Instructions (AREA)
  • Advance Control (AREA)
  • Debugging And Monitoring (AREA)

Abstract

In an embodiment, a method is provided. The method includes managing user-level threads on a first instruction sequencer in response to executing user-level instructions on a second instruction sequencer that is under control of an application level program. A first user-level thread is run on the second instruction sequencer and contains one or more user level instructions. A first user level instruction has at least 1) a field that makes reference to one or more instruction sequencers or 2) implicitly references with a pointer to code that specifically addresses one or more instruction sequencers when the code is executed.

Description

A MECHANISM FOR INSTRUCTION SET BASED THREAD EXECUTION ON A PLURALITY OF INSTRUCTION SEQUENCERS
FIELD OF THE INVENTION
[0001] Embodiments of the invention relate to methods and apparatus for processing instructions.
BACKGROUND
[0002] In order to increase performance of information processing systems, such as those that include microprocessors, both hardware and software techniques have been employed. On the hardware side, microprocessor design approaches to improve microprocessor performance have included increased clock speeds, pipelining, branch prediction, super-scalar execution, out-of-order execution, and caches. Many such approaches have led to increased transistor count, and have even, in some instances, resulted in transistor count increasing at a rate greater than the rate of improved performance.
[0003] Rather than seek to increase performance strictly through additional transistors, other performance enhancements involve software techniques. One software approach that has been employed to improve processor performance is known as "multithreading." In software multithreading, an instruction stream may be divided into multiple instruction streams that can be executed in parallel. Alternatively, multiple independent software streams may be executed in parallel.
[0004] In one approach, known as time-slice multithreading or time-multiplex ("TMUX") multithreading, a single processor switches between threads after a fixed period of time. In still another approach, a single processor switches between threads upon occurrence of a trigger event, such as a long latency cache miss. In this latter approach, known as switch-on-event multithreading ("SoEMT"), only one thread, at most, is active at a given time.
[0005] Increasingly, multithreading is supported in hardware. For instance, in one approach, processors in a multi-processor system, such as chip multiprocessor ("CMP") systems (multiple processors on single chip package) and symmetric multi-processor ("SMP") systems (multiple processors on multiple chips), may each act on one of the multiple software threads concurrently. In another approach, referred to as simultaneous multithreading ("SMT"), a single physical processor core is made to appear as multiple logical processors to operating systems and user programs. For SMT, multiple software threads can be active and execute simultaneously on a single processor core. That is, each logical processor maintains a complete set of the architecture state, but many other resources of the physical processor, such as caches, execution units, branch predictors, control logic and buses are shared. For SMT, the instructions from multiple software threads thus execute concurrently on each logical processor.
[0006] For a system that supports concurrent execution of software threads, such as SMT, SMP, and/or CMP systems, an operating system may control scheduling and execution of the software threads.
[0007] Alternatively, it is possible that some applications may directly manage and schedule multiple threads for execution within a processing system. Such application-scheduled threads are generally invisible to the operating system (OS) and are known as user-level threads.
[0008] Commonly, user-level threads can merely be scheduled for execution by an application running on a processing resource that is managed by an OS. Accordingly, in the typical processing system with multiple processors there is no mechanism to schedule a user-level thread to run on a processor that is not directly managed by the OS.
BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figures 1 A and 1 B show high-level block diagrams of a multi-sequencer system, in accordance with one embodiment of the invention;
[0010] Figures 1C is a block diagram illustrating selected features of embodiments of a multi-sequencer system that supports control of threads by user- level instructions;
[0011] Figure 2 shows a logical view of multi-sequencer hardware forming a part of the multi-sequencer system of Figures 1A - 1C;
[0012] Figure 3a shows a view of an instruction set architecture for the systems of Figures 1A - 1C;
[0013] Figure 3b illustrates a logical diagram of an embodiment of a processor with two or more instruction sequencers that include a user-level control-transfer instruction and a user-level monitor instruction in their instruction sets.
[0014] Figures 4A and 4B shows the format of the SXFR and SEMONITOR instructions, respectively, in accordance to one embodiment of the invention;
[0015] Figure 5 illustrates how the SXFR instruction can be used to implement inter-sequencer control transfer, in accordance with one embodiment of the invention;
[0016] Figures 6A-6B illustrate tables, in accordance with one embodiment of the invention, that may be used to program a service channel; [0017] Figure 7 shows a functional block diagram of the components that make up the thread management logic of the systems of Figures 1A- 1C, in accordance with one embodiment of the invention;
[0018] Figure 8 illustrate the operation of a proxy execution mechanism, in accordance with one embodiment of the invention;
[0019] Figure 9 and 10 show examples of logical processors, in accordance with one embodiment of the invention;
[0020] Figure 11 shows how the SXFR and SEMONITOR instructions may be used to support proxy execution upon a page-fault handling by the OS, in accordance with one embodiment of the invention; and
[0021] Figure 12 shows a processing system in accordance with one embodiment of the invention.
[0022] Figure 13 illustrates a block diagram of an example computer system that may use an embodiment of a processor component, such as a Central Processing Unit (CPU) or chipset, that includes one or more instruction sequencers configured to execute one or more user-level threads that contain sequencer aware user-level instructions.
DETAILED DESCRIPTION
[0023] In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the invention. It will be apparent, however, to one skilled in the art that the invention can be practiced without these specific details. In other instances, structures and devices are shown in block diagram form in order to avoid obscuring the invention.
[0024] Reference in this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearance of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Moreover, various features are described which may be exhibited by some embodiments and not by others. Similarly, various requirements are described which may be requirements for some embodiments but not other embodiments.
[0025] The following description describes embodiments of an architectural mechanism to create and control threads of execution on sequencers of a multiple sequencer system that are sequestered away from OS control.
[0026] As used herein, the term "instruction sequencer" or simply "sequencer" includes next instruction pointer logic and at least some processor state. For example, an instruction sequencer may comprise a logical processor, or a physical processor core. [0027] In an embodiment, the architectural mechanism may comprise just two instructions that together define a signaling mechanism to send and receive a signal between any two sequencers without using an OS Application Program Interface. The signal may comprise an architecturally defined event or scenario, which is mapped to handler-code. Upon receipt of the signal at a sequencer, the scenario in the signal acts as a trigger to cause the sequencer to vector to the handler-code. Using the two instructions, it is possible to implement thread creation, thread control, and thread synchronization software primitives provided by existing thread libraries.
[0028] Further, the two instructions may be used to create a proxy execution mechanism to cause a servant sequencer to execute code on behalf of a client sequencer, as will be explained in greater detail below.
[0029] Accordingly, example processor systems are described that include two or more instruction sequencers to execute different threads. At least some of the two or more instruction sequencers include sequencer-aware user-level instructions in their instruction sets that allow for inter sequencer control by a thread management operation on a specified instruction sequencer without intervention from an operating system. The sequencer-aware user-level instructions may include an instruction sequencer control transfer instruction, an instruction sequencer monitoring instruction, a context save instruction, and a context restore instruction. The processor system may also have thread management logic to respond to a user-level instruction to allow a non- sequestered instruction sequencer to create parallel threads of execution on the associated sequestered instruction sequencers without an operating system scheduler. Also, the processor system may have a proxy execution mechanism to allow a client instruction sequencer to trigger a proxy thread to execute on the servant instruction sequencer on behalf of the client instruction sequencer in response to certain triggering conditions encountered during instruction execution on the client sequencer and without intervention of the operating system.
[0030] Turning now to Figure 1A of the drawings, reference numeral 100A indicates a multi-sequencer system, in accordance to one embodiment of the invention. The multi-sequencer system 100A includes a memory 102 and multi- sequencer hardware 104. The memory 102 comprises a user-level program 106, which includes a scheduler 108 to schedule instructions for execution on the multi- sequencer hardware 104. To express multiple threads of execution, the user-level program 106 makes use of a thread AP1 110 to a thread library that provides thread creation, control, and synchronization primitives to the user-level program 106. Also located within the memory 102 is an operating system 112. The multi- sequencer hardware 104 includes a plurality of sequencers, only four of which have been shown in Figure 1 A. The four shown sequencers are designated SIDO, SID1, SID2, and SID3, respectively.
[0031] As used herein, a "sequencer", may be a distinct thread execution resource and may be any physical or logical unit capable of executing a thread. An instruction sequencer may include a next instruction pointer logic to determine the next instruction to be executed for the given thread. A sequencer may be a logical thread unit or a physical thread unit. In an embodiment, multiple instruction sequencers may be within a same processor core. In an embodiment, each instruction sequencers may be within a different processor core.
[0032] Included in a given processor core, is an instruction set architecture. The instruction set architecture (ISA) may be an abstract model of the processor core that consists of state elements (registers) and instructions that operate on those state elements. The instruction set architecture serves as a boundary between software and hardware by providing an abstract specification of the processor core's behavior to both the programmer and the microprocessor designer. The instruction set may define the set of instructions that the processor core is capable of decoding and executing.
[0033] While the Chip Multiprocessing (CMP) embodiments of the multi- sequencer hardware 104 discussed herein refers to only a single thread per sequencer SID0-SID3, it should not be assumed that the disclosures herein are limited to single-threaded processors. The techniques discussed herein may be employed in any Chip Multiprocessing (CMP) or Simultaneous Multithreading Processor (SMT) system, including in a hybrid system with CMP processors and SMT processors where each core of a CMP processor is a SMT processor or a Switch-On-Event Multiprocessor (SoeMT). For example, the techniques disclosed herein may be used in system that includes multiple multi-threaded processor cores in a single chip package 104.
[0034] The sequencers SID0-SID3 are not necessarily uniform and may be asymmetrical respect to any factor that affects computation quality such as processing speed, processing capability, and power consumption. For example, the sequencer SIDO may be "heavy weight" in that it is designed to process all instructions of a given instruction set architecture (e.g. IA32 the Instruction Set Architecture). Whereas, the sequencer SID1 may be "light weight" in that it can only process a selected subset of those instructions. In another embodiment, a heavyweight processor may be one that processes instructions at a faster rate than a lightweight processor. The sequencer SIDO is Operating System (OS) - visible, whereas the sequencers SID1 to SID3 are OS sequestered. However, this does not mean that every heavyweight sequencer is OS-visible or that all lightweight sequencers are sequestered. As used herein, the term "OS sequestered" denotes a sequencer that has transitioned to a sequestered state or condition. A characteristic of such a sequestered state or condition is that the OS does not schedule instructions for a sequencer in such a state.
[0035] As will be seen, the multi-sequencer hardware or firmware (e.g. microcode) also includes thread management logic 114. In an embodiment, the thread management logic 114 virtualizes the sequencers SID0-SID3 so that they appear to the user-level program 106, as uniform. In other words, the thread management logic 114 masks the asymmetry of the sequencers SID0-SID3 so that from a logical point of view as seen by an assembly language programmer, the sequencers SID0-SID3 appear uniform, as is depicted in the view 200 shown in Figure 2 of the drawings.
[0036] In the system 100A, shown in Figure 1 A of the drawings, the user-level program 106 is tightly coupled to the multi-sequencer hardware 104. In an embodiment, the user-level program 106 may be loosely coupled to the multi- sequencer hardware 104 through intermediate drivers. Such a system is depicted by reference numeral 100B, in Figure 1B of the drawings. The system 100B is basically the same as the system 100A, except that instead of using scheduler 108, the user-level program makes use of a kernel level software such as a device driver 116,such as a driver, a hardware abstraction layer, etc, to communicate with kernel level AP1 118 in order to schedule instructions for execution on the multi- sequencer hardware 104.
[0037] Fig. 1c is a block diagram illustrating selected features of embodiments 109, 115, 150, 170 of a multi-sequencer system that supports control of threads by user-level instructions. Fig. 1c illustrates selected features of an SMT multi- sequencer multithreading system 109, where each sequencer is a logical processor that may execute a thread concurrently with execution of other threads on other logical processors. Figure 1 also illustrates at least one embodiment of a multi-sequencer system 115 that supports multiple logical sequencers via a switch- on-event (SoeMT) mechanism, such as a time-multiplexing type of switching mechanism, such that each of the logical processors takes turns running its thread - merely one thread executes at a time on such system 115.
[0038] Fig. 1c also illustrates selected features of multiple-core multithreading systems 150, 170. The physical cores for a multi-core multithreading system may be either single-sequencer cores (see, e.g., system 150) or may be multi- sequencer cores (see, e.g., system 170). Such multi-core multithreading embodiments are discussed later, below, while the single-core multi-sequencer systems 109, 115 are discussed immediately below. [0039] In the SMT system 109, a single physical processor 103 is made to appear as multiple thread contexts, referred to herein as TCi through TCn (not shown). Each of the n thread contexts is effectively a sequencer. When at least some of these thread contexts (e.g. m out of n) are made visible to the operating system and/or user programs, these thread contexts are sometimes referred to as logical processors (not shown), and are referred to herein as LPi through LPm,. Each thread context TCi through TCn maintains a set of the architecture state ASi - ASn, respectively. The architecture state includes, for at least one embodiment, data registers, segment registers, control registers, debug registers, and most of the model specific registers. The thread contexts TCi- TCn share most other resources of the physical processor 103, such as caches, execution units, branch predictors, control logic and buses.
[0040] Although such features may be shared, each thread context in the multithreading system 109 can independently generate the next instruction address (and perform, for instance, a fetch from an instruction cache, an execution instruction cache, or trace cache). Thus, the processor 103 includes logically independent next-instruction-pointer and fetch logic 120 to fetch instructions for each thread context, even though the multiple logical sequencers may be implemented in a single physical fetch/decode unit 122. For an SMT embodiment, the term "sequencer" may encompass at least the next-instruction-pointer and fetch logic 120 for a thread context, along with at least some of the associated architecture state, AS, for that thread context. It should be noted that the sequencers of an SMT system 109 need not be symmetric. For example, two SMT sequencers of the same physical processor may differ in the amount of architectural state information that they each maintain.
[0041] Thus, for at least one embodiment, the multi-sequencer system 109 is a single-core processor 103 that supports concurrent multithreading. For such embodiment, each sequencer is a logical processor having its own instruction next- instruction-pointer and fetch logic and its own architectural state information, although the same physical processor core 103 executes all thread instructions. For such embodiment, the logical processor maintains its own version of the architecture state, although execution resources of the single processor core 103 may be shared among concurrently-executing threads.
[0042] Fig. 1c also illustrates an alternative embodiment of a multi-sequencer system 115 that is capable of executing multi-threaded code. The embodiment 115 is labeled as a Switch-on-Event Multithreading ("SOEMT") embodiment. For such embodiment 115, each sequencer is similar to the sequencers of the previous embodiment 109, in that each sequencer is a logical processor having its architectural state information and own instruction next-instruction-pointer. However, the system 115 differs from that 109 discussed above in that the sequencers each share with the other sequencers the same physical fetch logic 120 in a single fetch/decode unit 122 in the physical processor core 103. The fetch logic 120 may be switched to fetch for different sequencers of the system 115 based on a variety of switch-on-event policies. The switch-on-event triggers may be passage of a specific amount of time or machine cycles, such as time- multiplexing (TMUX). For other embodiments, the SOEMT triggers may other events, such as cache-miss events, page faults, long-latency instructions, etc.
[0043] Fig. 1c also illustrates at least two embodiments of multi-core multithreading systems 150, 170. For at least some embodiments of the multi-core system 150, 170 illustrated in Fig. 1c, the system may use a processor 103 as a building block. Each of the sequencers may be a processor core 103, with the multiple cores 103i - 103n, 103i - 103m residing in a single chip package 160, 180, respectively. For system 150 illustrated in Fig. 1c, each core 103j (i = 0 to n) may be a single-threaded sequencer. For the system 170 illustrated in Fig. 1c, each core 103j (j = 1 to m) may be a multi-sequencer processor core.
[0044] The chip packages 160, 180 are denoted with broken lines in Fig. 1c to indicate that the illustrated single-chip embodiments of multi-core systems 150, 170 are illustrative merely. For other embodiments, processor cores of a multi- core system may reside on separate chips, or may be organized as an SOEMT multi-sequencer system.
[0045] A first multi-core multithreading system 150 illustrated in Fig. 1c may include two or more separate physical processors 1031 - 103nthat is each capable of executing a different thread such that execution of at least portions of the different threads may be ongoing at the same time. Each processor 103i through 103n includes a physically independent fetch unit 122 to fetch instruction information for its respective thread. In an embodiment where each processor 103i-103n executes a single thread, the fetch/decode unit 122 implements a single next-instruction-pointer and fetch logic 120. [0046] Fig. 1c also illustrates a multi-core multithreading system 170 that includes multiple SMT systems 109. For such embodiment 170, each processor 103i-103m supports multiple thread contexts. For example, each processor 103i - 103m is an SMT processor that supports k sequencers such that the system 170 effectively implements m*k sequencers. In addition, the fetch/decode unit 122 for the system 170 implements distinct next-instruction-pointer and fetch logic 120 for each supported thread context.
[0047] For ease of illustration, the following discussion focuses on embodiments of the multi-core system 150. However, this focus should not be taken to be limiting, in that the mechanisms described below may be performed in either a multi-core or single-core multi-sequencer system. Also, either single-core or multi-core systems may be implemented with single-sequencer cores or multi- sequencer cores. For each multi-sequencer core, one or more multithreading techniques may be utilized, including SMT and/or SoeMT. It will be understood that the systems 109, 115, 150, 170 shown in Fig. 1c may include additional features, such as a memory system, execution units, and the like, that are not shown in Fig. 1c.
[0048] Each sequencer, 103, for the system embodiments 109, 115, 150, 170 illustrated in Fig. 1c may be associated with a unique identifier (discussed below in connection with Fig. 3). Various embodiments of the systems 109, 150 may include a different number, N, of total sequencers.
[0049] Embodiments of the systems 109, 115, 150, 170 illustrated in Fig. 1c may each support signaling among sequencers. As used herein, the term "sequencer arithmetic" is used to refer to inter-sequencer signaling for service between two sequencers. Architectural support for sequencer arithmetic may include extensions to an instruction set architecture such that one or more instructions are provided to allow a user direct manipulation of control and state transfers between sequencers. A user-level instruction is said to be "sequencer aware" if it is a sequencer arithmetic instruction or any other type of instruction that includes a logical sequencer address as a parameter, which can be encoded as an instruction operand and/or implicitly referenced upon instruction execution. Such instructions may include sequencer arithmetic instructions that either provide for signaling another sequencer (referred to herein as a "user level control transfer instruction") or provide for setting up a client sequencer to monitor for such a signal (referred to herein as a "user level monitor instruction)."
[0050] Sequencer aware instructions may also include other instructions that include a logical sequencer address as a parameter, such as sequencer aware state save and restore instruction. Upon execution of such a state save instruction, a first sequencer can create a snapshot copy of the architectural states of a second sequencer. The sequencer aware restore instruction may designate that the save architectural states be loaded to a specified sequencer.
[0051] Each sequencer aware instruction may also optionally include more than one logical sequencer addresses as parameters. For example, a sequencer- aware instruction may include as a parameter an aggregate of multiple logical sequencer addresses. Such approach may be utilized for multicasting or broadcasting inter-sequencer signals from one sequencer to multiple other sequencers. In order to simplify the following discussion, examples set forth below may refer, unless otherwise specified, to the unicasting case: a first sequencer executes a sequencer-aware instruction that specifies a single other logical sequencer address. Such approach is made for descriptive convenience and illustrative purposes merely, and should not be taken to be limiting. One of skill in the art will realize that embodiments of the mechanisms discussed herein may be applied to broadcasting and multicasting sequencer-aware instructions as well.
[0052] Figure 3a shows a view of an instruction set architecture for the systems of Figures 1 A - 1C. Referring now to Figure 3a of the drawings, there is shown an Instruction Set Architecture (ISA) view 300 of the systems 100A, and 100B. An ISA defines a logical view of a system, as seen by an assembly language programmer, binary translator, assembler, or the like. In terms of its ISA, the systems 100A, and 100B include a logical storage 302 and an instruction set 304. The logical storage 302 defines a visible memory hierarchy, addressing scheme, register set, etc. for the systems 100A, and 100B, whereas the instruction set 304 defines the instructions and the format of the instructions that the systems 100A, and 100B support. In an embodiment, the instruction set 304 may comprise the instruction set known as the IA32 instruction set and its extensions, although other instruction sets are possible. Additionally, in an embodiment, the instruction set 304 includes two instructions known as a user-level control-transfer instruction, and a user-level monitoring instruction. An example of a user-level control-transfer instruction may be a SXFR instruction. An example of a user-level monitoring instruction may be a SEMONITOR instruction. An example SXFR instruction and SEMONITOR instruction will be discussed to assist in understanding of a user- level control-transfer instruction and a user-level monitoring instruction.
[0053] Broadly, the SXFR instruction is used to send a signal from a first sequencer to a second sequencer, and the SEMONITOR instruction is used to configure the second sequencer to monitor for the signal from the first sequencer. Further, these control transfer and monitoring instructions are sequencer aware, as will be discussed later, and can compose more sequencer aware composite instructions.
[0054] Figure 3b illustrates a logical diagram of an embodiment of a processor with two or more instruction sequencers that include a user-level control-transfer instruction and a user-level monitor instruction in their instruction sets. The processor 332 may include one or more instruction sequencers 338-342 to execute different threads. In an embodiment, multiple instruction sequencers can share a decoder unit and/or instruction execution unit. Likewise, each instruction sequencer can have its own dedicated process instruction pipeline that includes a decoder unit, such as a first decoder unit 334, an instruction execution unit such as a first instruction execution unit 335 , etc. At least some of the multiple instruction sequencers 338-342 include instruction sets 344 that at least include a user-level monitoring instruction (such as a SEMONITOR instruction), a user-level control- transfer instruction (such as a SXFR instruction), a sequencer-aware store instruction (such as a SSAVE instruction), and a sequencer-aware restore instruction (such as a SRSTOR instruction). Alternatively, the sequencer-aware store and restore instructions may not be part of the instruction set 344. Rather, the user-level control-transfer and monitoring instructions may be part of the instruction set and then used in conjunction with a scenario and a pointer to handler code to compose the sequencer-aware store and restore instructions. Types of scenarios, which may be architecturally defined composite triggering conditions based on micro architectural events, will be described later.
[0055] The flow of the control transfer operation may occur as follows.
[0056] A first instance of the user-level monitoring instruction 346 may specify one of the instructions sequencers, a pointer to a location of handler code, and one of a number of control-transfer scenarios. The monitoring instruction 346 may cause the executing instruction sequencer, such as a first instruction sequencer 338, to setup the specified instruction sequencer to invoke the handler-code at the specified memory location upon observing or receiving signaling of the specified control-transfer scenario. The first memory location 348 storing the handler code may be a register, a cache, or other similar storage device. The user-level monitoring instruction 346 may be executed first to set up a specified target instruction sequencer to receive a control-transfer signal before the source instruction sequencer sends this control-transfer signal.
[0057] The executing instruction sequencer, such as the first instruction sequencer 338, may execute a sequencer-aware save instruction in order to save the context state of target instruction sequencer. The context state of the destination instruction sequencer may be stored in a second memory location 350. The second memory location may be a different location within a shared memory array or in a discrete memory area than the first memory location. [0058] A first instance of the control-transfer instruction 352 may specify one of the instruction sequencers and one of the many control-transfer scenarios. The specified control-transfer scenario may be stored in, for example, a table 354. The control-transfer instruction 352 causes the executing instruction sequencer to generate a control-transfer signal to be received by the specified target instruction sequencer, such as a second instruction sequencer 340.
[0059] The specified target instruction sequencer 340 detects the control- transfer signal generated in response to the execution of the control-transfer instruction 352 that specifies that instruction sequencer. The specified target instruction sequencer 340 then executes the handler code specified by the monitoring instruction 346 that specified that instruction sequencer.
[0060] After the execution of the handler code has finished, the first instruction sequencer 338 (i.e. the source instruction sequencer) may execute a sequencer- aware restore instruction to restore the context state of target instruction sequencer from its location in the second memory location 350.
[0061] In an embodiment, a processor may include multisequencer hardware. Each instruction sequencer is capable of executing different threads. At least some of the multiple instruction sequencers are capable of executing user-level instructions. The user-level instructions may be sequencer-aware. Each of the user-level instructions may contain information that specifies at least one of the multiple instructions sequencers. Execution of the instructions on an executing sequencer causes the executing instruction sequencer to perform a thread management operation on the specified one of the multiple instruction sequencers without operating system intervention. The thread management operation may be a thread creation, a thread control, or a thread synchronization operation. Examples of the user-level instructions include the sequencer-aware SXFR, SEMONITOR, SSAVE, and SRSTR instructions described in more detail below.
[0062] In an embodiment, the SXFR instruction includes the instruction format shown in Figure 4A of the drawings. Referring to Figure 4A, it will be seen that the SXFR instruction includes an opcode 400A, and operands 402A to 410A. The operand 402A corresponds to a sequencer ID (SID) for a destination/target sequencer to which the signal is sent. The operand 404A comprises a scenario or control message, which may be an architecturally defined identifier code representing a condition or anticipated event. A scenario may be used to effect asynchronous control transfer as will be described. Referring to Figure 6A of the drawings, there is shown a table of scenarios in accordance with one embodiment of the invention. Broadly, the scenarios may be divided into intra-sequencer scenarios, and inter-sequencer scenarios. In an embodiment, the intra- sequencers scenarios fall into the category of resource not available (RNA), which is a category for events generated during execution on a sequencer due to access to a resource not being available on the sequencer. In an embodiment, scenarios that fall into the category of RNA include a page fault, a system call on OS- sequestered sequencer that is incapable of directly activating OS service, or a deprecated operation fault. A deprecated operation fault is a fault caused by a limited or deprecated subset of ISA features implemented on the sequencer. For example, a deprecated operation fault may occur when attempting to execute an instruction that requires a floating point adder, on a sequencer that does not physically implement a floating point adder. To those familiar with the arts, the mechanism described here can be implemented at different level abstractions, in application software, system level software, or firmware like microcode, or in hardware.
[0063] Examples of inter-sequencer scenarios include an initialize scenario referenced as an "INIT" scenario, a "FORK/EXEC" scenario, and a "PROXY" scenario. The INIT scenario causes a sequencer whose SID is specified in a SXFR instruction to cause a set of sequencer-specific architectural states (such as general purpose registers or machine specific control registers) to be respectively initialized to a set of initial values, whereas the FORK/EXEC scenario causes a thread executing on a sequencer that executes a SXFR instruction to fork or start a parallel thread of execution on a sequencer identified by the destination SID in a SXFR instruction, by set particular values to the destination sequencer states that include at least instruction pointer (EIP) and/or stack pointer (ESP). The PROXY scenario is used to cause a sequencer identified by the SID in a SXFR instruction to operate in a proxy execution mode, for example, in order to process instructions on behalf of the sequencer that executed the SXFR instruction. For example, in an embodiment, the sequencer that operates in a proxy execution mode may be used to process instructions that cannot be processed on a sequencer that supports only a deprecated set of ISA features. In an embodiment, the PROXY scenario may be divided into a BEGIN_PROXY scenario, and an END_PROXY scenario. The BEGIN_PROXY scenario causes an instruction sequencer to operate in proxy execution mode, as described, whereas the END_PROXY scenario terminates operation of the proxy execution mode.
[0064] Referring again to Figure 4A of the drawings, in an embodiment, the operand 406A comprises a conditional parameter that conditions execution of instructions on a sequencer that executes a SXFR instruction. Examples of conditional parameters include a "WAIT" and a "NOWAIT" parameter. For example, when SXFR is used with the PROXY scenario, the WAIT conditional parameter causes the execution of instructions on a sequencer that executes a SXFR instruction to stop while waiting for completion of proxy execution on another sequencer. The NOWAIT conditional parameter specifies that execution on a sequencer that executes a SXFR instruction may continue in parallel with proxy execution on another instruction sequencer.
[0065] In an embodiment, the operand 408A comprises a scenario specific payload or data message. For example in the case of the FORK/EXEC scenario, the payload may comprise an instruction pointer at which execution on the sequencer identified by the operand 402A is to commence. According to different embodiments, the payload may comprise an instruction pointer, a stack pointer, etc. Addresses contained in the payload may be expressed in a variety of addressing modes such as literal, register indirect, and base/offset addressing.
[0066] The operand 410A specifies a routing function on the SID contained in the operand 402A. The routing function controls whether the signal generated as a result of executing a SXFR instruction is sent as a broadcast, a unicast, or a multicast signal. The routing function can also encode topology-specific hint information that can be used to assist an underlying inter-sequencer interconnect in routing to deliver the signal.
[0067] Referring now to Figure 4B of the drawings, there is shown the format of a SEMONITOR instruction, in accordance with one embodiment of the invention. As can be seen, the SEMONITOR instruction includes an opcode 400B, and operands 402B to 406B. The operand 402B specifies a scenario, which may, for example, be expressed in terms of a scenario ID. The operand 404B specifies a tuple comprising a sequencer ID (SID) and an instruction pointer (EIP). For descriptive convenience, the tuple is referred to as a "SIDEIP".
[0068] The SEMONITOR instruction maps a scenario specified in the operand 402B to a SIDEIP specified in the operand 404B. Thus, the SEMONITOR instruction may be used to create a mapping table, such as is shown in Figure 6B of the drawings, which maps each scenario to a specific SIDEIP. Each mapping of a scenario to a specific SIDEIP is termed a "service channel". The operand 406B allows a programmer to input one or more control parameters to control how a particular service channel is serviced, as will be explained in greater detail below. A programmer may use the SEMONITOR instruction to program the service channels that a particular sequencer uses to monitor for a given scenario. In an embodiment, when the anticipated condition corresponding to a scenario is observed, a sequencer incurs a yield event to cause asynchronous control transfer to a yield event handler starting at the SIDEIP mapped to the scenario. For example, in the case of the anticipated condition corresponding to a fault, once a control yield event is incurred, the current (return) instruction pointer is pushed onto the current stack and control is transferred to the SIDEIP mapped to the observed scenario. In the case of the anticipated condition corresponding to trap, then the next instruction pointer is pushed onto the current stack and control is transferred to the SIDEIP mapped to the observed scenario. A fault may dispose of an instruction before that instruction is executed. A trap may dispose of an instruction after the instruction is executed.
[0069] In an embodiment, an architecturally defined blocking bit may be set to prevent recursive triggering of a yield event until the blocking bit is reset. A special return instruction may atomically reset the blocking bit and return control from the yield event handler back to the original code whose execution generated the yield event.
Based on the above description it will be appreciated that both the SXFR and SEMONITOR are "sequencer-aware" in that they include operands that identify particular sequencers. Further, the SSAVE and SRSTOR instructions, described later, are also "sequencer-aware" in that they include operands that identify particular sequencers. Also, these user- level instructions may be "sequencer- aware" in that they have a pointer to instructions in handler code. The handler code when executed by an instruction execution unit references one or more specific instruction sequencers when that handler code is executed. The handler code is associated with the user level instruction because the user level instruction directs the instruction pointer to the start of the handler code and the user level instruction directs the operations of the thread after the handler code is finished executing. Thus, the user level instructions may be sequencer aware if the user level instructions have either 1 ) a field that makes a specific reference to one or more instruction sequencers or 2) implicitly references with a pointer to handler code that specifically addresses one or more instruction sequencers when the handler code is executed.
[0070] In an embodiment, the instructions SXFR and SEMONITOR may be used to implement inter-sequencer control transfer as will be described, with reference to Figure 5 of the drawings.
[0071] Referring to Figure 5, a sequencer 500, upon encountering an SXFR instruction at an instruction pointer "I" transfers control to sequencer 502, to cause the sequencer 502 to start executing handler instructions starting at an instruction pointer "J". In an embodiment, a SXFR instruction in the format: SXFR (SID, SCENARIOJD, CONDITIONAL_PARAMETER), for example, SXFR (502, BEGIN_PROXY, NOWAIT) may be used to affect the control transfer. Taking a closer look at the format of the SXFR instruction, the "SID " appearing in the instruction, is a reference to the sequencer identifier (SID) for the sequencer 502. The "SCENARIOJD" part of the instruction is a reference to a scenario which, as described above, can be programmed into the system 100A, and 100B to cause asynchronous control transfer. As noted above, in an embodiment, the system 100A, and 100B supports the scenarios shown in the scenario table in Figure 6A of the drawings. Each scenario is encoded to a scenario identifier (ID). In an embodiment, values corresponding to a particular scenario ID may be programmed into a register, from which it may be read when the SXFR instruction is executed. [0072] In an embodiment, in order to resolve the instruction pointer associated with the "SCENARIOJD" part of the SXFR instruction, the mapping table of Figure 6B1 which maps each scenario to a SIDEIP, is used.
[0073] As described above, in order to populate the table of Figure 6B with the service channels, the SEMONITOR instruction is used. For example, the instruction SEMONITOR (1 , (502,J)) which is of the format: SEMONITOR (SCENARIOJD, SIDEIP), maps the instruction pointer "J" on sequencer 502 to the scenario indicated by SCENARIOJD=1, i.e. the BEGIN_PROXY scenario. Execution of the instruction SXFR (502, 1 ), on the sequencer 500 causes a signal including a SCENARIOJD of 1 to be delivered to the sequencer 502.
[0074] In response to the signal, the sequencer 502 incurs a yield event that causes a control transfer to the instruction pointer "J" at which with handler-code associated with the BEGIN_PROXY scenario begins. In an embodiment, instead of immediately executing the handler-code starting at the instruction pointer "J" in response to receiving the signal, the sequencer 502 may queue a number of received signals, and once the number of the signals exceeds a threshold, the sequencer 502 serving the signals by executing handler-code associated with the various signals. In an embodiment, the particular manner in which the sequencer 502 is to process a signal, i.e. whether by immediate processing, or by delayed processing using a queue, and the value of the threshold, is controlled or configured by the control parameter 406B in the SEMONITOR instruction. This queuing of requests can also be done in software as well. [0075] In an embodiment, the handler-code may contain instructions to cause a service thread to start executing on the instruction sequencer 502. Basically, a service thread is any thread that aids or assists in the execution of a first thread executing on another sequencer, i.e. sequencer 500 in the case of Figure 5. In order for the service thread to execute on the sequencer 502, there should be some form of state transfer between the sequencers 500 and 502. In an embodiment, a sequencer-specific context save instruction and a sequencer-specific context restore instruction is provided in addition to the SXFR and SEMONITOR instructions. The sequencer context save instruction is denoted as SSAVE and the sequencer context restore operation is denoted as SRSTOR. Both SSAVE and SRSTOR are sequencer-aware instructions. Alternatively, a minimal canonical instruction set may merely include the SXFR and SEMONITOR instructions. For example, in an embodiment, scenarios for sequencer context save and/or restore are defined. When the SXFR and SEMONITOR instructions are used in conjunction with a scenario and a pointer to handler code. The corresponding handler code on the target sequencer can perform the respective sequencer context save and/or restore operation, achieving the same effects of the dedicated SRSTOR and SSAVE instructions.
[0076] In another embodiment, a sequencer-aware context save instruction may be synthesized by having a scenario that maps to a code block to perform a sequencer-aware context save. Likewise, it is possible to synthesize a sequencer- aware context restore operation using a scenario. [0077] In an embodiment, both the SSAVE and SRSTOR instructions include an operand corresponding to a SID1 and operand comprising an address for a "save area" at which the state for the sequencer identified by the SID operand is to be saved. In the example of Figure 5, in order for the sequencer 502 to be able to execute a service thread to facilitate or help execution of a first thread running on the sequencer 500, it is necessary for the sequencer 502 to have access to the execution context for the first thread. To make the execution context for the first thread available to the sequencer 502, the instruction SSAVE, is first executed on the sequencer 502 to save the execution context for the first thread executing on the sequencer 500 in a first memory location 512. In order to preserve the existing work done on sequencer 502 prior to performing service thread computation on behalf of sequencer 500, the currently running code (hereinafter "prior code") on 502 may perform SSAVE to save the execution context of the prior code to a second memory location 514. The save areas, the first memory location 512 and the second memory location 514 are not overlapping.
[0078] Once the execution context of the prior code is saved in the second memory location 514, the sequencer 502 executes a SRSTOR instruction indicating the first memory location 512 to change the sequencer states of the sequencer 502 to the execution context/state associated with the processing of the first thread on the sequencer 500. Thereafter, the sequencer 502 may commence execution of the service thread. While the service thread is executing, the options for the sequencer 500 include waiting for the service thread to complete execution, or to switching to execute a second thread. Once the service thread completes execution on the sequencer 502, the sequencer 502 executes a SXFR instruction to send a signal to sequencer 500 to indicate that the execution of the service thread has completed. Prior to sending the signal to the sequencer 500 to indicate that execution of the service thread has completed, the sequencer 502 executes a SSAVE instruction to save an updated execution context for the first thread after completion of the service thread in a first memory location 516.
[0079] In the case where sequencer 500 is waiting for service thread to complete execution, the service thread on sequencer 502 can then perform SRSTOR indicating the third memory location 516 to update the execution context for the first thread on sequencer 500, prior to executing SXFR to notify sequencer 500 to resume code execution. After notifying sequencer 500 of completion of service thread
[0080] Alternatively, upon receipt of the signal to indicate completion of the service thread from the sequencer 502, the sequencer 500 executes a SRSTOR (500, POINTER_TO_SAVE_AREA_B) instruction to change the execution context of the sequencer 500 to that of the first thread upon completion of the service thread.
[0081] In an embodiment, the saving and restoring of an instruction sequencer's context state can be performed remotely on a target sequencer. The source sequencer sends a message for the target instruction sequencer to save and/or restore its sequencer's context state. This could be implemented as a SXFR instruction with a particular scenario. [0082] In an embodiment, the thread management logic 114 includes a proxy execution mechanism 700, and a sequencer sequester mechanism 702 as can be seen in Figure 7 of the drawings.
[0083] To illustrate the operation of the proxy execution mechanism 700, consider the system 800 shown in Figure 8 of the drawings, which includes two sequencers designated S1 , and S2 respectively. The sequencers S1 , and S2 may be symmetrical or asymmetrical with respect to each other. In this example the sequencers are asymmetrical, with the sequencer S1 including only processing resources A and B, whereas the sequencer S2 includes processing resources A, D1 and C. The processing resources of the sequencer S1 must be able to support the execution of the instruction blocks 1 and 2.
[0084] Time (T1) is located at the end arrow of the block of instructions 2. T1 shows the monitor detects an event that causes the migration of the single thread from the client instruction sequencer S1 to the servant instruction sequencer S2. At time T1 , a third block of instructions is scheduled to execute on the sequencer S1 , however the third block of instructions requires the use of a processing resource not available on the sequencer S1, say, the processing resource D, which is available on the sequencer S2. At this point, the sequencer S1 , at least in an embodiment incurs a resource-not-available fault and a resource-not-available handler which may be defined in user-level software (or in thread management logic hardware or firmware) invokes the proxy execution mechanism 700 to cause the third block of instructions to be migrated to the sequencer S2 for execution thereon. [0085] Time (T2) is located at the beginning of the line to the arrow of the third block of instructions. T2 shows the start of the execution of a block of instructions from the single thread on the servant instruction sequencer S2 on behalf of the client instruction sequencer S1.
[0086] Time (T3) is located at the end arrow of the third block of instructions. T3 shows the completion of the execution of a block of instructions from the single thread on the servant instruction sequencer S2. At time t3, after execution of the third block of instructions on the sequencer S2 using the processing resource D, the sequencer S2 uses the proxy execution mechanism 700 to signal to the sequencer S1 that execution of the third block of instructions has completed.
[0087] Time (T4) is located at the beginning of the line to the arrow of a fourth block of instructions. T4 shows the completion of the proxy execution of a block of instructions from the single thread on the servant instruction sequencer S2 and the transfer back to the client instruction sequencer S1. The sequencer S1 can then proceed to execute, a fourth block of instructions, which merely requires processing resources available on the sequencer S1.
[0088] Since, in above example, the sequencer S1 is using the sequencer S2 to execute an instruction block on its behalf, the sequencer S1 is called a "client" sequencer. The sequencer S2, which operates in a proxy execution mode to execute an instruction block on behalf a client sequencer, is known as a "servant" sequencer. The resource D may comprise a highly specialized functional unit for a limited set of applications. The functional unit may be relatively power hungry, costly, and complex. Thus, in order to save costs, in a particular implementation the resource D is only implemented on the sequencer S2, and not on the sequencer S1. However, as noted above, the proxy execution mechanism 700 masks the asymmetry between the sequencers in a multi-sequencer system by mapping the processing resources available on the various sequencers in a multi- sequencer system so that a client sequencer can use the proxy execution mechanism to migrate a thread to execute on a sequencer that has a processing resource required, or optimized to execute the thread. The proxy execution mechanism 700, may also be used to migrate an instruction block executing on a OS-sequestered sequencer, to an OS-visible sequencer, e.g. in order to perform an OS service, such as the handling of a page fault or a syscall, as will be explained in greater detail below with reference to Figure 11 of the drawings.
[0089] For a given physical implementation of the multi-sequencer system with asymmetric resource organization, the proxy execution mechanism 700 may be constructed using the SEMONITOR and SXFR instructions, as described above, and include a mapping mechanism. In general, the proxy execution mechanism 700 may reside in hardware, in firmware (e.g. microcode), or at a system software layer, or application software layer. In an embodiment, the proxy execution mechanism 700 may use the SEMONITOR and SXFR instructions to handle two categories of proxy services. The first category is known as an egress service scenario, whereas the second category is known as the ingress service scenario. On a client sequencer, for a set of resources and the associated operations that are not available or physically not supported in the dient sequencer, egress service scenarios are defined to trap or fault these operations. Each egress scenario is mapped to a sequencer ID (and instruction pointer (SIDEIP)) pointing to a servant sequencer. The mapping may be achieved in hardware, firmware or even in software. The proxy access of the servant sequencer can then be achieved using inter-sequencer signaling, as described above.
[0090] A servant sequencer is responsible for supporting proxy access to the resources that are not present in a client sequencer but present on the servant sequencer. The ingress service scenarios are defined and configured into the service channel and mapped to the local service handlers (handler-code) that perform the proxy execution on behalf of the client sequencers. A list of sample egress and ingress service scenarios is provided in the table of Figure 6A.
[0091] In one sense, an egress service scenario corresponds to a trap or fault operation that incurs a "miss" at a client sequencer due to required access to a processing resource not available on the client sequencer yet available on a servant sequencer. Conversely, an ingress service scenario corresponds to asynchronous interrupt condition indicating the arrival of a request to access a local processing resource, available on the servant sequencer, on behalf of a client sequencer that does not possess the local processing resource. The proxy execution mechanism defines a veneer or layer of abstraction associated with each sequencer in a multi-sequencer so that the client and servant sequencers work in concert to perform proxy resource access. In at least one embodiment where the proxy execution is implemented in firmware or directly in hardware, the proxy resource access is transparent to user-level software and to an OS. [0092] Each service scenario plays a similar role to that of an opcode in a traditional ISA, except that a service scenario triggers a special handler-code flow. Thus, it is possible to synthesize new composite instructions using the SXFR instruction as meta-instruction and an egress service scenario mapped to handler- code for the instruction being synthesized. In an embodiment, the relationship between a service scenario ID, and its handler-code flow is akin to the relationship between a Complex Instruction Set Computer (CISC) opcode and its corresponding microcode flow. The CISC can be composed by using the user- level sequencer aware monitor and control transfer instructions as the canonical instruction basis to build the microcode flow. As described above, the mapping between a service scenario and its handler-code is achieved via SEMONITOR, while SXFR provides a mechanism for sending control messages between sequencers. The communication of the control messages act as a trigger for the execution of handler-code mapped to the service scenarios.
[0093] In an embodiment, the sequencer sequester mechanism 702 may be used to map or group a particular combination of OS-visible sequencers and OS- sequestered sequencers to form a logical processor. The mapping may be a one- to-many mapping comprising a single OS-visible sequencer mapped to many OS- sequestered sequencers, or a many-to-many mapping comprising many OS-visible sequencers mapped to many OS-sequestered sequencers. For example, Figure 9 shows a multi-sequencer system comprising two logical processors 900 and 902, respectively. Each of the logical processors 900, and 902 comprise a one-to-many mapping in which a single OS-visible sequencer is mapped to many OS- sequestered sequencers.
[0094] Turning to Figure 10, an example multi-sequencer system 1000 may include an ensemble of 18 sequencers in which two OS-visible sequencers are mapped to 16 OS-sequestered sequencers to define a many-to-many mapping. Within the logical processor of the system 1000, both of the OS-visible sequencers can serve as a proxy for any of the OS-sequestered sequencers.
[0095] In an embodiment, the sequencer sequester mechanism 702 may selectively sequester sequencers away from OS control. According to different embodiments of the invention, the sequencers may be sequestered post boot or in some cases even during boot time. In order to sequester a sequencer under OS control, the sequencer sequester mechanism 702 may set an indicator to the OS to specify that the sequencer is in an unavailable state. For example, the sequencer sequester mechanism 702 may impersonate a sequencer's power or power/performance state to indicate to the OS that the sequencer has entered a special unavailable state so that the OS will deem the sequencer as too overloaded or too hot to dispatch computation or schedule instructions for the sequencer. In an embodiment, for a sequencer that implements a power saving mechanism such as Intel SpeedStep © technology, the sequencer sequester mechanism 702 may turn a particular subset of OS-visible sequencers to the special power states to indicate that the subset of sequencers are in the non- available state so that the OS will deem these subset of sequencers as overloaded and thus not dispatch computation to the subset of sequencers. In a manner transparent to the OS, the SXFR and SEMONITOR instructions may be used to schedule computations or threads for the sequestered sequencer.
[0096] In an embodiment, once a sequestered sequencer has completed executing a thread, control of the sequestered sequencer may be surrendered back to the OS. This may be achieved by a mechanism setting an indicator to indicate to the OS that the sequestered instruction sequencer is no longer in the non-available state.
[0097] In an embodiment, a privileged state of a sequestered instruction sequencer is synchronized with a counterpart privileged state of non-sequestered instruction sequencers that are still under OS control.
[0098] In general, in order to canonically support a general purpose M: N multithreading package, i.e. one that maps M threads to N sequencers, where M»N, the minimal building block synchronization objects that are required are critical section and event. With these synchronization objects, higher level synchronization objects like mutexes, conditional variables, and semaphores can be constructed. A critical section can be implemented via hardware lock primitives. The sequestered sequencers can inherit state from the non-sequestered sequencers such that the view of virtual memory is the same for both sequestered sequencers and non-sequestered sequencers. An event can be supported by an event-driven multi-sequencer scheduler (centralized or distributed) synthesized with the SXFR and SEMONITOR instructions. For example, a simple POSIX compliant or compatible distributed scheduler that has a global task queue protected by a critical section may be created. Each sequencer effectively runs one copy of the scheduler and attempts to contend access to the head of the task queue to grab the next ready task thread to run on the sequencer. Should one task on a sequencer be waiting for a synchronization variable such as mutex, a conditional variable, or a semaphore, the task will be de-scheduled via yield and put at the tail of the global task queue after entering the corresponding critical section.
[0099] Due to the widespread adoption of thread primitives in most modern OSes' thread libraries, it is possible that a vast number of existing threaded code built on top of these POSIX compliant or compatible thread libraries can be ported to the multi-sequencer environment. Naturally, the header files in the threads may have to be remapped and the legacy threaded code recompiled.
[00100] By using the SFXR and SEMONITOR instructions and the INIT scenario, it is possible to schedule threads of execution on OS-sequestered sequencers, without using an OS. Thus, by virtue of the techniques disclosed herein it is possible to build a multi-sequencer system with more sequencers than an OS has the ability to support and to allow user-level scheduling of threads on sequencers of the multi-sequencer system that are not supported by the OS.
[00101] Accordingly, in an embodiment, the multiple instruction sequencers with the extended instruction set can also support a single image OS on larger number of processors than natively supported by the OS. For example, an OS capable of supporting a 4-way instruction sequencer could be implemented as the OS for a hardware implementation that actually has 32-way instruction sequencer system. This allows applications to use more processors than the number of sequencers limit supported by the OS. The instruction sequencers may be asymmetric sequencers or symmetric sequencers.
[00102] Now we describe one embodiment for proxy execution in a multisequencer system where some sequencers are OS-visible while others are OS-invisible. In general, when code running on the OS-invisible sequencers incurs a page fault or a system call that requires OS services, proxy execution mechanism ensures proper handling. Referring now to Figure 11of the drawings, there is shown a flowchart of operations performed in order to affect an OS service on an OS-sequestered sequencer with sequencer ID SID1 , in response to a trigger event for proxy execution. Upon encountering the trigger event, the OS- sequestered sequencer SID1 executes the instruction SSAVE (1 , ST_1_0), at 1100. The trigger event may be a predefined condition of execution in the architectural state requiring an OS service, such as a trap, a page fault, or a system call. This instruction saves the execution context of a thread whose execution generated the trigger event. For descriptive convenience, the save area for the execution context of the thread is designated (ST_1_0), to which access will not cause page fault in at least one embodiment. At 1102, a SXFR instruction is executed in order to pass the egress service scenario "BEGIN_PROXY" to an OS- visible sequencer SIDO. Note that because the SXFR instruction executed at 1102 included the conditional parameter "WAIT", processing of instructions on sequencer SID1 is to be blocked pending completion of the proxy execution thread on the sequencer SIDO. At 1104, the sequencer SIDO detects the signal from the sequencer SID1 , and yields or "temporarily suspends", execution of the current thread. At 1106, a SSAVE instruction is executed to save the execution context or state associated with sequencer SIDO. The execution context save area is labeled "ST_0_0" which does not overlap with ST_1_0. At 1108, a proxy bit is set to 1 to indicate that the sequencer SIDO is operating in proxy execution mode. At 1110, a context restore operation (SRSTOR) is executed in order to copy the state "ST_1_0", which is the execution context associated with the page fault on SID1. At 1112, the page fault is replicated or impersonated on the sequencer SIDO. At 1114, a ring transition is performed to switch control to the OS. The OS services the page fault. When OS service completes, upon the privilege level switch (i.e. a ring transition) from OS to user-level and if the proxy-bit is ON, the END_PROXY scenario is incurred as an intra-sequencer yield event. In the yield event handler due to END_PROXY scenario, at 1116, a context save is performed to save an execution context "ST_1_1". At 1118, the proxy bit is set to 0. At 1120, a SXFR instruction is executed to pass the service scenario "END_PROXY" to the sequencer SID1. At 1122, the sequencer SIDO restores state ST_0_0. At 1124, the sequencer SID1 yields on receiving the "END_PROXY" scenario to restore, at 1126, the context "ST_1_1" so that execution of the thread that encountered the trigger event may recommence.
[00103] In an embodiment, proxy execution may be the migration of a user level thread in response to detecting an asymmetric condition between an OS-visible instruction sequencer and an instruction sequencer under the control of an application level program when executing the user level thread. [00104] An asymmetric condition between the instruction sequencers may include at least the following conditions such as the need for a ring/privilege level transition; which includes a page fault or system call, a lack of instruction capability by the instruction sequencer executing the user level thread (e.g., deprecation of certain instruction on one sequencer and resulting invalid op code fault), a difference in instruction execution performance between the two instruction sequencers.
[00105] States migration during proxy execution may be heavy weight or light weight. Heavy weight migration is a full register state that is saved from a transferring sequencer and restored onto the receiving sequencer. Heavy weight migration has at least one instruction from the user level thread executed on the receiving sequencer for the benefit of the transferring sequencer. Heavy weight migration allows for user level thread being executed to stay at the receiving sequencer or to return to the transferring sequencer after executing one or more instruction on behalf of the transferring instruction sequencer.
[00106] Light weight migration has many varieties - the idea being to streamline for specific situations. Light weight migration may include transferring some small amount of state so that some small task may be handled. In some light weight migration scenarios, an instruction from the user level thread is not actually executed - e.g., in the page fault situation. The instruction sequencer under the control of an application level program just transfers over the address that causes the page fault. The receiving sequencer just performs a probe load to cause the page to be loaded, and then conveys that this desired task has been accomplished back to the instruction sequencer under the control of the application level program. Thus, migration may not mean that an instruction from the migrating user level thread is actually executed.
[00107] Thus a proxy execution occurs essentially, anytime a second instruction sequencer performs an action On behalf of ' or 'derived from1 a first instruction sequencer that is executing a user level thread.
[00108] In an embodiment for the light-weight handling of page fault, one aspect of proxy execution includes the suspension of execution of instructions in a user- level thread in a first instruction sequencer that is under the control of the application level program. The transferring an address pointer from the first instruction sequencer that is under the control of the application level program to an OS-visible instruction sequencer. The loading of the contents at the address pointer with the OS-visible instruction sequencer. Finally, the resuming of execution of the first user-level thread in the instruction sequencer that is under the control of the application level program after the contents at the address pointer have been loaded.
[00109] Another aspect of proxy execution includes the transferring of control and state information from an OS sequestered instruction sequencer to an OS- visible instruction sequencer. Also, the migrating of execution of at least one instruction from the first user-level thread on the OS sequestered instruction sequencer to the OS-visible instruction sequencer so that the OS-visible instruction sequencer may trigger an operating system to perform an OS operation on behalf of the OS sequestered instruction sequencer. [00110] Figure 12 of the drawings shows a processing system 1200, in accordance with one embodiment of the invention. As will be seen, the system 1200 includes a processing component 1202 that is coupled to a storage device 1204. In an embodiment, the processing component 1202 includes a plurality of instruction sequencers, only two of which have been shown in Figure 12 of the drawings where they are designation as 1206A1 and 1206B, respectively. The processing component 1202 also includes a control transfer mechanism 1208 that includes a signaling mechanism 1210, and a monitoring mechanism 1212. The signaling mechanism 1210 may be used to send scenarios/control-transfer messages between the sequencers of the processing component 1202. As such, in an embodiment, the signaling mechanism 1210 includes logic to execute the SXFR instruction described above. The monitoring mechanism 1212 may be used to set up any of the instruction sequencers of the processing component 1202 to monitor for a signal that includes a particular control message/scenario. In an embodiment, the monitoring mechanism includes logic to decode the SEMONITOR instruction described above.
[00111] The processing component 1202 also includes a sequencer sequester mechanism 1214, as described above.
[00112] The storage device 1204 may include an operating system. In an embodiment, the operating system may perform context switching by storing a previous task's entire register state and restoring the next task's entire register state. [00113] Within the processing component 1202, various techniques may be used to set up, for example, the sequencer 1206B to monitor for particular signals from the sequencer 1206A. In an embodiment, the sequencer 1206B may be pre- configured (i.e., without requiring any user configuration step) to monitor for signals that carry certain control messages/scenarios. Thus, in an embodiment, the sequencer 1206B may be pre-configured to monitor for a signal that carries the INIT scenario. It will appreciated, that a user-level instruction such as SXFR may be used to trigger execution of initialization code on the sequencer 1206B. The initialization code itself may comprise a SEMONITOR instruction that may be used set up the sequencer 1206B to monitor for particular signals (scenarios) from the sequencer 1206A.
[00114] In another embodiment, the sequencer-aware SEMONITOR instruction may be executed on the sequencer 1206A to cause the sequencer 1206B to monitor for particular signals/scenarios from the sequencer 1206A. In another embodiment, a pointer to a memory location that store bootstrap/initialization code may be saved as part of a context for the sequencer 1206A using the SSAVE instruction described above. For this embodiment, it is possible to execute a SRSTOR instruction on the sequencer 1206B to restore the context/state for the sequencer 1206A so that the bootstrap/initialization code may be executed. The bootstrap/initialization code by itself contains at least one SEMONITOR instruction to set up the sequencer 1206B to monitor for particular signals/scenarios from the sequencer 1206A. [00115] Figure 13 illustrates a block diagram of an example computer system that may use an embodiment of a processor component, such as a CPU or chipset, that includes one or more instruction sequencers configured to execute one or more user-level threads that contain sequencer aware user-level instructions. In one embodiment, computer system 1300 comprises a communication mechanism or bus 1311 for communicating information, and an integrated circuit component such as a main processing unit 1312 coupled with bus 1311 for processing information. One or more of the components or devices in the computer system 1300 such as the main processing unit 1312 or a chip set 1336 may use an embodiment of the instruction sequencers configured to execute one or more user-level threads. The main processing unit 1312 may consist of one or more processor cores working together as a unit.
[00116] Computer system 1300 further comprises a random access memory (RAM) or other dynamic storage device 1304 (referred to as main memory) coupled to bus 1311 for storing information and instructions to be executed by main processing unit 1312. Main memory 1304 also may be used for storing temporary variables or other intermediate information during execution of instructions by main processing unit 1312.
[00117] Firmware 1303 may be a combination of software and hardware, such as Electronically Programmable Read-Only Memory (EPROM) that has the operations for the routine recorded on the EPROM. The firmware 1303 may embed foundation code, basic input/output system code (BIOS), or other similar code. The firmware 1303 may make it possible for the computer system 1300 to boot itself.
[00118] Computer system 1300 also comprises a read-only memory (ROM) and/or other static storage device 1306 coupled to bus 1311 for storing static information and instructions for main processing unit 1312. The static storage device 1306 may store OS level and application level software.
[00119] Computer system 1300 may further be coupled to a display device 1321 , such as a cathode ray tube (CRT) or liquid crystal display (LCD), coupled to bus 1311 for displaying information to a computer user. A chipset may interface with the display device 1321.
[00120] An alphanumeric input device (keyboard) 1322, including alphanumeric and other keys, may also be coupled to bus 1311 for communicating information and command selections to main processing unit 1312. An additional user input device is cursor control device 1323, such as a mouse, trackball, trackpad, stylus, or cursor direction keys, coupled to bus 1311 for communicating direction information and command selections to main processing unit 1312, and for controlling cursor movement on a display device 1321. A chipset may interface with the input output devices.
[00121] Another device that may be coupled to bus 1311 is a hard copy device 1324, which may be used for printing instructions, data, or other information on a medium such as paper, film, or similar types of media. Furthermore, a sound recording and playback device, such as a speaker and/or microphone (not shown) may optionally be coupled to bus 1311 for audio interfacing with computer system 1300. Another device that may be coupled to bus 1311 is a wired/wireless communication capability 1325.
[00122] In one embodiment, the software used to facilitate the routine can be embedded onto a machine-readable medium. A machine-readable medium includes any mechanism that provides (i.e., stores and/or transmits) information in a form accessible by a machine (e.g., a computer, network device, personal digital assistant, manufacturing tool, any device with a set of one or more processors, etc.). For example, a machine-readable medium includes recordable/non- recordable media (e.g., read only memory (ROM) including firmware; random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; etc.), as well as electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.); etc.
[00123] During development, a design may go through various stages, from creation to simulation to fabrication. Data representing a design may represent the design in a number of manners. First, as is useful in simulations, the hardware may be represented using a hardware description language or functional description language. Additionally, a circuit-level model with logic/or transistor gates may be produced at some stages of the design process. Furthermore, most designs, at some stage, reach a level of data representing the physical placement of various devices in the hardware model. In the case where conventional semiconductor fabrication techniques are used, the data representing the hardware model may be the data specifying the presence or absence of various features on different mask layers for masks used to produce the integrated circuit. In any representation of the design, the data may be stored in any form of a machine-readable medium. Any optical or electrical wave modulated or otherwise generated to transform such information, a memory, or a magnetic or optical storage such as a disc may be the machine-readable medium. Any of these mediums may "carry" or "indicate" the design or software information. When an electrical carrier wave indicating or carrying the code or design is transmitted, to the extent that copying, buffering or retransmission of the electrical signal is performed, a new copy is made. Thus, a communication provider or a network provider may make copies of an article (carrier wave) embodying techniques of the present invention.
[00124] While certain exemplary embodiments have been described and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative and not restrictive of the broad invention and that this invention is not limited to the specific constructions and arrangements shown and described, since various other modifications may occur to those ordinarily skilled in the art upon studying this disclosure. In an area of technology such as this, where growth is fast and further advancements are not easily foreseen, the disclosed embodiments may be readily modifiable in arrangement and detail as facilitated by enabling technological advancements without departing from the principals of the present disclosure or the scope of the accompanying claims.

Claims

1. A method, comprising: managing user-level threads on a first instruction sequencer in response to executing user-level instructions on a second instruction sequencer that is under control of an application level program; and running a first user-level thread that contains one or more user-level instructions on the second instruction sequencer, wherein a first user level instruction has at least one of 1 ) a field that makes reference to one or more instruction sequencers and 2) implicitly references with a pointer to code that specifically addresses one or more instruction sequencers when the code is executed.
2. The method of claim 1 , wherein managing the user-level threads includes performing sequencer-aware state and control transfer operations for user-level thread operations selected from a group consisting of a user-level thread creation operation, a user-level thread control operation, and a user-level thread synchronization operation.
3. The method of claim 1 , further comprising: executing a user-level control-transfer instruction on a source instruction sequencer, where the user-level control-transfer instruction specifies a control message, and a destination instruction sequencer; and responsive to executing the user-level control-transfer instruction, the source instruction sequencer to send a signal that includes the control message to the destination instruction sequencer.
4. The method of claim 1 , further comprising: executing a user-level monitoring instruction on a source instruction sequencer, where the user-level monitoring instruction specifies a destination instruction sequencer, a control message, and a location of handler-code associated with the control message to perform a user-level thread operation; and responsive to executing the user-level monitoring instruction, creating a mapping between the destination instruction sequencer, the control message, and the location of the handler-code.
5. The method of claim 1 , further comprising: executing a user-level save instruction on the first instruction sequencer that specifies one or more other instruction sequencers and causes execution contexts of the one or more other instruction sequencers to be saved in response to executing the user-level save instruction.
6. The method of claim 1 , further comprising: executing a user-level restore instruction on the first instruction sequencer that specifies one or more other instruction sequencers whose execution context are to be restored when the user-level instruction is executed.
7. The method of claim 1 , further comprising: migrating an execution of instructions from the second instruction sequencer to execute a portion of those instructions on the first instruction sequencer upon encountering a predefined condition during execution of the first user-level thread.
8. The method of claim 7, wherein the predefined condition is a detection of an asymmetric condition between the second instruction sequencer that is under the control of the application level program and the first instruction sequencer.
9. The method of claim 8, wherein the asymmetric condition is selected from a group consisting of a fault encountered that requires an operating system (OS) to perform an OS operation to resolve the fault, a trap encountered that requires an operating system (OS) to perform an OS operation to resolve the trap, a system call on the instruction sequencer that is under the control of the application level program yet is incapable of directly activating OS service, or a deprecated operation fault in which the instruction sequencer that is under the control of the application level program lacks built-in resources to support execution of a first instruction from the first user-level thread.
10. The method of claim 1, further comprising: transferring control and state information from an OS sequestered instruction sequencer to an OS-visible instruction sequencer; and migrating an execution of at least one instruction from the first user-level thread on the OS sequestered instruction sequencer to the OS-visible instruction sequencer so that the OS-visible instruction sequencer may trigger an operating system to perform an OS service on behalf of the OS sequestered instruction sequencer.
11. The method of claim 1 , further comprising: suspending execution of the first user-level thread in the second instruction sequencer that is under the control of the application level program; transferring an address pointer from the second instruction sequencer to an OS-visible instruction sequencer, where the address pointer points to content stored in a memory; loading the content at the address pointer with the OS-visible instruction sequencer; and resuming execution of the first user-level thread in the second instruction sequencer after the contents at the address pointer have been loaded.
12. An apparatus, comprising: a processor including one or more instruction sequencers configured to execute a user-level thread that contains sequencer aware user-level instructions, which allow for inter sequencer control by a user-level thread management operation on a specified instruction sequencer; one or more decoders to decode a first sequencer-aware user-level instruction; and one or more instruction execution units to execute the first sequencer aware user level instruction.
13. The apparatus of claim 12, further comprising: a first instruction sequencer of the having a first decoder to decode the first sequencer-aware user-level instruction that specifies a second instruction sequencer.
14. The apparatus of claim 12, further comprising: a first instruction sequencer having an instruction execution unit to execute the first sequencer aware user level instruction, which when executed implicitly references a second instruction sequencer through execution of associated code.
15. The apparatus of claim 12, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a control-transfer instruction that has one or more fields, which specify a control message and a destination instruction sequencer.
16. The apparatus of claim 12, further comprising: a first instruction execution unit to execute a first sequencer aware user- level instruction, wherein the first sequencer aware user-level instruction comprises a control-transfer instruction that contains a data payload portion to semantically make reference to a destination instruction sequencer when executed by the first instruction execution unit.
17. The apparatus of claim 12, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a monitoring instruction that has one or more fields that specify a destination instruction sequencer, a control message, and a location of handler-code associated with a control message to perform the user-level thread management operation.
18. The apparatus of claim 12, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a save instruction that has one or more fields that specify at least one of the instruction sequencers, whose context state is to be saved responsive to executing the save instruction.
19. The apparatus of claim 12, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a restore instruction that has one or more fields that specify at least one of the instruction sequencers, whose execution context is to be restored.
20. The apparatus of claim 12, wherein the user-level thread management operation is selected from a group consisting of a user-level thread creation operation, a user-level thread control operation, and a user-level thread synchronization operation.
21. The apparatus of claim 12, further comprising: a client instruction sequencer having a set of client resources to process instructions; a servant instruction sequencer having a set of servant resources to process instructions; and a proxy execution mechanism to allow the client instruction sequencer to trigger, responsive to a predefined condition detected during the execution of a first user-level thread on the client sequencer and without intervention of an operating system, a proxy user-level thread to execute on the servant instruction sequencer on behalf of the client instruction sequencer.
22. The apparatus of claim 21, wherein the client resources are asymmetric with respect to the servant resources, and the predefined condition indicates the first user-level thread is attempting to use a resource that is not available on the client sequencer but is available on the servant sequencer.
23. The apparatus of claim 22, wherein the proxy execution mechanism masks the asymmetry between the client and servant resources from a user-level program.
24. The apparatus of claim 21 , wherein the proxy execution mechanism comprises a set of egress scenarios associated with the client instruction sequencer, each egress scenario defining a trigger condition to initiate the proxy execution on the servant instruction sequencer.
25. The apparatus of claim 12, further comprising: a client instruction sequencer having a set of client resources to process instructions; a servant instruction sequencer having a set of servant resources to process instructions; and a proxy execution mechanism to allow the client instruction sequencer to trigger, responsive to a predefined condition detected during the execution of a first user-level thread, transfer of control and state information from the client instruction sequencer to the servant instruction sequencer, wherein the client instruction sequencer to migrate an execution of at least one instruction from the first user-level thread to the servant instruction sequencer so that the servant instruction sequencer may trigger an operating system to perform an OS operation on behalf of the client instruction sequencer.
26. The apparatus of claim 12, further comprising: a client instruction sequencer having a set of client resources to process instructions.
27. The apparatus of claim 26, further comprising: a servant instruction sequencer having a set of servant resources to process instructions.
28. The apparatus of claim 27, further comprising: a proxy execution mechanism to allow the client instruction sequencer to trigger, responsive to an asymmetric condition detected during the execution of a first user-level thread, transfer of an address pointer from the client instruction sequencer to the servant instruction sequencer, wherein the servant instruction sequencer to load content at the address pointer and the client instruction sequencer to execute instructions from the first user-level thread after the contents at the address pointer have been loaded.
29. A system, comprising: a processor including two or more instruction sequencers to execute different user-level threads, wherein at least some of the two or more instruction sequencers include sequencer-aware user-level instructions in their instruction sets that allow for inter sequencer control by a user-level thread management operation on a specified instruction sequencer; a first instruction sequencer to operate under the control of an application level program when executing the sequencer aware user level instructions; a second instruction sequencer to operate under the control of an operating system; and a non-volatile storage device, coupled to the processor, to store therein the operating system.
30. The system of claim 29, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a control-transfer instruction that has one or more fields, which specify a control message and a destination instruction sequencer, and a first decoder to translate contents in the fields into decoded instruction code.
31. The system of claim 29, further comprising: a first instruction execution unit to execute a first sequencer aware user- level instruction, wherein the first sequencer aware user-level instruction comprises a control-transfer instruction that contains a data payload portion to semantically make reference to a destination instruction sequencer when executed by the first instruction execution unit.
32. The system of claim 29, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a monitoring instruction that has one or more fields that specify a destination instruction sequencer, a control message, and a location of handler-code associated with a control message to perform the user-level thread management operation.
33. The system of claim 29, further comprising: a first decoder to translate content in fields of a first sequencer aware user- level instruction into decoded instruction code, wherein the first sequencer aware user-level instruction comprises a save instruction that has one or more fields that specify at least one of the instruction sequencers, whose context state is to be saved responsive to executing the save instruction.
34. The system of claim 29, further comprising: a first instruction execution unit to execute a first sequencer aware user- level instruction, wherein the first sequencer aware user-level instruction comprises a restore instruction that has one or more fields that specify at least one of the instruction sequencers, whose execution context is to be restored.
35. The system of claim 29, further comprising: a first execution unit to execute a first sequencer aware user-level instruction; and a proxy execution mechanism to allow the first instruction sequencer to trigger a first user-level thread to execute on the second instruction sequencer on behalf of the first instruction sequencer in responsive to the execution of the first sequencer aware user-level instruction.
36. The system of claim 29, further comprising: a proxy execution mechanism to allow the first instruction sequencer to trigger, responsive to a predefined condition detected during the execution of a first user-level thread, transfer of control and state information from the first instruction sequencer to the second instruction sequencer, wherein the first instruction sequencer to migrate an execution of at least one instruction from the first user- level thread to the second instruction sequencer so that the second instruction sequencer may trigger an operating system to perform an operating system operation on behalf of the first instruction sequencer.
37. The system of claim 29, further comprising: a proxy execution mechanism to allow the first instruction sequencer to trigger, responsive to a predefined condition detected during the execution of a first user-level thread, transfer of an address pointer from the first instruction sequencer to the second instruction sequencer, wherein the second instruction sequencer to load content at the address pointer and the first instruction sequencer to execute instructions from the first user-level thread after the content at the address pointer have been loaded.
PCT/US2005/047328 2004-12-30 2005-12-28 A mechanism for instruction set based thread execution on a plurality of instruction sequencers WO2006074024A2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2007549602A JP5260962B2 (en) 2004-12-30 2005-12-28 A mechanism for instruction set based on thread execution in multiple instruction sequencers
DE112005003343T DE112005003343B4 (en) 2004-12-30 2005-12-28 Mechanism for instruction set-based thread execution on multiple command schedules
CN2005800448962A CN101116057B (en) 2004-12-30 2005-12-28 A mechanism for instruction set based thread execution on a plurality of instruction sequencers

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US64042504P 2004-12-30 2004-12-30
US60/640,425 2004-12-30
US11/173,326 US8719819B2 (en) 2005-06-30 2005-06-30 Mechanism for instruction set based thread execution on a plurality of instruction sequencers
US11/173,326 2005-06-30

Publications (2)

Publication Number Publication Date
WO2006074024A2 true WO2006074024A2 (en) 2006-07-13
WO2006074024A3 WO2006074024A3 (en) 2006-10-26

Family

ID=36579277

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2005/047328 WO2006074024A2 (en) 2004-12-30 2005-12-28 A mechanism for instruction set based thread execution on a plurality of instruction sequencers

Country Status (4)

Country Link
JP (2) JP5260962B2 (en)
CN (1) CN101116057B (en)
DE (1) DE112005003343B4 (en)
WO (1) WO2006074024A2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007067562A2 (en) * 2005-12-06 2007-06-14 Boston Circuits, Inc. Methods and apparatus for multi-core processing with dedicated thread management
JP2009104259A (en) * 2007-10-19 2009-05-14 Intel Corp Method and system for extending a plurality of command streams/a plurality of data streams on microprocessor
TWI470418B (en) * 2011-12-22 2015-01-21 Intel Corp An asymmetric performance multicore architecture with same instruction set architecture (isa)
WO2015066412A1 (en) * 2013-11-01 2015-05-07 Qualcomm Incorporated Efficient hardware dispatching of concurrent functions in multicore processors, and related processor systems, methods, and computer-readable media
US9446143B2 (en) 2007-08-31 2016-09-20 Altimmune Uk Limited Influenza antigen delivery vectors and constructs
US11066353B2 (en) 2004-04-13 2021-07-20 Altimmune Uk Ltd Antigen delivery vectors and constructs
WO2022040877A1 (en) * 2020-08-24 2022-03-03 华为技术有限公司 Graph instruction processing method and device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2950714B1 (en) * 2009-09-25 2011-11-18 Bull Sas SYSTEM AND METHOD FOR MANAGING THE INTERLEAVED EXECUTION OF INSTRUCTION WIRES
WO2013015823A1 (en) * 2011-07-27 2013-01-31 Cypress Semiconductor Corporation Method and apparatus for parallel scanning and data processing for touch sense arrays
WO2013095630A1 (en) * 2011-12-23 2013-06-27 Intel Corporation Apparatus and method of improved extract instructions background
US10102028B2 (en) 2013-03-12 2018-10-16 Sas Institute Inc. Delivery acknowledgment in event stream processing
US9122651B1 (en) * 2014-06-06 2015-09-01 Sas Institute Inc. Computer system to support failover in an event stream processing system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6389446B1 (en) * 1996-07-12 2002-05-14 Nec Corporation Multi-processor system executing a plurality of threads simultaneously and an execution method therefor
US20020199179A1 (en) * 2001-06-21 2002-12-26 Lavery Daniel M. Method and apparatus for compiler-generated triggering of auxiliary codes
US6651163B1 (en) * 2000-03-08 2003-11-18 Advanced Micro Devices, Inc. Exception handling with reduced overhead in a multithreaded multiprocessing system
US20040163083A1 (en) * 2003-02-19 2004-08-19 Hong Wang Programmable event driven yield mechanism which may activate other threads

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4651790B2 (en) * 2000-08-29 2011-03-16 株式会社ガイア・システム・ソリューション Data processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6389446B1 (en) * 1996-07-12 2002-05-14 Nec Corporation Multi-processor system executing a plurality of threads simultaneously and an execution method therefor
US6651163B1 (en) * 2000-03-08 2003-11-18 Advanced Micro Devices, Inc. Exception handling with reduced overhead in a multithreaded multiprocessing system
US20020199179A1 (en) * 2001-06-21 2002-12-26 Lavery Daniel M. Method and apparatus for compiler-generated triggering of auxiliary codes
US20040163083A1 (en) * 2003-02-19 2004-08-19 Hong Wang Programmable event driven yield mechanism which may activate other threads

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KUMAR R ET AL: "Single-ISA heterogeneous multi-core architectures for multithreaded workload performance" COMPUTER ARCHITECTURE, 2004. PROCEEDINGS. 31ST ANNUAL INTERNATIONAL SYMPOSIUM ON MUNCHEN, GERMANY JUNE 19-23, 2004, PISCATAWAY, NJ, USA,IEEE, 19 June 2004 (2004-06-19), pages 64-75, XP010769392 ISBN: 0-7695-2143-6 *
TU J-F ET AL: "SMTA: next-generation high-performance multi-threaded processor" IEE PROCEEDINGS E. COMPUTERS & DIGITAL TECHNIQUES, INSTITUTION OF ELECTRICAL ENGINEERS. STEVENAGE, GB, vol. 149, no. 5, 27 September 2002 (2002-09-27), pages 213-218, XP006018769 ISSN: 0143-7062 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11066353B2 (en) 2004-04-13 2021-07-20 Altimmune Uk Ltd Antigen delivery vectors and constructs
WO2007067562A2 (en) * 2005-12-06 2007-06-14 Boston Circuits, Inc. Methods and apparatus for multi-core processing with dedicated thread management
WO2007067562A3 (en) * 2005-12-06 2007-10-25 Boston Circuits Inc Methods and apparatus for multi-core processing with dedicated thread management
US9446143B2 (en) 2007-08-31 2016-09-20 Altimmune Uk Limited Influenza antigen delivery vectors and constructs
US10155049B2 (en) 2007-08-31 2018-12-18 Altimmune UK, LTD Influenza antigen delivery vectors and constructs
JP2009104259A (en) * 2007-10-19 2009-05-14 Intel Corp Method and system for extending a plurality of command streams/a plurality of data streams on microprocessor
TWI470418B (en) * 2011-12-22 2015-01-21 Intel Corp An asymmetric performance multicore architecture with same instruction set architecture (isa)
WO2015066412A1 (en) * 2013-11-01 2015-05-07 Qualcomm Incorporated Efficient hardware dispatching of concurrent functions in multicore processors, and related processor systems, methods, and computer-readable media
WO2022040877A1 (en) * 2020-08-24 2022-03-03 华为技术有限公司 Graph instruction processing method and device

Also Published As

Publication number Publication date
WO2006074024A3 (en) 2006-10-26
JP2008527501A (en) 2008-07-24
CN101116057B (en) 2011-10-05
JP2011023032A (en) 2011-02-03
DE112005003343B4 (en) 2011-05-19
DE112005003343T5 (en) 2007-11-29
JP5260962B2 (en) 2013-08-14
CN101116057A (en) 2008-01-30
JP5244160B2 (en) 2013-07-24

Similar Documents

Publication Publication Date Title
US10452403B2 (en) Mechanism for instruction set based thread execution on a plurality of instruction sequencers
US8887174B2 (en) Mechanism for monitoring instruction set based thread execution on a plurality of instruction sequencers
JP5244160B2 (en) A mechanism for instruction set based on thread execution in multiple instruction sequencers
US9069605B2 (en) Mechanism to schedule threads on OS-sequestered sequencers without operating system intervention
JP6240964B2 (en) Apparatus, method, and system
EP1658563B1 (en) Apparatus, and method for initiation of concurrent instruction streams in a multithreading microprocessor
US8079035B2 (en) Data structure and management techniques for local user-level thread data
US8516483B2 (en) Transparent support for operating system services for a sequestered sequencer
US20030086300A1 (en) FPGA coprocessing system
US20040216120A1 (en) Method and logical apparatus for rename register reallocation in a simultaneous multi-threaded (SMT) processor
US20070124736A1 (en) Acceleration threads on idle OS-visible thread execution units
JP2018509687A (en) Processor, method, system, and instructions for user level branching and combining
JP2017515202A (en) Method, system, and computer program for exiting multiple threads in a computer
WO2005022384A1 (en) Apparatus, method, and instruction for initiation of concurrent instruction streams in a multithreading microprocessor
US8869172B2 (en) Method and system method and system for exception-less system calls for event driven programs
WO2024138235A2 (en) Backward-compatible heterogeneous multi-core processor
JP2000276372A (en) Processor

Legal Events

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

Ref document number: 200580044896.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2007549602

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 1120050033430

Country of ref document: DE

RET De translation (de og part 6b)

Ref document number: 112005003343

Country of ref document: DE

Date of ref document: 20071129

Kind code of ref document: P

122 Ep: pct application non-entry in european phase

Ref document number: 05855823

Country of ref document: EP

Kind code of ref document: A2

REG Reference to national code

Ref country code: DE

Ref legal event code: 8607