Computer Organization I, Spring 2011, Exercise 3

You are expected to (try to) solve the problems on your own or with your study team before the meeting.

The problems are partially covered in in web lecture 4, which is the last English lecture.
Book Chapters 3.2, 9.2, 9.4 and possibly some others cover the rest.

Problems:

  1. Memory references and interrupts
    1. How many memory references is needed to run machine instruction "STORE R1, @5(R2)"? What are they?
    2. How many memory references is needed to run machine instruction "ADD R4, R5"? What are they?
    3. How are interrupts implemented in the processor? What happens after the interrrupt is processed?
    4. Assume that certain application requires its own interrupt handler to be invoked with certain interrrupts. How would one implement this in practice at machine instruction level, i.e., how does one select just that interrupt handler with certain interrupts when this application is running?
    5. Give an example on a situation where it would be good to disable interrupt handling? How is this done at processor level? What happens if interrupts are disabled for very long time?
  2. Execution of instructions
    1. Why in the beginning or just before instruction execution phase the value of program counter (PC), also called as instruction pointer, is incremented? What would happen, if the increment would not happen?
    2. Describe on register level (PC, MAR, Rx, ...) how processor does the instruction fetch and execution of the following instructions:
      • STORE R1, A
      • JUMP R5
      • CALL SP, Avg
      • SVC SP, =HALT
  3. You need to pass a table as a parameter to a subroutine (function, method, procedure). How can you do that on the machine instruction or assembly language, when you need to pass the table as
    1. value parameter
    2. reference parameter
    (A detailed explanation of the principle is enough. You need not write the code itself.)
  4. Do level B TitoTrainer problems b-120, b-150, b-350 and b-370.
    (If you want, you may do all other level b TitoTrainer problems)


Tiina.Niklander@cs.helsinki.fi