data dependencyit indicates to the situation in


Data Dependency

It indicates to the situation in which two or more instructions share same data. The instructions in a program are able to be arranged based on relationship of data dependency. It means how two segments or instructions are data dependent on each other. The subsequent types of data dependencies are identified:

i)  Output dependence: When output of the two instructions I1 and I2 overlap on same data, the instructions are said output dependent.  

ii) I/O dependence: When read and write operations by two instructions are invoked on the same file, it's the condition of I/O dependence.

iii) Flow dependence: If instruction I2 follows I1 and output of I1 becomes input of I2, then I2 is said to be flow dependent on I1

iv) Anti dependence: When instruction I2 follows instruction I1 such that output of instruction I2 overlaps with the input of instruction I1 on the same data.

Think about the subsequent program instructions:

I1: a = b

I2: c = a + d

I3: a = c

In this program segment instructions I1 and I2 are Flow dependent since variable a is produced by instruction I1 as output and used by instruction I2 as input. Instructions I2 and I3 are Anti dependent since variable a is produced by I3 but used by I2 and in sequence I2 comes first. I3 is flow dependent on I2 due to variable c. Instructions I3 and Instruction I1 are Output dependent since variable a is produced by both instructions.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: data dependencyit indicates to the situation in
Reference No:- TGS0313303

Expected delivery within 24 Hours