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

Device controllers, All components of computer communicate with processor b...

All components of computer communicate with processor by the system bus. Which means I/O devices required to be attached to system bus. But I/O devices aren't connected directly to

How do you find out the flaw, How do you find out the flaw, which of the ad...

How do you find out the flaw, which of the address getting written wrongly. Fill the full memory once with either random data or sequential data then after filling totally rea

Gantt chart and kiviat diagram, Q. What is Gantt chart and Kiviat diagram? ...

Q. What is Gantt chart and Kiviat diagram? Gantt chart: Gantt chart explains numerous activities of every processor with respect to progress in time in busy -overhead - id

How e-commerce website works, Procedure The only difference between e-...

Procedure The only difference between e-commerce and conventional commerce is that goods in e-commerce are purchased over the internet using a credit card. Also buying and sel

What is floppy drives, Q. What is Floppy Drives? Disks used with a flop...

Q. What is Floppy Drives? Disks used with a floppy disk drive are small removable disks fabricated of plastic coated with magnetic recording material. Disk rotates at 360RPM. F

Use of parallel construct with private clause, Q. Use of parallel construct...

Q. Use of parallel construct with private clause? In this example we would see use of parallel construct with private and firstprivate clauses. At end of program i and j remain

use and benefits of object-oriented programming, The Chocolate Delights Ca...

The Chocolate Delights Candy Company requires to add the following functionality to its cash register: When a customer is checking out, the cash register requires keeping the ne

Pseudocode, 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

Printers, Printers are devices which put ink on paper in a controlled manne...

Printers are devices which put ink on paper in a controlled manner. They manually produce photographic images orreadable text. Printers have gone through a large transition in tech

what is polymorphism in c++, Polymorphism in C++ is the idea that a base c...

Polymorphism in C++ is the idea that a base class can be inherited by various classes. A base class pointer can point to its child class and a base class array can store dissimilar

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