Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Briefly explain the differences between the following pairs of con - cepts: ( i ) Compiler vs . Interpreter ( 2 ) ( ii )

Briefly explain the differences between the following pairs of con-
cepts:
(i) Compiler vs. Interpreter (2)
(ii) Single-pass vs. Multi-pass compiler (2)
(iii) Local vs. Global Code Optimisation (2)
(iv) Stack vs. Heap storage (in memory organisation)(2)
(b) You are given a function myfun(int a) which takes one (integer)
parameter a. A call x := myfun(3+2) is made where x is stored
in register $s0.
(i) Describe how the above function call is made when arguments
are passed using stack-based parameter passing. (4)
(ii) Describe how the above function call is made when arguments
are passed using register-based parameter passing in the MIPS
architecture. (4)
(c) You are performing register allocation on a program, and from live-
ness analysis the following interference graph is created:
a b
c d
Assume we have 3 free registers to use. Explain how to allocate
registers by graph colouring and use graph colouring to give a valid
allocation of a, b, c and d to registers $s1, $s2 and $s3. Explain what
will happen if you try graph colouring with only 2 registers.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

What is the physical address of letter "L"? 24 17 28 21

Answered: 1 week ago

Question

KEY QUESTION Refer to the table in question

Answered: 1 week ago