US20030188141A1 - Time-multiplexed speculative multi-threading to support single-threaded applications - Google Patents
Time-multiplexed speculative multi-threading to support single-threaded applications Download PDFInfo
- Publication number
- US20030188141A1 US20030188141A1 US10/365,313 US36531303A US2003188141A1 US 20030188141 A1 US20030188141 A1 US 20030188141A1 US 36531303 A US36531303 A US 36531303A US 2003188141 A1 US2003188141 A1 US 2003188141A1
- Authority
- US
- United States
- Prior art keywords
- memory element
- thread
- space
- speculative
- version
- Prior art date
- Legal status (The legal status 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 status listed.)
- Abandoned
Links
- 238000000034 method Methods 0.000 claims description 79
- 230000008901 benefit Effects 0.000 description 3
- 239000013598 vector Substances 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3824—Operand accessing
- G06F9/383—Operand prefetching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
- G06F9/3842—Speculative instruction execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
- G06F9/3851—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
Definitions
- the present invention relates to techniques for improving computer system performance. More specifically, the present invention relates to a method and apparatus that supports interleaved execution of a non-speculative thread and related speculative threads within a single processor pipeline.
- This interleaving technique relaxes latency requirements, which makes it significantly easier to design a high-speed processor pipeline. For example, if four unrelated threads are interleaved, a data cache access (or an addition operation) can take up to four pipeline stages without adversely affecting the performance of a given thread.
- Interleaving the execution of multiple threads within a single pipeline has a number of advantages. It saves power and area in comparison to executing the threads in separate pipelines. It also provides a large aggregate throughput for the single pipeline.
- One embodiment of the present invention provides a system that facilitates interleaved execution of a head thread and a speculative thread within a single processor pipeline.
- the system operates by executing program instructions using the head thread, and by speculatively executing program instructions in advance of the head thread using the speculative thread, wherein the head thread and the speculative thread execute concurrently through time-multiplexed interleaving in the single processor pipeline.
- the speculative thread includes one or more speculative threads.
- the system performs a join operation between the head thread and the speculative thread when the head thread reaches a point in the program where the speculative thread began executing.
- the head thread operates on primary versions of memory elements
- the speculative thread operates on space-time dimensioned versions of the memory elements (as is done in U.S. Pat. No. 6,353,881, entitled “Supporting Space-Time Dimensional Program Execution by Selectively Versioning Memory Updates” by the same inventors as the instant application).
- performing the join operation involves merging the space-time dimensioned versions of the memory elements into the primary versions of the memory elements, so that updates to the space-time dimensioned versions of the memory elements are incorporated into corresponding primary versions of memory elements.
- the system determines if the space-time dimensioned version of the memory element exists. If so, the system reads the space-time dimensioned version of the memory element. If not, the system reads the primary version of the memory element. The system also updates status information associated with the memory element to indicate the memory element has been read by the speculative thread.
- the system determines if the space-time dimensioned version of the memory element exists. If not, the system creates the space-time dimensioned version of the memory element, and performs the write operation to the space-time dimensioned version of the memory element.
- the system performs the read operation to the primary version of the memory element.
- the system performs the write operation to the primary version of the memory element.
- the system also checks status information associated with the memory element to determine if the memory element has been read by the speculative thread. If so, the system causes the speculative thread to roll back, so that the speculative thread can read a result of the write operation. If not, the system performs the write operation to the space-time dimensioned version of the memory element, if the space-time dimensioned version exists.
- the memory elements include objects defined within an object-oriented programming system.
- the head thread and the speculative thread access separate hardware register files.
- FIG. 1 illustrates a computer system in accordance with an embodiment of the present invention.
- FIG. 2A illustrates sequential execution of methods by a single thread.
- FIG. 2B illustrates space and time dimensional execution of a method in accordance with an embodiment of the present invention.
- FIG. 3 illustrates the state of the system stack during space and time dimensional execution of a method in accordance with an embodiment of the present invention.
- FIG. 4 illustrates how memory is partitioned between stack and heap in accordance with an embodiment of the present invention.
- FIG. 5 illustrates the structure of a primary version and a space-time dimensioned version of an object in accordance with an embodiment of the present invention.
- FIG. 6 illustrates the structure of a status word for an object in accordance with an embodiment of the present invention.
- FIG. 7 presents a flow chart illustrating operations involved in performing a write to a memory element by a head thread in accordance with an embodiment of the present invention.
- FIG. 8 presents a flow chart illustrating operations involved in performing a read to a memory element by a speculative thread in accordance with an embodiment of the present invention.
- FIG. 9 presents a flow chart illustrating operations involved in performing a write to a memory element by a speculative thread in accordance with an embodiment of the present invention.
- FIG. 10 presents a flow chart illustrating operations involved in performing a join between a head thread and a speculative thread in accordance with an embodiment of the present invention.
- FIG. 11 presents a flow chart illustrating operations involved in performing a join between a head thread and a speculative thread in accordance with another embodiment of the present invention.
- FIG. 12 presents a flow chart illustrating interleaved execution of a head thread and related speculative threads in accordance with an embodiment of the present invention.
- a computer readable storage medium which may be any device or medium that can store code and/or data for use by a computer system.
- the transmission medium may include a communications network, such as the Internet.
- FIG. 1 illustrates a computer system in accordance with an embodiment of the present invention.
- silicon die 100 contains at least one central processing unit (CPU) 102 .
- CPU 102 can generally include any type of computational devices that allow multiple threads to execute concurrently.
- CPU 102 includes instruction cache 112 , containing instructions to be executed by CPU 102 , and data cache 106 , containing data to be operated on by CPU 102 .
- data cache 106 is a 64K-byte 4-way set-associative data cache with 64-byte cache lines.
- Data cache 106 and instruction cache 112 are coupled to level-two cache (L2) cache, which is coupled to memory controller 111 .
- Memory controller 111 is coupled to dynamic random access memory (DRAM) 108 , which is located off chip.
- DRAM dynamic random access memory
- Instruction cache 112 feeds instructions into four separate instruction queues 114 - 117 , which are associated with four separate threads of execution. Instructions from queues 114 - 117 feed through multiplexer 109 , which interleaves instructions from instruction queues 114 - 117 in round-robin fashion before they feed into execution pipeline 107 . As illustrated in FIG. 1, instructions from a given instruction queue occupy every fourth instruction slot in execution pipeline 107 . Note that other implementations of processor 102 can possibly interleave instructions from more than four queues, or alternatively, less than four queues.
- this interleaving is “static,” which means that each instruction queue is associated with every fourth instruction slot in execution pipeline 107 , and this association is does not change dynamically over time.
- Instruction queues 114 - 117 are associated with corresponding register files 118 - 121 , respectively, which contain operands that are manipulated by instructions from instruction queues 114 - 117 .
- instructions in execution pipeline 107 can cause data to be transferred between data cache 106 and register files 118 - 119 .
- register files 118 - 121 are consolidated into a single large multi-ported register file that is partitioned between the separate threads associated with instruction queues 114 - 117 .
- the present invention generally applies to any computer system that supports concurrent interleaved execution of multiple threads in a single pipeline and is not meant to be limited to the illustrated computing system.
- the present invention is not meant to be limited to the fixed interleaving round-robin scheduling scheme described above, but can generally be applied to any time-multiplexed scheduling scheme that interleaves instructions from the instruction queues.
- FIG. 2A illustrates sequential execution of methods in a conventional computer system by a single head thread 202 .
- head thread 202 executes a number of methods in sequence, including method A 204 , method B 206 and method C 208 .
- FIG. 2B illustrates space and time dimensional execution of a method in accordance with an embodiment of the present invention.
- head thread 202 first executes method A 204 and then executes method B 206 .
- method B 206 returns a void or some other value that is not used by method C 208 .
- method C 208 uses a value returned by method B 206
- method C 208 uses a predicted return value from method B 206 .
- speculative thread 203 executes method C 208 in a separate space-time dimension of the heap. If head thread 202 successfully executes method B 206 , speculative thread 203 is joined with head thread 202 . This join operation involves causing state associated with the speculative thread 203 to be merged with state associated with the head thread 202 and the collapsing of the space-time dimensions of the heap.
- speculative thread 203 If speculative thread 203 for some reason encounters problems in executing method C 208 , speculative thread 203 performs a rollback operation. This rollback operation allows speculative thread 203 to reattempt to execute method C 208 .
- head thread 202 can execute method C 208 non-speculatively and speculative thread 203 can execute a subsequent method.
- speculative thread 203 may encounter problems in executing method C 208 .
- One problem occurs when head thread 202 executing method B 206 writes a value to a memory element (object) after speculative thread 203 has read the same memory element. The same memory element can be read when the two space-time dimensions of the heap are collapsed at this memory element at the time of the read by speculative thread 203 .
- speculative thread 203 should have read the value written by head thread 202 , but instead has read a previous value. In this case, the system causes speculative thread 203 to roll back so that speculative thread 203 can read the value written by head thread 202 .
- memory element generally refers to any unit of memory that can be accessed by a computer program.
- memory element may refer to a bit, a byte or a word memory, as well as a data structure or an object defined within an object-oriented programming system.
- FIG. 3 illustrates the state of the system stack during space and time dimensional execution of a method in accordance with an embodiment of the present invention. Note that since programming languages such as the Java programming language do not allow a method to modify the stack frame of another method, the system stack will generally be the same before method B 206 is executed as it is before method C 208 is executed. (This is not quite true if method B 206 returns a parameter through the system stack. However, return parameters are can be explicitly dealt with as is described below.) Referring the FIG. 3, stack 300 contains method A frame 302 while method A 204 is executing. When method A 204 returns, method B 206 commences and method A frame 302 is replaced by method B frame 304 .
- method B 206 returns, method C 208 commences and method B frame 304 is replaced by method C frame 306 .
- stack 300 is the same immediately before method B 206 executed as it is immediately before method C 208 is executed, it is possible to execute method C 208 using a copy of stack 300 without first executing method B 206 .
- Java byte codes are said to be “platform-independent,” because they can be executed across a wide range of computing platforms, so long as the computing platforms provide a Java virtual machine.
- a Java byte code can be executed on a specific computing platform by using an interpreter or a just in time (JIT) compiler to translate the Java bytecode into machine code for the specific computing platform.
- JIT just in time
- a Java byte code can be executed directly on a Java bytecode engine running on the specific computing platform.
- Java bytecode contains more syntactic information than conventional machine code.
- the Java bytecodes differentiate between accesses to local variables in the system stack and accesses to the system heap.
- programs written in the Java programming language do not allow conversion between primitive and reference types. Such conversion can make it hard to differentiate accesses to the system stack from accesses to the system heap at compile time.
- FIG. 4 illustrates how memory is partitioned between stack and heap in accordance with an embodiment of the present invention.
- memory 400 is divided into a number of regions including heap 402 , stacks for threads 404 and speculative heap 406 .
- Heap 402 comprises a region of memory from which objects are allocated.
- Heap 402 is further divided into younger generation region 408 and older generation region 410 for garbage collection purposes.
- garbage collectors typically treat younger generation objects differently from older generation objects.
- Stacks for threads 404 comprise a region of memory from which stacks for various threads are allocated.
- Speculative heap 406 contains the space-time dimensioned values of all memory elements where the two space-time dimensions of the heap are not collapsed.
- objects created by speculative thread 203 can be treated as belonging to a generation that is younger than objects within younger generation region 408 .
- FIG. 5 illustrates the structure of a primary version of object 500 and a space-time dimensioned version of object 510 in accordance with an embodiment of the present invention.
- Primary version of object 500 is referenced by object reference pointer 501 .
- primary version of object 500 includes data region 508 , which includes one or more fields containing data associated with primary version of object 500 .
- Primary version of object 500 also includes method vector table pointer 506 .
- Method vector table pointer 506 points to a table containing vectors that point to the methods that can be invoked on primary version of object 500 .
- Primary version of object 500 also includes space-time dimensioned version pointer 502 , which points to space-time dimensioned version of object 510 , if the two space-time dimensions are not collapsed at this object. Note that in the illustrated embodiment of the present invention, space-time dimensioned version 510 is always referenced indirectly through space-time dimensioned version pointer 502 .
- Primary version of object 500 additionally includes status word 504 , which contains status information specifying which fields from data region 508 have been written to or read by speculative thread 203 .
- Space-time dimensioned version of object 510 includes only data region 518 .
- FIG. 6 illustrates the structure of status word 504 in accordance with an embodiment of the present invention.
- status word 504 includes checkpoint number 602 and speculative bits 603 .
- Speculative bits 603 includes read bits 604 and write bits 606 .
- checkpoint number 602 is updated with the current time of the system. The current time in the time dimension of the system is advanced discretely at a join or a rollback. This allows checkpoint number 602 to be used as a qualifier for speculative bits 603 . If checkpoint number 602 is less than the current time, speculative bits 603 can be interpreted as reset.
- Read bits 604 keep track of which fields within data region 508 have been read since the last join or rollback.
- write bits 606 keep track of which fields within data region 508 have been written since the last join or rollback.
- read bits 604 includes one bit for each field within data region 508 .
- read bits includes fewer bits than the number of fields within data region 508 .
- each bit within read bits 604 corresponds to more than one field in data region 508 . For example, if there are eight read bits, each bit corresponds to every eighth field.
- Write bits 606 similarly can correspond to one or multiple fields within data region 508 .
- Space-time dimensioning occurs during selected memory updates. For local variable and operand accesses to the system stack, no space-time dimensioned versions exist and nothing special happens. During read operations by head thread 202 to objects in the heap 402 , again nothing special happens.
- FIG. 7 presents a flow chart illustrating operations involved in a write operation to an object by a head thread 202 in accordance with an embodiment of the present invention.
- the system writes to the primary version of object 500 and the space-time dimensioned version of object 510 if the two space-time dimensions are not collapsed at this point (step 702 ).
- the system checks status word 504 within primary version of object 500 to determine whether a rollback is required (step 704 ).
- a rollback is required if speculative thread 203 previously read the data element. The same memory element can be read when the two space-time dimensions of the heap are collapsed at this memory element at the time of the read by speculative thread 203 .
- a rollback is also required if speculative thread 203 previously wrote to the object and thus ensured that the two dimensions of the object are not collapsed at this element, and if the current write operation updates both primary version of object 500 and space-time dimensioned version of object 510 .
- the system causes speculative thread 203 to perform a rollback operation (step 706 ).
- This rollback operation allows speculative thread 203 to read from (or write to) the object after head thread 202 writes to the object.
- the system performs writes to both primary version 500 and space-time dimensioned version 510 .
- the system first checks to determine if speculative thread 203 previously wrote to space-time dimensioned version 510 . If not, the system writes to both primary version 500 and space-time dimensioned version 510 . If so, the system only writes to primary version 500 .
- FIG. 8 presents a flow chart illustrating operations involved in a read operation to an object by speculative thread 203 in accordance with an embodiment of the present invention.
- the system sets a status bit in status word 504 within primary version of object 500 to indicate that primary version 500 has been read (step 802 ).
- Speculative thread 203 then reads space-time dimensioned version 510 , if it exists. Otherwise, speculative thread 203 reads primary version 500 .
- FIG. 9 presents a flow chart illustrating operations involved in a write operation to a memory element by speculative thread 203 in accordance with an embodiment of the present invention.
- a space-time dimensioned version 510 does not exist, the system creates a space-time dimensioned version 510 in speculative heap 406 (step 902 ).
- the system also updates status word 504 to indicate that speculative thread 203 has written to the object if such updating is necessary (step 903 ).
- the system next writes to space-time dimensioned version 510 (step 904 ).
- Such updating is necessary if head thread 202 must subsequently choose between writing to both primary version 500 and space-time dimensioned version 510 , or writing only to primary version 500 as is described above with reference to FIG. 7.
- FIG. 10 presents a flow chart illustrating operations involved in a join operation between head thread 202 and a speculative thread 203 in accordance with an embodiment of the present invention.
- a join operation occurs for example when head thread 202 reaches a point in the program where speculative thread 203 began executing.
- the join operation causes state associated with the speculative thread 203 to be merged with state associated with the head thread 202 .
- This involves copying and/or merging the stack of speculative thread 203 into the stack of head thread 202 (step 1002 ). It also involves merging space-time dimension and primary versions of objects (step 1004 ) as well as possibly garbage collecting speculative heap 406 (step 1006 ).
- one of threads 202 or 203 performs steps 1002 and 1006 , while the other thread performs step 1004 .
- FIG. 11 presents a flow chart illustrating operations involved in a join operation between head thread 202 and a speculative thread 203 in accordance with another embodiment of the present invention.
- speculative thread 203 carries on as a pseudo-head thread.
- speculative thread 203 uses indirection to reference space-time dimensioned versions of objects, but does not mark objects or create versions.
- speculative thread 203 is acting as a pseudo-head thread, head thread 202 updates primary versions of objects.
- the present invention has been described for the case of a single speculative thread, the present invention can be extended to provide multiple speculative threads operating on multiple space-time dimensioned versions of a data object in parallel.
- FIG. 12 presents a flow chart illustrating interleaved execution of a head thread and related speculative threads in accordance with an embodiment of the present invention.
- head thread 202 speculative thread 203 (and possibly other speculative threads for head thread 202 ) are executed concurrently on processor 102 .
- instructions from these threads are time-multiplexed in round-robin fashion to execute in the same instruction pipeline 107 .
- the present invention is not limited to the precise form of speculative execution described with this specification. In general, the present invention can be applied any type of speculative execution that makes use of multiple threads.
Abstract
One embodiment of the present invention provides a system that facilitates interleaved execution of a head thread and a speculative thread within a single processor pipeline. The system operates by executing program instructions using the head thread, and by speculatively executing program instructions in advance of the head thread using the speculative thread, wherein the head thread and the speculative thread execute concurrently through time-multiplexed interleaving in the single processor pipeline.
Description
- This application hereby claims priority under 35 U.S.C. §119 to U.S. Provisional Patent Application No. 60/368,935, filed on Mar. 29, 2002, entitled “Speculative Time-Multiplexed Multi-Threading for Single Threaded Applications,” by inventors Marc Tremblay and Shailender Chaudhry (Attorney Docket No. SUN-P7474PSP).
- 1. Field of the Invention
- The present invention relates to techniques for improving computer system performance. More specifically, the present invention relates to a method and apparatus that supports interleaved execution of a non-speculative thread and related speculative threads within a single processor pipeline.
- 2. Related Art
- As microprocessor clock speeds continue to increase at an exponential rate, it is becoming progressively harder to design processor pipelines to keep pace with these higher clock speeds, because less time is available at each pipeline stage to perform required computational operations. In order to deal with this problem, some designer have begun to investigate the possibility of statically interleaving the execution of unrelated processor threads in round-robin fashion within a single processor pipeline. In this way, if N unrelated threads are interleaved, instructions for a given thread only appear once for every N consecutive pipeline stages. Hence, the N threads each run at 1/Nth of the native clock rate of the processor. For example, four threads, each running at three GHz, can collectively run on a 12 GHz processor.
- This interleaving technique relaxes latency requirements, which makes it significantly easier to design a high-speed processor pipeline. For example, if four unrelated threads are interleaved, a data cache access (or an addition operation) can take up to four pipeline stages without adversely affecting the performance of a given thread.
- Interleaving the execution of multiple threads within a single pipeline has a number of advantages. It saves power and area in comparison to executing the threads in separate pipelines. It also provides a large aggregate throughput for the single pipeline.
- However, an application or benchmark that cannot be multithreaded will not benefit from this interleaving technique. This is a problem because single-threaded performance is important to a large number of customers who buy computer systems. Consequently, benchmarks that customers use to compare computer system performance generally measure single-threaded performance.
- Hence, what is needed is a method and an apparatus that provides the advantages of static time-multiplexed execution of multiple threads for a single-threaded application.
- One embodiment of the present invention provides a system that facilitates interleaved execution of a head thread and a speculative thread within a single processor pipeline. The system operates by executing program instructions using the head thread, and by speculatively executing program instructions in advance of the head thread using the speculative thread, wherein the head thread and the speculative thread execute concurrently through time-multiplexed interleaving in the single processor pipeline.
- In a variation on this embodiment, the speculative thread includes one or more speculative threads.
- In a variation on this embodiment, the system performs a join operation between the head thread and the speculative thread when the head thread reaches a point in the program where the speculative thread began executing.
- In a further variation, the head thread operates on primary versions of memory elements, and the speculative thread operates on space-time dimensioned versions of the memory elements (as is done in U.S. Pat. No. 6,353,881, entitled “Supporting Space-Time Dimensional Program Execution by Selectively Versioning Memory Updates” by the same inventors as the instant application). In this variation, performing the join operation involves merging the space-time dimensioned versions of the memory elements into the primary versions of the memory elements, so that updates to the space-time dimensioned versions of the memory elements are incorporated into corresponding primary versions of memory elements.
- In a further variation, if the speculative thread performs a read operation to a memory element, the system determines if the space-time dimensioned version of the memory element exists. If so, the system reads the space-time dimensioned version of the memory element. If not, the system reads the primary version of the memory element. The system also updates status information associated with the memory element to indicate the memory element has been read by the speculative thread.
- In a further variation, if the speculative thread performs a write operation to a memory element, the system determines if the space-time dimensioned version of the memory element exists. If not, the system creates the space-time dimensioned version of the memory element, and performs the write operation to the space-time dimensioned version of the memory element.
- In a further variation, if the head thread performs a read operation to a memory element, the system performs the read operation to the primary version of the memory element.
- In a further variation, if the head thread performs a write operation to a memory element, the system performs the write operation to the primary version of the memory element. The system also checks status information associated with the memory element to determine if the memory element has been read by the speculative thread. If so, the system causes the speculative thread to roll back, so that the speculative thread can read a result of the write operation. If not, the system performs the write operation to the space-time dimensioned version of the memory element, if the space-time dimensioned version exists.
- In a further variation, the memory elements include objects defined within an object-oriented programming system.
- In a variation on this embodiment, the head thread and the speculative thread access separate hardware register files.
- FIG. 1 illustrates a computer system in accordance with an embodiment of the present invention.
- FIG. 2A illustrates sequential execution of methods by a single thread.
- FIG. 2B illustrates space and time dimensional execution of a method in accordance with an embodiment of the present invention.
- FIG. 3 illustrates the state of the system stack during space and time dimensional execution of a method in accordance with an embodiment of the present invention.
- FIG. 4 illustrates how memory is partitioned between stack and heap in accordance with an embodiment of the present invention.
- FIG. 5 illustrates the structure of a primary version and a space-time dimensioned version of an object in accordance with an embodiment of the present invention.
- FIG. 6 illustrates the structure of a status word for an object in accordance with an embodiment of the present invention.
- FIG. 7 presents a flow chart illustrating operations involved in performing a write to a memory element by a head thread in accordance with an embodiment of the present invention.
- FIG. 8 presents a flow chart illustrating operations involved in performing a read to a memory element by a speculative thread in accordance with an embodiment of the present invention.
- FIG. 9 presents a flow chart illustrating operations involved in performing a write to a memory element by a speculative thread in accordance with an embodiment of the present invention.
- FIG. 10 presents a flow chart illustrating operations involved in performing a join between a head thread and a speculative thread in accordance with an embodiment of the present invention.
- FIG. 11 presents a flow chart illustrating operations involved in performing a join between a head thread and a speculative thread in accordance with another embodiment of the present invention.
- FIG. 12 presents a flow chart illustrating interleaved execution of a head thread and related speculative threads in accordance with an embodiment of the present invention.
- The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
- The data structures and code described in this detailed description are typically stored on a computer readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system. This includes, but is not limited to, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (compact discs) and DVDs (digital versatile discs or digital video discs), and computer instruction signals embodied in a transmission medium (with or without a carrier wave upon which the signals are modulated). For example, the transmission medium may include a communications network, such as the Internet.
- Computer System
- FIG. 1 illustrates a computer system in accordance with an embodiment of the present invention. In the embodiment illustrated in FIG. 1, silicon die100 contains at least one central processing unit (CPU) 102.
CPU 102 can generally include any type of computational devices that allow multiple threads to execute concurrently. -
CPU 102 includesinstruction cache 112, containing instructions to be executed byCPU 102, anddata cache 106, containing data to be operated on byCPU 102. In one embodiment of the present invention,data cache 106 is a 64K-byte 4-way set-associative data cache with 64-byte cache lines. -
Data cache 106 andinstruction cache 112 are coupled to level-two cache (L2) cache, which is coupled tomemory controller 111.Memory controller 111 is coupled to dynamic random access memory (DRAM) 108, which is located off chip. -
Instruction cache 112 feeds instructions into four separate instruction queues 114-117, which are associated with four separate threads of execution. Instructions from queues 114-117 feed throughmultiplexer 109, which interleaves instructions from instruction queues 114-117 in round-robin fashion before they feed intoexecution pipeline 107. As illustrated in FIG. 1, instructions from a given instruction queue occupy every fourth instruction slot inexecution pipeline 107. Note that other implementations ofprocessor 102 can possibly interleave instructions from more than four queues, or alternatively, less than four queues. - Because the pipeline slots rotate between different threads, latencies can be relaxed. For example, a load from
data cache 106 can take up to four pipeline stages or an arithmetic operation can take up to four pipeline stages, without causes a pipeline stall. In one embodiment of the present invention, this interleaving is “static,” which means that each instruction queue is associated with every fourth instruction slot inexecution pipeline 107, and this association is does not change dynamically over time. - Instruction queues114-117 are associated with corresponding register files 118-121, respectively, which contain operands that are manipulated by instructions from instruction queues 114-117. Note that instructions in
execution pipeline 107 can cause data to be transferred betweendata cache 106 and register files 118-119. (In another embodiment of the present invention, register files 118-121 are consolidated into a single large multi-ported register file that is partitioned between the separate threads associated with instruction queues 114-117.) - Note that the present invention generally applies to any computer system that supports concurrent interleaved execution of multiple threads in a single pipeline and is not meant to be limited to the illustrated computing system. For example, the present invention is not meant to be limited to the fixed interleaving round-robin scheduling scheme described above, but can generally be applied to any time-multiplexed scheduling scheme that interleaves instructions from the instruction queues.
- Space-Time Dimensional Execution of Methods
- FIG. 2A illustrates sequential execution of methods in a conventional computer system by a
single head thread 202. In executing a program,head thread 202 executes a number of methods in sequence, includingmethod A 204,method B 206 andmethod C 208. - In contrast, FIG. 2B illustrates space and time dimensional execution of a method in accordance with an embodiment of the present invention. In FIG. 2B,
head thread 202 first executesmethod A 204 and then executesmethod B 206. (For this example, assume thatmethod B 206 returns a void or some other value that is not used bymethod C 208. Alternatively, ifmethod C 208 uses a value returned bymethod B 206, assume thatmethod C 208 uses a predicted return value frommethod B 206.) - As
head thread 202 executesmethod B 206,speculative thread 203 executesmethod C 208 in a separate space-time dimension of the heap. Ifhead thread 202 successfully executesmethod B 206,speculative thread 203 is joined withhead thread 202. This join operation involves causing state associated with thespeculative thread 203 to be merged with state associated with thehead thread 202 and the collapsing of the space-time dimensions of the heap. - If
speculative thread 203 for some reason encounters problems in executingmethod C 208,speculative thread 203 performs a rollback operation. This rollback operation allowsspeculative thread 203 to reattempt to executemethod C 208. Alternatively,head thread 202 can executemethod C 208 non-speculatively andspeculative thread 203 can execute a subsequent method. - There are a number of reasons why
speculative thread 203 may encounter problems in executingmethod C 208. One problem occurs whenhead thread 202 executingmethod B 206 writes a value to a memory element (object) afterspeculative thread 203 has read the same memory element. The same memory element can be read when the two space-time dimensions of the heap are collapsed at this memory element at the time of the read byspeculative thread 203. In this case,speculative thread 203 should have read the value written byhead thread 202, but instead has read a previous value. In this case, the system causesspeculative thread 203 to roll back so thatspeculative thread 203 can read the value written byhead thread 202. - Note that the term “memory element” generally refers to any unit of memory that can be accessed by a computer program. For example, the term “memory element” may refer to a bit, a byte or a word memory, as well as a data structure or an object defined within an object-oriented programming system.
- FIG. 3 illustrates the state of the system stack during space and time dimensional execution of a method in accordance with an embodiment of the present invention. Note that since programming languages such as the Java programming language do not allow a method to modify the stack frame of another method, the system stack will generally be the same before
method B 206 is executed as it is beforemethod C 208 is executed. (This is not quite true ifmethod B 206 returns a parameter through the system stack. However, return parameters are can be explicitly dealt with as is described below.) Referring the FIG. 3, stack 300 containsmethod A frame 302 whilemethod A 204 is executing. Whenmethod A 204 returns,method B 206 commences andmethod A frame 302 is replaced bymethod B frame 304. Finally, whenmethod B 206 returns,method C 208 commences andmethod B frame 304 is replaced bymethod C frame 306. Note that sincestack 300 is the same immediately beforemethod B 206 executed as it is immediately beforemethod C 208 is executed, it is possible to executemethod C 208 using a copy ofstack 300 without first executingmethod B 206. - In order to undo the results of speculatively executed operations, updates to memory need to be versioned. The overhead involved in versioning all updates to memory can be prohibitively expensive due to increased memory requirements, decreased cache performance and additional hardware required to perform the versioning.
- Fortunately, not all updates to memory need to be versioned. For example, updates to local variables—such as a loop counter—on a system stack are typically only relevant to the thread that is updating the local variables. Hence, even for speculative threads versioning updates to these local variables is not necessary.
- When executing programs written in conventional programming languages, such as C, it is typically not possible to determine which updates are related to the heap, and which updates are related to the system stack. These programs are typically compiled from a high-level language representation into executable code for a specific machine architecture. This compilation process typically removes distinctions between updates to heap and system stack.
- The same is not true for new platform-independent computer languages, such as the JAVA™ programming language distributed by SUN Microsystems, Inc. of Palo Alto, Calif. (Sun, the Sun logo, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.) A program written in the Java programming language is typically compiled into a class file containing Java byte codes. This class file can be transmitted over a computer network to a distant computer system to be executed on the distant computer system. Java byte codes are said to be “platform-independent,” because they can be executed across a wide range of computing platforms, so long as the computing platforms provide a Java virtual machine.
- A Java byte code can be executed on a specific computing platform by using an interpreter or a just in time (JIT) compiler to translate the Java bytecode into machine code for the specific computing platform. Alternatively, a Java byte code can be executed directly on a Java bytecode engine running on the specific computing platform.
- Fortunately, a Java bytecode contains more syntactic information than conventional machine code. In particular, the Java bytecodes differentiate between accesses to local variables in the system stack and accesses to the system heap. Furthermore, programs written in the Java programming language do not allow conversion between primitive and reference types. Such conversion can make it hard to differentiate accesses to the system stack from accesses to the system heap at compile time.
- Data Structures to Support Space-Time Dimensional Execution
- FIG. 4 illustrates how memory is partitioned between stack and heap in accordance with an embodiment of the present invention. In FIG. 4,
memory 400 is divided into a number ofregions including heap 402, stacks forthreads 404 andspeculative heap 406.Heap 402 comprises a region of memory from which objects are allocated.Heap 402 is further divided intoyounger generation region 408 andolder generation region 410 for garbage collection purposes. For performance reasons, garbage collectors typically treat younger generation objects differently from older generation objects. Stacks forthreads 404 comprise a region of memory from which stacks for various threads are allocated.Speculative heap 406 contains the space-time dimensioned values of all memory elements where the two space-time dimensions of the heap are not collapsed. This includes space-time dimensional versions of objects, for example,version 510 ofobject 500 as shown in FIG. 5, and objects created byspeculative thread 203. For garbage collection purposes, these objects created byspeculative thread 203 can be treated as belonging to a generation that is younger than objects withinyounger generation region 408. - FIG. 5 illustrates the structure of a primary version of
object 500 and a space-time dimensioned version ofobject 510 in accordance with an embodiment of the present invention. - Primary version of
object 500 is referenced byobject reference pointer 501. Like any object defined within an object-oriented programming system, primary version ofobject 500 includesdata region 508, which includes one or more fields containing data associated with primary version ofobject 500. Primary version ofobject 500 also includes methodvector table pointer 506. Methodvector table pointer 506 points to a table containing vectors that point to the methods that can be invoked on primary version ofobject 500. - Primary version of
object 500 also includes space-time dimensionedversion pointer 502, which points to space-time dimensioned version ofobject 510, if the two space-time dimensions are not collapsed at this object. Note that in the illustrated embodiment of the present invention, space-time dimensionedversion 510 is always referenced indirectly through space-time dimensionedversion pointer 502. Primary version ofobject 500 additionally includesstatus word 504, which contains status information specifying which fields fromdata region 508 have been written to or read byspeculative thread 203. Space-time dimensioned version ofobject 510 includesonly data region 518. - FIG. 6 illustrates the structure of
status word 504 in accordance with an embodiment of the present invention. In this embodiment,status word 504 includescheckpoint number 602 andspeculative bits 603.Speculative bits 603 includes readbits 604 and writebits 606. Whenstatus word 504 needs to be updated due to a read or a write byspeculative thread 203,checkpoint number 602 is updated with the current time of the system. The current time in the time dimension of the system is advanced discretely at a join or a rollback. This allowscheckpoint number 602 to be used as a qualifier forspeculative bits 603. Ifcheckpoint number 602 is less than the current time,speculative bits 603 can be interpreted as reset. - Read
bits 604 keep track of which fields withindata region 508 have been read since the last join or rollback. Correspondingly, writebits 606 keep track of which fields withindata region 508 have been written since the last join or rollback. In one embodiment of the present invention, readbits 604 includes one bit for each field withindata region 508. In another embodiment, read bits includes fewer bits than the number of fields withindata region 508. In this embodiment, each bit within readbits 604 corresponds to more than one field indata region 508. For example, if there are eight read bits, each bit corresponds to every eighth field. Writebits 606 similarly can correspond to one or multiple fields withindata region 508. - Space-Time Dimensional Update Process
- Space-time dimensioning occurs during selected memory updates. For local variable and operand accesses to the system stack, no space-time dimensioned versions exist and nothing special happens. During read operations by
head thread 202 to objects in theheap 402, again nothing special happens. - Special operations are involved in write operations by
head thread 202 as well as read and write operations byspeculative thread 203. These special operations are described in more detail with reference to FIGS. 7, 8 and 9 below. - FIG. 7 presents a flow chart illustrating operations involved in a write operation to an object by a
head thread 202 in accordance with an embodiment of the present invention. The system writes to the primary version ofobject 500 and the space-time dimensioned version ofobject 510 if the two space-time dimensions are not collapsed at this point (step 702). Next, the system checksstatus word 504 within primary version ofobject 500 to determine whether a rollback is required (step 704). A rollback is required ifspeculative thread 203 previously read the data element. The same memory element can be read when the two space-time dimensions of the heap are collapsed at this memory element at the time of the read byspeculative thread 203. A rollback is also required ifspeculative thread 203 previously wrote to the object and thus ensured that the two dimensions of the object are not collapsed at this element, and if the current write operation updates both primary version ofobject 500 and space-time dimensioned version ofobject 510. - If a rollback is required, the system causes
speculative thread 203 to perform a rollback operation (step 706). This rollback operation allowsspeculative thread 203 to read from (or write to) the object afterhead thread 202 writes to the object. - Note that in the embodiment of the present invention illustrated in FIG. 7 the system performs writes to both
primary version 500 and space-time dimensionedversion 510. In an alternative embodiment, the system first checks to determine ifspeculative thread 203 previously wrote to space-time dimensionedversion 510. If not, the system writes to bothprimary version 500 and space-time dimensionedversion 510. If so, the system only writes toprimary version 500. - FIG. 8 presents a flow chart illustrating operations involved in a read operation to an object by
speculative thread 203 in accordance with an embodiment of the present invention. During this read operation, the system sets a status bit instatus word 504 within primary version ofobject 500 to indicate thatprimary version 500 has been read (step 802).Speculative thread 203 then reads space-time dimensionedversion 510, if it exists. Otherwise,speculative thread 203 readsprimary version 500. - FIG. 9 presents a flow chart illustrating operations involved in a write operation to a memory element by
speculative thread 203 in accordance with an embodiment of the present invention. If a space-time dimensionedversion 510 does not exist, the system creates a space-time dimensionedversion 510 in speculative heap 406 (step 902). The system also updatesstatus word 504 to indicate thatspeculative thread 203 has written to the object if such updating is necessary (step 903). The system next writes to space-time dimensioned version 510 (step 904). Such updating is necessary ifhead thread 202 must subsequently choose between writing to bothprimary version 500 and space-time dimensionedversion 510, or writing only toprimary version 500 as is described above with reference to FIG. 7. - FIG. 10 presents a flow chart illustrating operations involved in a join operation between
head thread 202 and aspeculative thread 203 in accordance with an embodiment of the present invention. A join operation occurs for example whenhead thread 202 reaches a point in the program wherespeculative thread 203 began executing. The join operation causes state associated with thespeculative thread 203 to be merged with state associated with thehead thread 202. This involves copying and/or merging the stack ofspeculative thread 203 into the stack of head thread 202 (step 1002). It also involves merging space-time dimension and primary versions of objects (step 1004) as well as possibly garbage collecting speculative heap 406 (step 1006). In one embodiment of the present invention, one ofthreads steps step 1004. - FIG. 11 presents a flow chart illustrating operations involved in a join operation between
head thread 202 and aspeculative thread 203 in accordance with another embodiment of the present invention. In this embodiment,speculative thread 203 carries on as a pseudo-head thread. As a pseudo-head thread,speculative thread 203 uses indirection to reference space-time dimensioned versions of objects, but does not mark objects or create versions. Whilespeculative thread 203 is acting as a pseudo-head thread,head thread 202 updates primary versions of objects. - Extension to Additional Speculative Threads
- Although the present invention has been described for the case of a single speculative thread, the present invention can be extended to provide multiple speculative threads operating on multiple space-time dimensioned versions of a data object in parallel.
- Interleaved Execution
- FIG. 12 presents a flow chart illustrating interleaved execution of a head thread and related speculative threads in accordance with an embodiment of the present invention. Referring to FIG. 1,
head thread 202, speculative thread 203 (and possibly other speculative threads for head thread 202) are executed concurrently onprocessor 102. - Note that instructions from these threads are time-multiplexed in round-robin fashion to execute in the
same instruction pipeline 107. This effectively increases the speed of single-threaded execution onCPU 102, becausehead thread 202,speculative thread 203, and possibly other speculative threads, are concurrently executing onCPU 102, and are performing work for the same thread of execution. - Also note that the present invention is not limited to the precise form of speculative execution described with this specification. In general, the present invention can be applied any type of speculative execution that makes use of multiple threads.
- The foregoing descriptions of embodiments of the present invention have been presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the present invention to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. Additionally, the above disclosure is not intended to limit the present invention. The scope of the present invention is defined by the appended claims.
Claims (30)
1. A method for interleaving execution of a head thread and a speculative thread within a single processor pipeline, the method comprising:
executing program instructions using the head thread; and
speculatively executing program instructions in advance of the head thread using the speculative thread;
wherein the head thread and the speculative thread execute concurrently through time-multiplexed interleaving in the single processor pipeline.
2. The method of claim 1 , wherein the speculative thread includes one or more speculative threads.
3. The method of claim 1 , further comprising performing a join operation between the head thread and the speculative thread when the head thread reaches a point in the program where the speculative thread began executing.
4. The method of claim 3 ,
wherein the head thread operates on primary versions of memory elements;
wherein the speculative thread operates on space-time dimensioned versions of the memory elements; and
wherein performing the join operation involves merging the space-time dimensioned versions of the memory elements into the primary versions of the memory elements, so that updates to the space-time dimensioned versions of the memory elements are incorporated into corresponding primary versions of memory elements.
5. The method of claim 4 , wherein if the speculative thread performs a read operation to a memory element, the method further comprises:
determining if the space-time dimensioned version of the memory element exists;
if the space-time dimensioned version of the memory element exists, reading the space-time dimensioned version of the memory element;
if the space-time dimensioned version of the memory element does not exist, reading the primary version of the memory element; and
updating status information associated with the memory element to indicate the memory element has been read by the speculative thread.
6. The method of claim 4 , wherein if the speculative thread performs a write operation to a memory element, the method further comprises:
determining if the space-time dimensioned version of the memory element exists;
if the space-time dimensioned version of the memory element does not exist, creating the space-time dimensioned version of the memory element; and
performing the write operation to the space-time dimensioned version of the memory element.
7. The method of claim 4 , wherein if the head thread performs a read operation to a memory element, the method further comprises performing the read operation to the primary version of the memory element.
8. The method of claim 4 , wherein if the head thread performs a write operation to a memory element, the method further comprises:
performing the write operation to the primary version of the memory element;
checking status information associated with the memory element to determine if the memory element has been read by the speculative thread;
if the memory element has been read by the speculative thread, causing the speculative thread to roll back so that the speculative thread can read a result of the write operation; and
if the memory element has not been read by the speculative thread, performing the write operation to the space-time dimensioned version of the memory element if the space-time dimensioned version exists.
9. The method of claim 4 , wherein the memory elements include objects defined within an object-oriented programming system.
10. The method of claim 1 , wherein the head thread and the speculative thread access separate hardware register files.
11. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for interleaving execution of a head thread and a speculative thread within a single processor pipeline, the method comprising:
executing program instructions using the head thread; and
speculatively executing program instructions in advance of the head thread using the speculative thread;
wherein the head thread and the speculative thread execute concurrently through time-multiplexed interleaving in the single processor pipeline.
12. The computer-readable storage medium of claim 11 , wherein the speculative thread includes one or more speculative threads.
13. The computer-readable storage medium of claim 11 , wherein the method further comprises performing a join operation between the head thread and the speculative thread when the head thread reaches a point in the program where the speculative thread began executing.
14. The computer-readable storage medium of claim 13 ,
wherein the head thread operates on primary versions of memory elements;
wherein the speculative thread operates on space-time dimensioned versions of the memory elements; and
wherein performing the join operation involves merging the space-time dimensioned versions of the memory elements into the primary versions of the memory elements, so that updates to the space-time dimensioned versions of the memory elements are incorporated into corresponding primary versions of memory elements.
15. The computer-readable storage medium of claim 14 , wherein if the speculative thread performs a read operation to a memory element, the method further comprises:
determining if the space-time dimensioned version of the memory element exists;
if the space-time dimensioned version of the memory element exists, reading the space-time dimensioned version of the memory element;
if the space-time dimensioned version of the memory element does not exist, reading the primary version of the memory element; and
updating status information associated with the memory element to indicate the memory element has been read by the speculative thread.
16. The computer-readable storage medium of claim 14 , wherein if the speculative thread performs a write operation to a memory element, the method further comprises:
determining if the space-time dimensioned version of the memory element exists;
if the space-time dimensioned version of the memory element does not exist, creating the space-time dimensioned version of the memory element; and
performing the write operation to the space-time dimensioned version of the memory element.
17. The computer-readable storage medium of claim 14 , wherein if the head thread performs a read operation to a memory element, the method further comprises performing the read operation to the primary version of the memory element.
18. The computer-readable storage medium of claim 14 , wherein if the head thread performs a write operation to a memory element, the method further comprises:
performing the write operation to the primary version of the memory element;
checking status information associated with the memory element to determine if the memory element has been read by the speculative thread;
if the memory element has been read by the speculative thread, causing the speculative thread to roll back so that the speculative thread can read a result of the write operation; and
if the memory element has not been read by the speculative thread, performing the write operation to the space-time dimensioned version of the memory element if the space-time dimensioned version exists.
19. The computer-readable storage medium of claim 14 , wherein the memory elements include objects defined within an object-oriented programming system.
20. The computer-readable storage medium of claim 11 , wherein the head thread and the speculative thread access separate hardware register files.
21. An apparatus that supports interleaving execution of a head thread and a speculative thread within a single processor pipeline, the apparatus comprising:
a processor;
a processor pipeline within the processor;
an execution mechanism within the processor that is configured to, execute program instructions using the head thread, and to speculatively execute program instructions in advance of the head thread using the speculative thread;
wherein the execution mechanism is configured to concurrently execute the head thread and the speculative thread through time-multiplexed interleaving in the processor pipeline.
22. The apparatus of claim 21 , wherein the speculative thread includes one or more speculative threads.
23. The apparatus of claim 21 , further comprising a join mechanism configured to perform a join operation between the head thread and the speculative thread when the head thread reaches a point in the program where the speculative thread began executing.
24. The apparatus of claim 23 ,
wherein the head thread operates on primary versions of memory elements;
wherein the speculative thread operates on space-time dimensioned versions of the memory elements; and
wherein the join mechanism is configured to merge the space-time dimensioned versions of the memory elements into the primary versions of the memory elements, so that updates to the space-time dimensioned versions of the memory elements are incorporated into corresponding primary versions of memory elements.
25. The apparatus of claim 24 , wherein if the speculative thread performs a read operation to a memory element, the execution mechanism is configured to:
determine if the space-time dimensioned version of the memory element exists;
if the space-time dimensioned version of the memory element exists, to read the space-time dimensioned version of the memory element;
if the space-time dimensioned version of the memory element does not exist, to read the primary version of the memory element; and to
update status information associated with the memory element to indicate the memory element has been read by the speculative thread.
26. The apparatus of claim 24 , wherein if the speculative thread performs a write operation to a memory element, the execution mechanism is configured to:
determine if the space-time dimensioned version of the memory element exists;
if the space-time dimensioned version of the memory element does not exist, to create the space-time dimensioned version of the memory element; and to
perform the write operation to the space-time dimensioned version of the memory element.
27. The apparatus of claim 24 , wherein if the head thread performs a read operation to a memory element, the execution mechanism is configured to perform the read operation to the primary version of the memory element.
28. The apparatus of claim 24 , wherein if the head thread performs a write operation to a memory element, the execution mechanism is configured to:
perform the write operation to the primary version of the memory element;
check status information associated with the memory element to determine if the memory element has been read by the speculative thread;
if the memory element has been read by the speculative thread, to cause the speculative thread to roll back so that the speculative thread can read a result of the write operation; and
if the memory element has not been read by the speculative thread, to perform the write operation to the space-time dimensioned version of the memory element if the space-time dimensioned version exists.
29. The apparatus of claim 24 , wherein the memory elements include objects defined within an object-oriented programming system.
30. The apparatus of claim 21 , wherein the head thread and the speculative thread access separate hardware register files.
Priority Applications (8)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US10/365,313 US20030188141A1 (en) | 2002-03-29 | 2003-02-12 | Time-multiplexed speculative multi-threading to support single-threaded applications |
AU2003222244A AU2003222244A1 (en) | 2002-03-29 | 2003-03-03 | Time-multiplexed speculative multi-threading to support single-threaded applications |
EP03717926A EP1559001A2 (en) | 2002-03-29 | 2003-03-03 | Time-multiplexed speculative multi-threading to support single-threaded applications |
PCT/US2003/006386 WO2003085520A2 (en) | 2002-03-29 | 2003-03-03 | Time-multiplexed speculative multi-threading to support single-threaded applications |
KR1020047015431A KR100931460B1 (en) | 2002-03-29 | 2003-03-03 | Time-multiplexed specular multithreading to support single-threaded applications |
CNB038041456A CN100362474C (en) | 2002-03-29 | 2003-03-03 | Time-multiplexed speculative multi-threading to support single-threaded applications |
JP2003582639A JP2005529383A (en) | 2002-03-29 | 2003-03-03 | Time-multiplexed speculative multithreading to support single-threaded applications |
US11/359,659 US7574588B2 (en) | 2000-05-31 | 2006-02-21 | Time-multiplexed speculative multi-threading to support single-threaded applications |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US36893502P | 2002-03-29 | 2002-03-29 | |
US10/365,313 US20030188141A1 (en) | 2002-03-29 | 2003-02-12 | Time-multiplexed speculative multi-threading to support single-threaded applications |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/761,217 Continuation-In-Part US7051192B2 (en) | 2000-05-31 | 2001-01-16 | Facilitating value prediction to support speculative program execution |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US11/359,659 Continuation US7574588B2 (en) | 2000-05-31 | 2006-02-21 | Time-multiplexed speculative multi-threading to support single-threaded applications |
Publications (1)
Publication Number | Publication Date |
---|---|
US20030188141A1 true US20030188141A1 (en) | 2003-10-02 |
Family
ID=28457104
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US10/365,313 Abandoned US20030188141A1 (en) | 2000-05-31 | 2003-02-12 | Time-multiplexed speculative multi-threading to support single-threaded applications |
US11/359,659 Expired - Lifetime US7574588B2 (en) | 2000-05-31 | 2006-02-21 | Time-multiplexed speculative multi-threading to support single-threaded applications |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US11/359,659 Expired - Lifetime US7574588B2 (en) | 2000-05-31 | 2006-02-21 | Time-multiplexed speculative multi-threading to support single-threaded applications |
Country Status (7)
Country | Link |
---|---|
US (2) | US20030188141A1 (en) |
EP (1) | EP1559001A2 (en) |
JP (1) | JP2005529383A (en) |
KR (1) | KR100931460B1 (en) |
CN (1) | CN100362474C (en) |
AU (1) | AU2003222244A1 (en) |
WO (1) | WO2003085520A2 (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040098720A1 (en) * | 2002-11-19 | 2004-05-20 | Hooper Donald F. | Allocation of packets and threads |
EP1610218A2 (en) * | 2004-06-16 | 2005-12-28 | Giesecke & Devrient GmbH | Portable data carrier, system with said data carrier and method of operating said data carrier |
US20080120489A1 (en) * | 2006-11-16 | 2008-05-22 | Shinri Inamori | Scalable Multi-Threaded Sequencing/Synchronizing Processor Architecture |
CN100440139C (en) * | 2005-03-18 | 2008-12-03 | 马维尔国际贸易有限公司 | Dual thread processor |
US20090164755A1 (en) * | 2007-12-19 | 2009-06-25 | International Business Machines Corporation | Optimizing Execution of Single-Threaded Programs on a Multiprocessor Managed by Compilation |
US20100005277A1 (en) * | 2006-10-27 | 2010-01-07 | Enric Gibert | Communicating Between Multiple Threads In A Processor |
US20120311371A1 (en) * | 2010-02-23 | 2012-12-06 | Ian Shaeffer | Time multiplexing at different rates to access different memory types |
CN103942096A (en) * | 2014-03-24 | 2014-07-23 | 浙江大学 | Multithreading speculation method for data fault tolerance |
US9069782B2 (en) | 2012-10-01 | 2015-06-30 | The Research Foundation For The State University Of New York | System and method for security and privacy aware virtual machine checkpointing |
US9767271B2 (en) | 2010-07-15 | 2017-09-19 | The Research Foundation For The State University Of New York | System and method for validating program execution at run-time |
US9767284B2 (en) | 2012-09-14 | 2017-09-19 | The Research Foundation For The State University Of New York | Continuous run-time validation of program execution: a practical approach |
US20180107600A1 (en) * | 2016-10-19 | 2018-04-19 | International Business Machines Corporation | Response times in asynchronous i/o-based software using thread pairing and co-execution |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6755902B2 (en) | 2002-06-27 | 2004-06-29 | Xerox Corporation | Phase change inks containing azo pyridone colorants |
KR100879505B1 (en) * | 2007-01-10 | 2009-01-20 | 재단법인서울대학교산학협력재단 | An Effective Method for Transforming Single Processor Operating System to Master-Slave Multiprocessor Operating System, and Transforming System for the same |
US8725991B2 (en) * | 2007-09-12 | 2014-05-13 | Qualcomm Incorporated | Register file system and method for pipelined processing |
US8566539B2 (en) | 2009-01-14 | 2013-10-22 | International Business Machines Corporation | Managing thermal condition of a memory |
JP4886826B2 (en) * | 2009-08-24 | 2012-02-29 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Fault tolerant computer system, method and program |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5872990A (en) * | 1997-01-07 | 1999-02-16 | International Business Machines Corporation | Reordering of memory reference operations and conflict resolution via rollback in a multiprocessing environment |
US5933627A (en) * | 1996-07-01 | 1999-08-03 | Sun Microsystems | Thread switch on blocked load or store using instruction thread field |
US6247027B1 (en) * | 1999-05-17 | 2001-06-12 | Sun Microsystems, Inc. | Facilitating garbage collection during object versioning for space and time dimensional computing |
US6353881B1 (en) * | 1999-05-17 | 2002-03-05 | Sun Microsystems, Inc. | Supporting space-time dimensional program execution by selectively versioning memory updates |
US6430649B1 (en) * | 1999-06-07 | 2002-08-06 | Sun Microsystems, Inc. | Method and apparatus for enforcing memory reference dependencies through a load store unit |
US6463526B1 (en) * | 1999-06-07 | 2002-10-08 | Sun Microsystems, Inc. | Supporting multi-dimensional space-time computing through object versioning |
US20030005266A1 (en) * | 2001-06-28 | 2003-01-02 | Haitham Akkary | Multithreaded processor capable of implicit multithreaded execution of a single-thread program |
US20030046517A1 (en) * | 2001-09-04 | 2003-03-06 | Lauterbach Gary R. | Apparatus to facilitate multithreading in a computer processor pipeline |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4991080A (en) * | 1986-03-13 | 1991-02-05 | International Business Machines Corporation | Pipeline processing apparatus for executing instructions in three streams, including branch stream pre-execution processor for pre-executing conditional branch instructions |
US5907702A (en) * | 1997-03-28 | 1999-05-25 | International Business Machines Corporation | Method and apparatus for decreasing thread switch latency in a multithread processor |
JP2000122882A (en) * | 1998-10-20 | 2000-04-28 | Matsushita Electric Ind Co Ltd | Multi-thread processor and debugging device |
CN1168025C (en) * | 1999-03-10 | 2004-09-22 | 国际商业机器公司 | Command cache for multiple thread processor |
US6661794B1 (en) * | 1999-12-29 | 2003-12-09 | Intel Corporation | Method and apparatus for gigabit packet assignment for multithreaded packet processing |
US6694425B1 (en) * | 2000-05-04 | 2004-02-17 | International Business Machines Corporation | Selective flush of shared and other pipeline stages in a multithread processor |
-
2003
- 2003-02-12 US US10/365,313 patent/US20030188141A1/en not_active Abandoned
- 2003-03-03 EP EP03717926A patent/EP1559001A2/en not_active Withdrawn
- 2003-03-03 KR KR1020047015431A patent/KR100931460B1/en active IP Right Grant
- 2003-03-03 WO PCT/US2003/006386 patent/WO2003085520A2/en active Application Filing
- 2003-03-03 AU AU2003222244A patent/AU2003222244A1/en not_active Abandoned
- 2003-03-03 JP JP2003582639A patent/JP2005529383A/en active Pending
- 2003-03-03 CN CNB038041456A patent/CN100362474C/en not_active Expired - Lifetime
-
2006
- 2006-02-21 US US11/359,659 patent/US7574588B2/en not_active Expired - Lifetime
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5933627A (en) * | 1996-07-01 | 1999-08-03 | Sun Microsystems | Thread switch on blocked load or store using instruction thread field |
US5872990A (en) * | 1997-01-07 | 1999-02-16 | International Business Machines Corporation | Reordering of memory reference operations and conflict resolution via rollback in a multiprocessing environment |
US6247027B1 (en) * | 1999-05-17 | 2001-06-12 | Sun Microsystems, Inc. | Facilitating garbage collection during object versioning for space and time dimensional computing |
US6353881B1 (en) * | 1999-05-17 | 2002-03-05 | Sun Microsystems, Inc. | Supporting space-time dimensional program execution by selectively versioning memory updates |
US6658451B1 (en) * | 1999-05-17 | 2003-12-02 | Sun Microsystems, Inc. | Parallel join operation to support space and time dimensional program execution |
US6430649B1 (en) * | 1999-06-07 | 2002-08-06 | Sun Microsystems, Inc. | Method and apparatus for enforcing memory reference dependencies through a load store unit |
US6463526B1 (en) * | 1999-06-07 | 2002-10-08 | Sun Microsystems, Inc. | Supporting multi-dimensional space-time computing through object versioning |
US20030005266A1 (en) * | 2001-06-28 | 2003-01-02 | Haitham Akkary | Multithreaded processor capable of implicit multithreaded execution of a single-thread program |
US20030046517A1 (en) * | 2001-09-04 | 2003-03-06 | Lauterbach Gary R. | Apparatus to facilitate multithreading in a computer processor pipeline |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7181742B2 (en) * | 2002-11-19 | 2007-02-20 | Intel Corporation | Allocation of packets and threads |
US20040098720A1 (en) * | 2002-11-19 | 2004-05-20 | Hooper Donald F. | Allocation of packets and threads |
EP1610218A2 (en) * | 2004-06-16 | 2005-12-28 | Giesecke & Devrient GmbH | Portable data carrier, system with said data carrier and method of operating said data carrier |
EP1610218A3 (en) * | 2004-06-16 | 2009-06-03 | Giesecke & Devrient Gmbh | Portable data carrier, system with said data carrier and method of operating said data carrier |
CN100440139C (en) * | 2005-03-18 | 2008-12-03 | 马维尔国际贸易有限公司 | Dual thread processor |
US8261046B2 (en) * | 2006-10-27 | 2012-09-04 | Intel Corporation | Access of register files of other threads using synchronization |
US20100005277A1 (en) * | 2006-10-27 | 2010-01-07 | Enric Gibert | Communicating Between Multiple Threads In A Processor |
US20080120489A1 (en) * | 2006-11-16 | 2008-05-22 | Shinri Inamori | Scalable Multi-Threaded Sequencing/Synchronizing Processor Architecture |
US7797514B2 (en) * | 2006-11-16 | 2010-09-14 | Texas Instruments Incorporated | Scalable multi-threaded sequencing/synchronizing processor architecture |
US8312455B2 (en) * | 2007-12-19 | 2012-11-13 | International Business Machines Corporation | Optimizing execution of single-threaded programs on a multiprocessor managed by compilation |
US20090164755A1 (en) * | 2007-12-19 | 2009-06-25 | International Business Machines Corporation | Optimizing Execution of Single-Threaded Programs on a Multiprocessor Managed by Compilation |
US20120311371A1 (en) * | 2010-02-23 | 2012-12-06 | Ian Shaeffer | Time multiplexing at different rates to access different memory types |
US9176908B2 (en) * | 2010-02-23 | 2015-11-03 | Rambus Inc. | Time multiplexing at different rates to access different memory types |
US9864707B2 (en) | 2010-02-23 | 2018-01-09 | Rambus Inc. | Time multiplexing at different rates to access different memory types |
US9767271B2 (en) | 2010-07-15 | 2017-09-19 | The Research Foundation For The State University Of New York | System and method for validating program execution at run-time |
US9767284B2 (en) | 2012-09-14 | 2017-09-19 | The Research Foundation For The State University Of New York | Continuous run-time validation of program execution: a practical approach |
US9069782B2 (en) | 2012-10-01 | 2015-06-30 | The Research Foundation For The State University Of New York | System and method for security and privacy aware virtual machine checkpointing |
US9552495B2 (en) | 2012-10-01 | 2017-01-24 | The Research Foundation For The State University Of New York | System and method for security and privacy aware virtual machine checkpointing |
US10324795B2 (en) | 2012-10-01 | 2019-06-18 | The Research Foundation for the State University o | System and method for security and privacy aware virtual machine checkpointing |
CN103942096A (en) * | 2014-03-24 | 2014-07-23 | 浙江大学 | Multithreading speculation method for data fault tolerance |
US20180107600A1 (en) * | 2016-10-19 | 2018-04-19 | International Business Machines Corporation | Response times in asynchronous i/o-based software using thread pairing and co-execution |
Also Published As
Publication number | Publication date |
---|---|
EP1559001A2 (en) | 2005-08-03 |
KR20040094888A (en) | 2004-11-10 |
WO2003085520A2 (en) | 2003-10-16 |
AU2003222244A8 (en) | 2003-10-20 |
WO2003085520A3 (en) | 2005-06-09 |
CN100362474C (en) | 2008-01-16 |
AU2003222244A1 (en) | 2003-10-20 |
KR100931460B1 (en) | 2009-12-11 |
US20060149946A1 (en) | 2006-07-06 |
US7574588B2 (en) | 2009-08-11 |
CN1650266A (en) | 2005-08-03 |
JP2005529383A (en) | 2005-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7574588B2 (en) | Time-multiplexed speculative multi-threading to support single-threaded applications | |
US6721944B2 (en) | Marking memory elements based upon usage of accessed information during speculative execution | |
US6353881B1 (en) | Supporting space-time dimensional program execution by selectively versioning memory updates | |
US7366880B2 (en) | Facilitating value prediction to support speculative program execution | |
US6684398B2 (en) | Monitor entry and exit for a speculative thread during space and time dimensional execution | |
US6247027B1 (en) | Facilitating garbage collection during object versioning for space and time dimensional computing | |
US7168076B2 (en) | Facilitating efficient join operations between a head thread and a speculative thread | |
US6463526B1 (en) | Supporting multi-dimensional space-time computing through object versioning | |
US6430649B1 (en) | Method and apparatus for enforcing memory reference dependencies through a load store unit | |
WO2001067239A2 (en) | Method and apparatus for facilitating exception handling using a conditional trap instruction | |
US6460067B1 (en) | Using time stamps to improve efficiency in marking fields within objects | |
US6453463B1 (en) | Method and apparatus for providing finer marking granularity for fields within objects | |
US6732363B1 (en) | Supporting inter-process communication through a conditional trap instruction | |
WO2000070451A1 (en) | Parallel join operation to support space and time dimensional program execution | |
EP1188114B1 (en) | Dynamic handling of object versions to support space and time dimensional program execution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: SUN MICROSYSTEMS, INC., CALIFORNIA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHAUDHRY, SHAILENDER;TREMBLAY, MARC;REEL/FRAME:013770/0559 Effective date: 20030123 |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |