Computer Organization I, exam 13.6.2014                 suomeksiToisella puolella suomeksi  

Write in each answer sheat your name and signature, student id number, and course name.
It is sufficient to give 1-2 page answer to each question.
This is an ordinary separate exam and covers the whole course.
It works also as a renewal exam for course exam for the Spring 2014 guided self study course.
  1. [9 p] Data representation
    1. [3 p] Give the 16-bit twos complement Big-Endian representation for integer value -27.
    2. [3 p] Give the 8-bit ones complement Little-Endian representation for integer value -27.
    3. [3 p] Give the 32-bit IEEE floating point standard Big-Endian representation for floating point value +12.0.

  2. [9 p] Program and its execution in system
    1. [2 p] What is a process and what is its representation in the system?
    2. [3 p] Starting from a textual program code (e.g., Java, or C), how do you end up with an executable process from it?
    3. [2 p] What are the five process lifetime states. What does it mean when a process is in any of those states?
    4. [2 p] What are privileged processes, and how do they differ from user level processes? Why do you need them?
     
  3. [9 p] I/O implementation.
    1. [3 p] In which three types (ways) can one implement I/O? How do they work?
    2. [3 p] What advantages/disadvantages do different I/O implementation types as compared to each other? How do the devices using different I/O implementation types differ from each other at bus level (i.e., how do they use the bus)?
    3. [3 p] What is the most common I/O implementation type for disk I/O? Why would the other two types not be so good for this case?
     
  4. [9 p] Titokone, TitoTrainer and ttk-91. Subroutine Maxim (T, n, max, maxindex) returns in output parameters max and maxindex the value and the index of the largest element in n-element array T. Parameter n is call-by-value parameter and other parameters are call-by-reference parameters.
    Variables maxS and maxSi are defined at main program level, as well as 600-element array Salary.
    1. [5 p] Use the symbolic ttk-91 assembly language (by calling subroutine Maxim) to assign variables maxS and maxSi the value and the index of the largest element in Salary.
    2. [4 p] Use the symbolic ttk-91 assembly language to implement subroutine Maxim.

      Follow the recommended subroutine (function) call mechanism.

TTK-91 assembly language instructions are: NOP, STORE, LOAD, IN, OUT, ADD, SUB, MUL, DIV, MOD, AND, IR, XOR, SHL, SHR, COMP, JUMP, JNEG, JZER, JPOS, JNNEG, JNZER, JNPOS, JLES, JEQU, JGRE, JNLES, JNEQU, JNGRE, CALL, EXIT, PUSH, POP, PUSHR, POPR, SVC