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

Control hazard and delayed branching, Described Instruction or control haza...

Described Instruction or control hazard? Ans: The pipeline can be stalled due to delay in the availability of an instruction. For instance, this may be a result of a miss in t

Basic working of hard disk drive, Q. Basic working of Hard Disk Drive? ...

Q. Basic working of Hard Disk Drive? This is one of the components of today's personal computer having a capacity of order of quite a lot of Giga Bytes and above. A magnetic di

Risc architecture - computer architecture, RISC  architecture - computer a...

RISC  architecture - computer architecture: What is reduced regarding it? The answer of this question is that to make all instructions the equal length the number of bits that

Interconnection network, Interconnection Network Introduction Th...

Interconnection Network Introduction This unit discusses the types and properties of interconnection networks.  In multiprocessor systems, there are multiple I/O modules

Analysis of website, In this part you are required to review and critique a...

In this part you are required to review and critique a website of a café or a restaurant of your choice. Your report should be a minimum 500 words with a maximum of 1000 words. You

Change to palindrome, given a string S convert it to palindrome by doing ch...

given a string S convert it to palindrome by doing character replacement.convert S to palindrome with minimum character replacements

Production-centered virtual manufacturing, Production-Centered Virtual Manu...

Production-Centered Virtual Manufacturing It utilizes simulation ability to manufacturing process models along with the purpose of permitting inexpensive, fast evaluation of va

What is user defined functions, What is User Defined Functions? User-De...

What is User Defined Functions? User-Defined Functions permit defining its own T-SQL functions that can accept 0 or more parameters and return a single scalar data value or a t

Data alignment in arrays, Q. Data Alignment in Arrays? Arrays are align...

Q. Data Alignment in Arrays? Arrays are aligned to templates by ALIGN directive. ALIGN directive is used to align elements of various arrays with one another denoting that they

What is single program multiple data, Q. What is Single Program Multiple Da...

Q. What is Single Program Multiple Data? A general style of writing data parallel programs for MIMD computers is SPMD (single program, multiple data) means all processors execu

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