<s>
Task	B-Operating_System
parallelism	I-Operating_System
(	O
also	O
known	O
as	O
function	B-Operating_System
parallelism	I-Operating_System
and	O
control	B-Operating_System
parallelism	I-Operating_System
)	O
is	O
a	O
form	O
of	O
parallelization	B-Operating_System
of	O
computer	B-Application
code	I-Application
across	O
multiple	O
processors	O
in	O
parallel	B-Operating_System
computing	I-Operating_System
environments	O
.	O
</s>
<s>
Task	B-Operating_System
parallelism	I-Operating_System
focuses	O
on	O
distributing	O
tasks	B-General_Concept
—	O
concurrently	O
performed	O
by	O
processes	B-Operating_System
or	O
threads	B-Operating_System
—	O
across	O
different	O
processors	O
.	O
</s>
<s>
In	O
contrast	O
to	O
data	B-Operating_System
parallelism	I-Operating_System
which	O
involves	O
running	O
the	O
same	O
task	O
on	O
different	O
components	O
of	O
data	O
,	O
task	B-Operating_System
parallelism	I-Operating_System
is	O
distinguished	O
by	O
running	O
many	O
different	O
tasks	B-General_Concept
at	O
the	O
same	O
time	O
on	O
the	O
same	O
data	O
.	O
</s>
<s>
A	O
common	O
type	O
of	O
task	B-Operating_System
parallelism	I-Operating_System
is	O
pipelining	B-General_Concept
,	O
which	O
consists	O
of	O
moving	O
a	O
single	O
set	O
of	O
data	O
through	O
a	O
series	O
of	O
separate	O
tasks	B-General_Concept
where	O
each	O
task	O
can	O
execute	O
independently	O
of	O
the	O
others	O
.	O
</s>
<s>
In	O
a	O
multiprocessor	O
system	O
,	O
task	B-Operating_System
parallelism	I-Operating_System
is	O
achieved	O
when	O
each	O
processor	B-General_Concept
executes	O
a	O
different	O
thread	B-Operating_System
(	O
or	O
process	O
)	O
on	O
the	O
same	O
or	O
different	O
data	O
.	O
</s>
<s>
The	O
threads	B-Operating_System
may	O
execute	O
the	O
same	O
or	O
different	O
code	O
.	O
</s>
<s>
In	O
the	O
general	O
case	O
,	O
different	O
execution	O
threads	B-Operating_System
communicate	O
with	O
one	O
another	O
as	O
they	O
work	O
,	O
but	O
this	O
is	O
not	O
a	O
requirement	O
.	O
</s>
<s>
Communication	O
usually	O
takes	O
place	O
by	O
passing	O
data	O
from	O
one	O
thread	B-Operating_System
to	O
the	O
next	O
as	O
part	O
of	O
a	O
workflow	B-Operating_System
.	O
</s>
<s>
As	O
a	O
simple	O
example	O
,	O
if	O
a	O
system	O
is	O
running	O
code	O
on	O
a	O
2-processor	O
system	O
(	O
CPUs	B-Device
"	O
a	O
"	O
&	O
"	O
b	O
"	O
)	O
in	O
a	O
parallel	O
environment	O
and	O
we	O
wish	O
to	O
do	O
tasks	B-General_Concept
"	O
A	O
"	O
and	O
"	O
B	O
"	O
,	O
it	O
is	O
possible	O
to	O
tell	O
CPU	B-Device
"	O
a	O
"	O
to	O
do	O
task	O
"	O
A	O
"	O
and	O
CPU	B-Device
"	O
b	O
"	O
to	O
do	O
task	O
"	O
B	O
"	O
simultaneously	O
,	O
thereby	O
reducing	O
the	O
run	B-Library
time	I-Library
of	O
the	O
execution	O
.	O
</s>
<s>
The	O
tasks	B-General_Concept
can	O
be	O
assigned	O
using	O
conditional	B-Language
statements	O
as	O
described	O
below	O
.	O
</s>
<s>
Task	B-Operating_System
parallelism	I-Operating_System
emphasizes	O
the	O
distributed	O
(	O
parallelized	B-Operating_System
)	O
nature	O
of	O
the	O
processing	O
(	O
i.e.	O
</s>
<s>
threads	B-Operating_System
)	O
,	O
as	O
opposed	O
to	O
the	O
data	O
(	O
data	B-Operating_System
parallelism	I-Operating_System
)	O
.	O
</s>
<s>
Most	O
real	O
programs	O
fall	O
somewhere	O
on	O
a	O
continuum	O
between	O
task	B-Operating_System
parallelism	I-Operating_System
and	O
data	B-Operating_System
parallelism	I-Operating_System
.	O
</s>
<s>
Thread-level	B-Operating_System
parallelism	I-Operating_System
(	O
TLP	O
)	O
is	O
the	O
parallelism	B-Operating_System
inherent	O
in	O
an	O
application	O
that	O
runs	O
multiple	O
threads	B-Operating_System
at	O
once	O
.	O
</s>
<s>
This	O
type	O
of	O
parallelism	B-Operating_System
is	O
found	O
largely	O
in	O
applications	O
written	O
for	O
commercial	O
servers	O
such	O
as	O
databases	O
.	O
</s>
<s>
By	O
running	O
many	O
threads	B-Operating_System
at	O
once	O
,	O
these	O
applications	O
are	O
able	O
to	O
tolerate	O
the	O
high	O
amounts	O
of	O
I/O	O
and	O
memory	O
system	O
latency	O
their	O
workloads	O
can	O
incur	O
-	O
while	O
one	O
thread	B-Operating_System
is	O
delayed	O
waiting	O
for	O
a	O
memory	O
or	O
disk	O
access	O
,	O
other	O
threads	B-Operating_System
can	O
do	O
useful	O
work	O
.	O
</s>
<s>
The	O
exploitation	O
of	O
thread-level	B-Operating_System
parallelism	I-Operating_System
has	O
also	O
begun	O
to	O
make	O
inroads	O
into	O
the	O
desktop	O
market	O
with	O
the	O
advent	O
of	O
multi-core	B-Architecture
microprocessors	O
.	O
</s>
<s>
If	O
this	O
trend	O
continues	O
,	O
new	O
applications	O
will	O
have	O
to	O
be	O
designed	O
to	O
utilize	O
multiple	O
threads	B-Operating_System
in	O
order	O
to	O
benefit	O
from	O
the	O
increase	O
in	O
potential	O
computing	O
power	O
.	O
</s>
<s>
The	O
pseudocode	B-Language
below	O
illustrates	O
task	B-Operating_System
parallelism	I-Operating_System
:	O
</s>
<s>
If	O
we	O
write	O
the	O
code	O
as	O
above	O
and	O
launch	O
it	O
on	O
a	O
2-processor	O
system	O
,	O
then	O
the	O
runtime	B-Library
environment	O
will	O
execute	O
it	O
as	O
follows	O
.	O
</s>
<s>
In	O
an	O
SPMD	B-Operating_System
(	O
single	B-Operating_System
program	I-Operating_System
,	I-Operating_System
multiple	I-Operating_System
data	I-Operating_System
)	O
system	O
,	O
both	O
CPUs	B-Device
will	O
execute	O
the	O
code	O
.	O
</s>
<s>
The	O
"	O
if	O
"	O
clause	O
differentiates	O
between	O
the	O
CPUs	B-Device
.	O
</s>
<s>
CPU	B-Device
"	O
a	O
"	O
will	O
read	O
true	O
on	O
the	O
"	O
if	O
"	O
and	O
CPU	B-Device
"	O
b	O
"	O
will	O
read	O
true	O
on	O
the	O
"	O
else	O
if	O
"	O
,	O
thus	O
having	O
their	O
own	O
task	O
.	O
</s>
<s>
Now	O
,	O
both	O
CPU	B-Device
's	O
execute	O
separate	O
code	O
blocks	O
simultaneously	O
,	O
performing	O
different	O
tasks	B-General_Concept
simultaneously	O
.	O
</s>
<s>
Code	O
executed	O
by	O
CPU	B-Device
"	O
a	O
"	O
:	O
</s>
<s>
Code	O
executed	O
by	O
CPU	B-Device
"	O
b	O
"	O
:	O
</s>
<s>
Task	B-Operating_System
parallelism	I-Operating_System
can	O
be	O
supported	O
in	O
general-purpose	O
languages	O
by	O
either	O
built-in	O
facilities	O
or	O
libraries	O
.	O
</s>
<s>
Examples	O
of	O
fine-grained	O
task-parallel	O
languages	O
can	O
be	O
found	O
in	O
the	O
realm	O
of	O
Hardware	O
Description	O
Languages	O
like	O
Verilog	B-Language
and	O
VHDL	B-Language
.	O
</s>
