<s>
Temporal	B-Operating_System
multithreading	I-Operating_System
is	O
one	O
of	O
the	O
two	O
main	O
forms	O
of	O
multithreading	B-Operating_System
that	O
can	O
be	O
implemented	O
on	O
computer	O
processor	O
hardware	B-Architecture
,	O
the	O
other	O
being	O
simultaneous	B-Operating_System
multithreading	I-Operating_System
.	O
</s>
<s>
The	O
distinguishing	O
difference	O
between	O
the	O
two	O
forms	O
is	O
the	O
maximum	O
number	O
of	O
concurrent	O
threads	B-Operating_System
that	O
can	O
execute	O
in	O
any	O
given	O
pipeline	B-General_Concept
stage	O
in	O
a	O
given	O
cycle	B-General_Concept
.	O
</s>
<s>
In	O
temporal	B-Operating_System
multithreading	I-Operating_System
the	O
number	O
is	O
one	O
,	O
while	O
in	O
simultaneous	B-Operating_System
multithreading	I-Operating_System
the	O
number	O
is	O
greater	O
than	O
one	O
.	O
</s>
<s>
Some	O
authors	O
use	O
the	O
term	O
super-threading	B-Operating_System
synonymously	O
.	O
</s>
<s>
There	O
are	O
many	O
possible	O
variations	O
of	O
temporal	B-Operating_System
multithreading	I-Operating_System
,	O
but	O
most	O
can	O
be	O
classified	O
into	O
two	O
sub-forms	O
:	O
</s>
<s>
Coarse-grained	B-Operating_System
The	O
main	O
processor	O
pipeline	B-General_Concept
contains	O
only	O
one	O
thread	B-Operating_System
at	O
a	O
time	O
.	O
</s>
<s>
The	O
processor	O
must	O
effectively	O
perform	O
a	O
rapid	O
context	B-Operating_System
switch	I-Operating_System
before	O
executing	O
a	O
different	O
thread	B-Operating_System
.	O
</s>
<s>
This	O
fast	O
context	B-Operating_System
switch	I-Operating_System
is	O
sometimes	O
referred	O
to	O
as	O
a	O
thread	B-Operating_System
switch	I-Operating_System
.	O
</s>
<s>
There	O
are	O
many	O
possible	O
variations	O
of	O
coarse-grained	B-Operating_System
temporal	B-Operating_System
multithreading	I-Operating_System
,	O
mainly	O
concerning	O
the	O
algorithm	O
that	O
determines	O
when	O
thread	B-Operating_System
switching	O
occurs	O
.	O
</s>
<s>
This	O
algorithm	O
may	O
be	O
based	O
on	O
one	O
or	O
more	O
of	O
many	O
different	O
factors	O
,	O
including	O
cycle	B-General_Concept
counts	O
,	O
cache	O
misses	O
,	O
and	O
fairness	O
.	O
</s>
<s>
Fine-grained	B-Operating_System
(	O
or	O
interleaved	O
)	O
The	O
main	O
processor	O
pipeline	B-General_Concept
may	O
contain	O
multiple	O
threads	B-Operating_System
,	O
with	O
context	B-Operating_System
switches	I-Operating_System
effectively	O
occurring	O
between	O
pipe	O
stages	O
(	O
e.g.	O
,	O
in	O
the	O
barrel	B-Operating_System
processor	I-Operating_System
)	O
.	O
</s>
<s>
This	O
form	O
of	O
multithreading	B-Operating_System
can	O
be	O
more	O
expensive	O
than	O
the	O
coarse-grained	B-Operating_System
forms	O
because	O
execution	O
resources	O
that	O
span	O
multiple	O
pipe	O
stages	O
may	O
have	O
to	O
deal	O
with	O
multiple	O
threads	B-Operating_System
.	O
</s>
<s>
Also	O
contributing	O
to	O
cost	O
is	O
the	O
fact	O
that	O
this	O
design	O
cannot	O
be	O
optimized	O
around	O
the	O
concept	O
of	O
a	O
"	O
background	O
"	O
thread	B-Operating_System
any	O
of	O
the	O
concurrent	O
threads	B-Operating_System
implemented	O
by	O
the	O
hardware	B-Architecture
might	O
require	O
its	O
state	B-Application
to	O
be	O
read	O
or	O
written	O
on	O
any	O
cycle	B-General_Concept
.	O
</s>
<s>
In	O
any	O
of	O
its	O
forms	O
,	O
temporal	B-Operating_System
multithreading	I-Operating_System
is	O
similar	O
in	O
many	O
ways	O
to	O
simultaneous	B-Operating_System
multithreading	I-Operating_System
.	O
</s>
<s>
As	O
in	O
the	O
simultaneous	O
process	O
,	O
the	O
hardware	B-Architecture
must	O
store	O
a	O
complete	O
set	O
of	O
states	O
per	O
concurrent	O
thread	B-Operating_System
implemented	O
.	O
</s>
<s>
The	O
hardware	B-Architecture
must	O
also	O
preserve	O
the	O
illusion	O
that	O
a	O
given	O
thread	B-Operating_System
has	O
the	O
processor	O
resources	O
to	O
itself	O
.	O
</s>
<s>
Fairness	O
algorithms	O
must	O
be	O
included	O
in	O
both	O
types	O
of	O
multithreading	B-Operating_System
situations	O
to	O
prevent	O
one	O
thread	B-Operating_System
from	O
dominating	O
processor	O
time	O
and/or	O
resources	O
.	O
</s>
<s>
Temporal	B-Operating_System
multithreading	I-Operating_System
has	O
an	O
advantage	O
over	O
simultaneous	B-Operating_System
multithreading	I-Operating_System
in	O
that	O
it	O
causes	O
lower	O
processor	O
heat	O
output	O
;	O
however	O
,	O
it	O
allows	O
only	O
one	O
thread	B-Operating_System
to	O
be	O
executed	O
at	O
a	O
time	O
.	O
</s>
