in CO and Architecture
1,333 views
1 vote
1 vote

Please clarify along with the names.

in CO and Architecture
1.3k views

1 comment

true = raw = 6

anti = war = 2

output= waw = 1

.

i am getting none of these...
0
0

4 Answers

2 votes
2 votes
RAW 5(I2-I3,I2-I4,I3-I4,I4-I5,I3-I6)

WAR 2(I1-I3,I3-I4)

WAW 1 (I2-I4)

3 Comments

Raw dependencies only to be counted in consecutive instructions
0
0
edited by
It is just made easy myth...that raw dependency can only counted in adjacent  instructions and also they have given all the answer key according to that but it not true
0
0
0
0
1 vote
1 vote

Answer : D) 1 and 3

Anti Data Dependency is caused when Instruction ‘J’ tries to Write the data before Instruction ‘I’ Reads it (Write-Before-Read

So we need to find where (O/p register of Inst. ‘J’) == (I/p register of Inst. ‘I’). Anti data dependency can be non adjacent. 

Here, $(I3-I1)$ creates Anti Data Dependency because $I3$ writes $R1$ before $I1$, if $I3$ will execute before $I1$. 

Hence $1$  Anti Data Dependency. 

True Data Dependency is caused when Instruction ‘J’ tries to Read the data before Instruction ‘I’ Writes it (Read-Before-Write

So we need to find where (I/p register of Inst. ‘J’) == (O/p register of Inst. ‘I’). True data dependency is always adjacent data dependency. 

Here, $(I2-I3)$ creates True Data Dependency because $I3$ reads $R2$ before $I2$, if $I3$ will execute before $I2$. 

Here, $(I3-I4)$ creates True Data Dependency because $I4$ reads $R1$ before $I3$, if $I4$ will execute before $I3$. 

Here, $(I4-I5)$ creates True Data Dependency because $I5$ reads $R2$ before $I4$, if $I5$ will execute before $I4$. 

Hence $3$ True Data Dependency. 

 

0 votes
0 votes

True dependency(read before write) =3.

True dependency means output of instruction i is same as input of instruction of i+1.( \ )

so.i2 and i3,i3 and i4 and i4 and i5 are true dependency.

Anti dependency(write before read)=1.

anti dependency means input of instruction i is same as  output of i+1.( / )

 

0 votes
0 votes

RAW Dependency (True) - 5

I-3 on I-2

I-4 on I-2

I-5 on I-4

I-4 on I-3

I-6 on I-3

WAR Dependency (anti) - 2

I-3 on I-1

I-4 on I-3

WAW Dependency (output) - 1

I-4 on I-2

edited by

Related questions