in English Toisella puolella suomeksi

Computer Organization I, final exam 12.6.2009   

Write in each answer sheat your name and signature, student id number, course name and page nr. It is sufficient to give approximately one page answer to each question.
  1. [9 p] Data representation
    1. Name four different bit-level integer representations. Give 8-bit number -13 in each of them.
    2. What is the IEEE floating point standard? How is 4.0 represented in 32-bit IEEE floating point standard?
    3. What does the concept "Little Endian" representation mean? When does it matter? Give a concrete 32-bit example with integer 0x12345678 (hexadecimal presentation).

  2. [9 p] Process.
    1. What is process? How is it represented in operating system?
    2. Draw a state diagram of the five execution time states of a process. Tell the names of the states. Draw and explain state transitions between these states.
    3. Give two (2) esentially different cases, where process P transits from "in execution" state to another. Especially mention, who (which process) caused the transition and what happens in the system at each transition?

  3. [9 p] Java
    1. How is Java byte code executed by interpretation?
    2. How is Java byte code executed with compilation? How does the execution differ from the previous case?
    3. How is Java byte code executed with Java processors? How does the execution differ from the previous cases?
    4. How is Java byte code executed with JIT-compilation? How does the execution differ from the previous cases?
       
  4. [9 p]  Arrays and subroutines. Array TW[3,5] is a 2-dimensional integer-valued row-wise stored array, that contains 3 rows (rows 0-2) and 5 columns (columns 0-4). Integer variables i and j have been defined at the main program level.

    Assume also, that we have already defined and implemented subroutine MinMax( T, n, m, min, max), which will return the minimum and maximum values of input array T[n,m] in output parameters min and max. Parameter array T has n rows and m columns. Parameters n and m are call-by-value parameters and all the rest are call-by-reference parameters. Please note that you do not need to implement subroutine MinMax, because it is given.

    1. Give ttk-91 symbolic assembly language instructions that will print the value of array element TW[i,j].
    2. Assume now, that array TW is stored column-wise. Give ttk-91 symbolic assembly language instructions that will print the value of array element TW[i,j].
    3. Give ttk-91 symbolic assembly language instructions that will call subroutine MinMax to locate and print the smallest and largest values in array TW.
    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