Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
9Activity
0 of .
Results for:
No results containing your search query
P. 1
Parallelism in Algorithms- Bernstein's Conditions

Parallelism in Algorithms- Bernstein's Conditions

Ratings:

3.0

(1)
|Views: 2,023|Likes:
Published by BravoYusuf
A very useful document about detection of parallelism in sequential algorithms- Bernstein's Conditions
A very useful document about detection of parallelism in sequential algorithms- Bernstein's Conditions

More info:

Published by: BravoYusuf on Apr 22, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/06/2014

pdf

text

original

 
CS-421 Parallel Processing BE (CIS) Batch 2004-05Handout_12
Page - 1 - of 2
Parallelism in Algorithms – Bernstein’s Conditions
One way to detect parallelism in a sequential algorithm is to look for operations that can becarried out independently of each other.Let, I(s) = input set of statement
1
 
s
i.e. the set of all variables read by s and O(s) = output set of statement
s
i.e. the set of all variables written by sTwo statements
S
i
and
S
 j
are (data) independent if ALL of the following conditions hold:
I(S
 j
)
O(S
i
) =
Φ
flow independenceO(S
i
) 
 O(S
 j
) = 
Φ
 output independence I(S
i
) 
 O(S
 j
) = 
Φ
 anti independence 
That is, two statements
S
i
 
and
S
 j
can be executed in parallel (denoted
S
i
||
S
 j
) if [
I(S
 j
)
O(S
i
)] U[O(S
i
)
O(S
 j
)] U [I(S
i
)
O(S
 j
)] =
Φ
 These are called
 Bernstein’s conditions
and may be seen at different levels of granularity. Forexample, S may be machine-level operations, may be entire procedures or just machineinstructions.In general, a set of statements (processes) S
1,
S
2, …,
S
can execute in parallel if Bernstein’sconditions are satisfied on pair-wise basis i.e. S
1
 // S
2
// … // S
iff 
S
i
 // S
 j
i
 j
Properties of 
 Parallelism // 
Operator
 
 // is commutative i.e., S
i
 // S
 j
S
 j
 // S
i
 
 
 // is NOT transitive i.e., S
i
 // S
 j
& S
 j
 // S
doesn’t imply S
i
 // S
 These dependences are usually portrayed in the form of a
data-dependence graph
. This is adirected graph having as many nodes as there are procedures (or statements, depending upon thegranularity of the data dependence analysis).
e.g. 1
s
1
:A:= x + B;s
2
: C :=A* 3;s
2
is
flow dependent
 on s
1
 indicated by an arrowdirected from s
1
to s
2
.
e.g. 2
s
1
:A:= x + B;s
2
:A:= 3;s
2
is
output
 
dependent
ons
1
indicated by an arrowdirected from s
1
to s
2
witha small circle anywhere onthe arrow.
e.g. 3
s
1
: B :=A+ 3;s
2
:A:= 3;s
2
is
anti dependent
on s
1
 indicated by an arrowdirected from s
1
to s
2
witha small line across thearrow.
 
1
Here
statement 
is used in quite a general sense in this handout and it can stand for procedure,process, instruction, etc, whatever be the level of granularity of data dependence analysis asexplained in the class.

Activity (9)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
renjoooz liked this
Gaurav Singh liked this
Haroon Yahya liked this
Yvonne Sanchez liked this
Arnab Ghoshal liked this
Swarvanu Medda liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->