1. Homepage
  2. Exam
  3. [2021] COMP1411 Introduction to Computer Systems - Q4 Instruction Execution Performance

[2021] COMP1411 Introduction to Computer Systems - Q4 Instruction Execution Performance

This question has been solved
Engage in a Conversation

Question 4. [22 marks] CourseNana.COM

Given the sequence of assembly instructions (in the Y86-64 instruction set). CourseNana.COM

  CourseNana.COM

irmovq $-1, %rax CourseNana.COM

xorq %rax, %rax CourseNana.COM

rmmovq %rbx, 10(%rcx) CourseNana.COM

rmmovq %rax, 20(%rcx) CourseNana.COM

jg .L1 CourseNana.COM

rrmovq %rbx, %rax CourseNana.COM

ret CourseNana.COM

L1: CourseNana.COM

rmmovq %rax, (%rcx) CourseNana.COM

shalq $4, %rax CourseNana.COM

ret CourseNana.COM

  CourseNana.COM

The execution of each instruction will go through 6 stages: Fetch (F), Decode (D), Execute (E), Memory (M), Write-back (W), and PC-update (P). Any stage of a specific instruction can be executed only after the same stage of its immediately preceding instruction is finished. Assume there is no extra stalling for any stage of any instruction, and no instruction or data are cached. CourseNana.COM

  CourseNana.COM

If one instruction has operation in a stage, executing the stage takes some time; if otherwise the instruction has no operation in a stage, it still stays in this stage for a small amount of time, during which the next instruction cannot enter this stage. Assume that the instruction “ret” takes 0 time to execute. Assume the first instruction starts at time 0. CourseNana.COM

  CourseNana.COM

The time consumptions are listed in the following table. CourseNana.COM


Stages CourseNana.COM

F CourseNana.COM

D CourseNana.COM

E CourseNana.COM

M CourseNana.COM

W CourseNana.COM

P CourseNana.COM

Has operation CourseNana.COM

10 CourseNana.COM

2 CourseNana.COM

2 CourseNana.COM

12 CourseNana.COM

2 CourseNana.COM

1 CourseNana.COM

No operation CourseNana.COM

1 CourseNana.COM

1 CourseNana.COM

1 CourseNana.COM

1 CourseNana.COM

1 CourseNana.COM

1 CourseNana.COM

  CourseNana.COM

  CourseNana.COM

4(a) Compute the starting and end time of each executed instruction, and the time spent in each stage for each instruction. [16 marks] CourseNana.COM

Show details on your reasoning about the behavior of the instructions. CourseNana.COM

  CourseNana.COM

4(b) Identify and explain the main bottlenecks for the performance of instruction execution, and provide some technique that can be used to improve the performance. CourseNana.COM

[6 marks] CourseNana.COM

CourseNana.COM

Get the Solution to This Question

WeChat WeChat
Whatsapp WhatsApp
The Hong Kong Polytechnic University代写,COMP1411代写,Introduction to Computer Systems代写,Assembly Language代写,The Hong Kong Polytechnic University代编,COMP1411代编,Introduction to Computer Systems代编,Assembly Language代编,The Hong Kong Polytechnic University代考,COMP1411代考,Introduction to Computer Systems代考,Assembly Language代考,The Hong Kong Polytechnic Universityhelp,COMP1411help,Introduction to Computer Systemshelp,Assembly Languagehelp,The Hong Kong Polytechnic University作业代写,COMP1411作业代写,Introduction to Computer Systems作业代写,Assembly Language作业代写,The Hong Kong Polytechnic University编程代写,COMP1411编程代写,Introduction to Computer Systems编程代写,Assembly Language编程代写,The Hong Kong Polytechnic Universityprogramming help,COMP1411programming help,Introduction to Computer Systemsprogramming help,Assembly Languageprogramming help,The Hong Kong Polytechnic Universityassignment help,COMP1411assignment help,Introduction to Computer Systemsassignment help,Assembly Languageassignment help,The Hong Kong Polytechnic Universitysolution,COMP1411solution,Introduction to Computer Systemssolution,Assembly Languagesolution,