cs313-2005-t1-final (1)

cs313-2005-t1-final (1) - CPSC 313 05w Term 1 Final Exam...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CPSC 313, 05w Term 1— Final Exam Date: December 12, 2005; Instructor: Mike Feeley This is a closed book exam; no notes; you may use calculators to perform simple arithmetic calculations. Pages of potentially useful notes appear at the end of the exam. Answer in the space provided; use the backs of pages if needed. There are 10 questions on 10 pages, totaling 100 marks. You have 3 hours to complete the exam. NAME: STUDENT NUMBER: SCORE: / 100 1. (20 marks) Short answers. 1a. List one difference between an object file produced by the compiler or assembler and an executable file produced by the static linker. 1b. Carefully describe the single difference between an x86 call and jmp instruction. 1c. Why does the x86 use two registers to point to positions on the runtime stack? Why not just one? 1d. List one advantage of separating reading from the register file and writing to the register file into different pipeline stages as we have done, with the read coming in the second stage and the write coming in the last stage. 1e. List one disadvantage of separating register-file access this way in the pipeline. / 20
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
1f. If a pipelined processor has stage delays of 10, 100 and 50 ns (including pipeline-memory delays), what is its maximum clock frequency (just give the formula, don’t do the math)? 1g. Explain, by referencing parts of a C program, what is stored in each of the following three sections of an object file. .text .data .bss 1h. What object-file section does the static linker use to locate positions in the code of an object file where it should write virtual addresses? 1i. Why does it make sense to use random replacement for hardware data caches (e.g., L1 and L2), but use an LRU approximation for virtual-memory replacement. 1j. What, specifically, about caches is designed to improve the performance of programs the exhibit spatial locality? / 0
Background image of page 2
2. (12 marks) Give an assembly-language translation for each of the following pieces of C code. Do not assume that the variable values are stored in registers or that the assignments need only store to a register. Give assembly language only for the C statements that are listed. Other stuff has been omitted from the C;
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 10

cs313-2005-t1-final (1) - CPSC 313 05w Term 1 Final Exam...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online