in CO and Architecture retagged by
1,935 views
0 votes
0 votes

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
I1 S1 S1 S2 S3 S4                                        
I2     S1 S2 S2 S2 S3 S3 S4 S4                              
I3       S1 S1 X S2 X S3 X S4 S4 S4                        
I4             S1 X S2 S2 S3 S3 X S4 S4                    
I1                 S1 S1 S2 X X S3 X S4                  
I2                     S1 X X S2 S2 S2 S3 S3 S4 S4          
I3                           S1 S1 X S2 X S3 X S4 S4 S4    
I4                                 S1 X S2 S2 S3 S3 X S4 S4

Given ans is 23 and my ans 25.Where i'm going wrong?

It is also gate previous year question :https://gateoverflow.in/1314/gate2009-28

in CO and Architecture retagged by
1.9k views

4 Comments

So 23 is best case but if it is for numericals then 25 should be the ans right and this kind of assumption is not possible without externally mentioning it?

and also can you give me some reference where to study the concept which you told now that is to consider best case,I couldn't get it in any textbook
0
0
@prajwal_bhat  he should describe what do s1 s2 s3 and s4 mean then only we will be able to know it.

Check my answer . Answer should be 23.
0
0

@Prajwal

Here is the same question https://gateoverflow.in/3690/gate2004-it-47

Here, your logic is right and even if you apply buffer logic, then also you will get same answer. 

2
2

1 Answer

2 votes
2 votes

23 clock cycle - Utilizing the stages ( best case )

According to Your Answer - 25

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
I1 S1 S1 S2 S3 S4                                        
I2     S1 S2 S2 S2 S3 S3 S4 S4                              
I3       S1 S1 X S2 X S3 X S4 S4 S4                        
I4             S1 X S2 S2 S3 S3 X S4 S4                    
I1                 S1 S1 S2 X X S3 X S4                  
I2                     S1 X X S2 S2 S2 S3 S3 S4 S4          
I3                           S1 S1 X S2 X S3 X S4 S4 S4    
I4                                 S1 X S2 S2 S3 S3 X S4 S4

 Here S2 of I2 may begin at clock 12 becase no instruction is using S2.   Here it is not needed  to create any stalls because he has not mentined anything about stages. ie,  whether s2 is doing what type of  operations . So we shoudn't be bothered about buffer contents . Here he is interested in only finding the clock cycles in beast case .  That is why 25 cannont be the answer

edited by
by

4 Comments

@pC no in gate question it is asked completion time of all instructions not just I2

https://gateoverflow.in/1314/gate2009-28

0
0

Oh yeah :) I  mistook the question with https://gateoverflow.in/3690/gate2004-it-47 .
It is true untill mentioned anything we cannt assume anything . Like @kapil said  But it is common practice to go with the best case. But still it is argumentable . This is what I thinks.
 

Downvotes are part of the game . Nowadays I was not bothered about that :D . If u guys could point out what is wrong with our discussion we could improve ourself :(

2
2
@pC Yes, your method and chooing the best case method both will give same answer there.
2
2

Related questions

1 vote
1 vote
0 answers
2
Sukhdip Singh asked in Calculus Jan 29, 2018
188 views
Sukhdip Singh asked in Calculus Jan 29, 2018
188 views