Home » Computer Organization and Architecture » Computer organization and architecture miscellaneous » Question

Computer organization and architecture miscellaneous

Computer Organization and Architecture

  1. Consider a 4 stage pipeline processor. The number of cycles needed by the four instructions I1, I2 , I3 , I4 in stages S1 , S2 , S3 , S4 is shown below.

    What is the number of cycles needed to execute the following loop ?
    For (i = 1 to 2) {I1; I2; I3; I4;}
    1. 16
    2. 23
    3. 28
    4. 30
Correct Option: B

Here bound of the loop are constants, therefore compiler will do the loop un rolling (if compiler won't then prefetcher will do) to increase the instruction level parallelism. And after loop unrolling 23 cycles are required for execution. Therefore option (b) is the correct answer.



Your comments will be displayed only after manual approval.