Jump to content

Temporal multithreading

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ElectricValkyrie (talk | contribs) at 19:44, 2 August 2011 (continuing wikification). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


Temporal multithreading is one of the two main forms of multithreading that can be implemented on computer processor hardware, the other being simultaneous multithreading. The distinguishing difference between the two forms is the maximum number of concurrent threads that can execute in any given pipeline stage in a given cycle. In temporal multithreading the number is one, while in simultaneous multithreading the number is greater than one.

Variations

There are many possible variations of temporal multithreading, but most can be classified into two sub-forms: coarse-grained and fine-grained.

  • In coarse-grained temporal multithreading, the main processor pipeline contains only one thread at a time. The processor must effectively perform a rapid context switch before executing a different thread. This fast context switch is sometimes referred to as a thread switch. There may or may not be additional penalty cycles when switching.
There are many possible variations of coarse-grained temporal multithreading, mainly concerning the algorithm that determines when thread switching occurs. This algorithm may be based on one or more of many different factors, including cycle counts, cache misses, and fairness.
  • In fine-grained temporal multithreading, the main processor pipeline may contain multiple threads, with context switches effectively occurring between pipe stages (e.g. in the barrel processor). This form of multithreading can be more expensive than the coarse-grained forms because execution resources that span multiple pipe stages may have to deal with multiple threads. It can also be more expensive because the design cannot be optimized around the concept of a "background" thread - any of the concurrent threads implemented by the hardware might require its state to be read or written on any cycle.

In any of its forms, Temporal multithreading has several things in common with simultaneous multithreading. First, the hardware must store a complete set of states per concurrent thread implemented. Second, the hardware must preserve the illusion that a given thread has the processor resources to itself. Third, fairness algorithms must be included to prevent one thread from dominating processor time and/or resources.

Disadvantages to simultaneous multithreading: Only one thread can be executed at a time.

Advantages to simultaneous multithreading: Lower processor heat output.

See also

  • Simultaneous multithreading, another implementation of hardware multithreading
  • Thread (computer science), the fundamental software entity scheduled by the operating system kernel to execute on a CPU or processor (core)
  • Symmetric multiprocessing, where the system (or partition of a larger computer hardware platform) contains more than one CPU or processor (core) and where the operating system kernel is not limited to which of the available CPUs (cores) a given thread can be scheduled to execute on