logo

Crowdly

Browser

Додати до Chrome

CA & OS (Computer Architecture) - EFREI - Fall 2026

Шукаєте відповіді та рішення тестів для CA & OS (Computer Architecture) - EFREI - Fall 2026? Перегляньте нашу велику колекцію перевірених відповідей для CA & OS (Computer Architecture) - EFREI - Fall 2026 в moodle.lab.ii.agh.edu.pl.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Extending the program

Insert another 9 dadd r1,r0,r1 instructions just after first dadd instruction of the sample program. 

After this you should have a total 10 dadd r1,r0,r1 instructions in your program. 

Execute modified program.

Write down into the box below the nMOD value which is the number of the clock cycles used for the execution of modified program. Be sure that forwarding mechanism is active (Configure->Enable forwarding option is active)

Переглянути це питання

In this section, you will evaluate how long it takes to execute different types of the instructions of the MIPS computer.

Number of clock cycles for dadd instruction (integer addition)

Load and execute in step mode following program:

        .text

main:    dadd

r1,r0,r1 ; r1 = r0+r1 

         nop

 

       halt

As a result of the execution you should receive clock cycle diagram of the execution similar to this on the image:

Clock cycle diagram foo dadd insdtruction.

Analyze this clock cycle diagram of execution of the program and answer the question: 

How many clock cycles does the execution of the instruction dadd r1,r0,r1 take (each box in clock cycle diagram represents one clock tick )?

❌
❌
❌
✅
Переглянути це питання

A MIPS CPU executes the following code:

ld f,A(r0)

ld f2,B(r0)

nop

divd f3,f1,f2

divd f4,f1,f2

In such a case the CPU may have to deal with:

❌
❌
❌
✅
❌
Переглянути це питання

Consider a processor in which the execution of each instruction is

divided into 6 phases.  What will be the

theoretical maximum speedup of program execution if the processor's

instructions can be executed in a pipeline?

❌
❌
❌
✅
Переглянути це питання

Un processeur MIPS exécute le code suivant :

ld f,A(r0)

ld f2,B(r0)

nop

divd f3,f1,f2

divd f4,f1,f2

In such a case the CPU may have to deal with:

0%
0%
0%
0%
0%
Переглянути це питання

Le programme utilisateur se compose de 25 instructions, chacune étant exécutée en 2 cycles d'horloge, et de 10 instructions, chacune étant exécutée en 5 cycles d'horloge.

Le nombre moyen de cycles par instruction ( CPI ) pour ce programme est :

0%
0%
100%
0%
Переглянути це питання
Maîtriser les risques

Les aléas de contrôle sont principalement liés à l'exécution par le processeur d'instructions de saut (inconditionnelles ou conditionnelles). Pour observer le comportement du pipeline lors de l'exécution d'instructions de saut, le programme suivant sera utilisé :

;WinMIPS64 control hazard

; just simple for loop in MIPS asm

    .data

n:    .word 3

res:    .word 0

    

    .text

main:    

    xor r16,r16,r16    ; r16 = 0 loop counter

    xor r2,r2,r2    ; r2 = 0

    

    lw r17, n(r0) ; number of loop executions

    nop ; must be here to avoid RAW with next instr.

    

start_loop:    

    dsub r9, r16, r17 ; $t1= r9

    nop  ; must be here to avoid RAW with next instr.

    beq r9, r0, end_loop    ; branch if equal -> if (r9 == (r0=0)) go to end_loop

    

    # code block

    daddi r2,r2,2

    dsub r2,r2,r0   ; r0 always contains 0

    daddi r16,r16,1 ; loop counter increment

    j start_loop

end_loop:    

    sw r2,res(r0)

    syscall 0

Trouvez la partie du diagramme du cycle d'horloge qui illustre la première exécution de l' instruction  beqz r9, end_loop

. Analysez-la et répondez aux questions.

Quelle instruction est récupérée ensuite (entre dans la phase IF sur le diagramme du cycle d'horloge) ?

0%
100%
0%
0%
Переглянути це питання

Quelle instruction est exécutée ensuite beq r9, r0, end_loop(entrée dans la phase EX sur le diagramme du cycle d'horloge) ?

0%
0%
100%
0%
Переглянути це питання

Si l'exécution de l'instruction est suspendue (la réponse à la question précédente était VRAIE), comment la suspension peut-elle être expliquée ?

Переглянути це питання
Risque de guerre

Ce type d'aléa peut survenir lorsque l'instruction suivante (j) stocke le résultat de son exécution dans la ressource (registre ou emplacement mémoire) utilisée comme argument par l'instruction précédente (i). Le problème apparaît lorsque l'exécution de l'instruction précédente (i) est retardée et que l'instruction suivante (j) se termine avant que l'instruction précédente (i) puisse recevoir son argument. Cela peut entraîner un résultat erroné pour l'instruction (i). La méthode classique pour supprimer cette dépendance consiste à retarder l'exécution de l'instruction (j) jusqu'à la fin de l'exécution de l'instruction (i). 

Pour illustrer ce problème, le code suivant sera utilisé :

;WinMIPS64 WAR hazard example

    .data

A:    .double 10.0

B:    .double 5.0

C:    .double 3.5

D:    .double 1.0

E:    .double 3.14.0

res:    .double 0.0

    

    .text

main:    

    LDC1 f2,A(r0)

    LDC1 f3,B(r0)

    LDC1 f4,C(r0)

    LDC1 f5,D(r0)

    LDC1 f6,E(r0)

    

    add.d f2,f2,f3

    sub.d f2,f2,f4

    mul.d f4,f5,f6

    

    SDC1 f2,res(r0)

    syscall 0

Activez le mécanisme de transfert de données et exécutez le programme d'exemple.

Analysez le diagramme du cycle d'horloge et identifiez l'instruction provoquant le blocage WAR .  

Marquez l'instruction qui provoque le blocage de WAR.

0%
0%
0%
0%
100%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.lab.ii.agh.edu.pl?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome