Explain bernstein conditions for detection of parallelism, Computer Engineering

Assignment Help:

Bernstein Conditions for Detection of Parallelism

For execution of a number of instructions or a block of instructions in parallel, it must be made certain that instructions are independent of one another. These instructions may be control dependent / resource dependent / data dependent on one another. Here we think about just data dependency among the statements for taking decisions of parallel execution. A.J. Bernstein has elucidated the work of data dependency and derived a number of conditions based on that we can decide the parallelism of processes or instructions.

Bernstein conditions are derived from the subsequent two sets of variables:

i)  The Read set or we can say input set RI which consists of memory locations read by statement of instruction I1.

ii) The Write set or output set WI which consists of memory locations written into by instruction I1.

The sets WI and RI are not disjoint as the similar locations are used for reading and writing by SI.

The following are 'Bernstein Parallelism conditions' that are used to conclude whether statements are parallel or not:

1)  Locations in R1 from which S1 reads and locations W2 on which S2 writes should be mutually exclusive. Which means S1 doesn't read from any memory location on which S2 writes. It can be indicated as

  R1 ∩ W2= ?

2)  In the same way, locations in R2 from that S2 reads and the locations W1 on that S1 writes should be mutually exclusive. Which means S2 doesn't read from any memory location onto that S1 writes. It can be designated as: 

R2 ∩ W1= ?

3)  The memory locations W1 and W2, on that S1 and S2 write must not be read by S1 and S2. Which means R1 and R2 must be independent of W1 and W2.  It can be indicated as:

W1 ∩ W2= ?

To demonstrate the operation of Bernstein's conditions, think about subsequent instructions of sequential program:

I1: x = (a + b) / (a * b)

I2: y = (b + c) * d

I3: z = x2 + (a * e)

Now the read set and write set of I1, I2 and I3 are as follows:

R1 = {a, b}        W1 = {x}

R2 = {b, c, d}    W2 = {y}

R3 = {x, a, e}    W3 = {z}

Now let's find out whether I1 and I2 are parallel or not

            R1 ∩ W2 = ?

            R2 ∩ W1 = ?

            W1 ∩ W2 = ?

Which means I1 and I2 are independent of each other.

Similarly for I1 || I3,

R1 ∩ W3= ?

R3 ∩ W1 ≠ ?

W1 ∩ W3= ?

Therefore I1 and I3 aren't independent of each other.

For I2 || I3,


R2 ∩ W3= ?

            R3 ∩ W2= ?

W3 ∩ W2= ?

Therefore, I2 and I3 are independent of one another. So I1 and I2, I2 and I3 are parallelizable however I1 and I3 are not.


Related Discussions:- Explain bernstein conditions for detection of parallelism

The source to the current version, How do I update an existing copy of the ...

How do I update an existing copy of the source to the current version? Ans) As the common code changes, you might need to update your copy to have the lastest version. To do tha

Explain the necessary conditions for deadlock to occur, Explain the necessa...

Explain the necessary conditions for deadlock to occur. Conditions for deadlock to arise are: i. Mutual exclusion: At least one resource must be held in a non-sharable mo

Weight training calculations, Weight Training Calculations: However we...

Weight Training Calculations: However we have more weights in our network than in perceptrons but we firstly need to introduce the notation as: w ij just to specify the weigh

Rationales for an effective and independent regulator, Question: (a) W...

Question: (a) What are the rationales for an effective and independent regulator? (b) Across Africa, regulators have established Universal Service Funds (USFs) in order to

Future scope of the internet, Q. Future scope of the Internet? The futu...

Q. Future scope of the Internet? The future scope of the Internet, along with the World Wide Web (born in 1990), and the commercialization of the Internet are bound to grow exp

Find out if a particular file is available in a disk, Q. Find out if a part...

Q. Find out if a particular file is available in a disk in DOS? Sometimes you may like to find out if a particular file is available in a disk. In that case, you can identify t

PHB, Power pc h bus

Power pc h bus

Explain possible attacks on the wired equivalent privacy, Question : (a...

Question : (a) IEEE802.11 supports two types of network architecture, describe these architectures with the support of diagrams detailing the network components. (b) IEEE80

Performance of a parallel algorithm - number of processors, Factor which he...

Factor which helps in analysis of parallel algorithms is the total number of processors needed to deliver a solution to a provided problem. So for a given input of size let's say n

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd