in English Toisella puolella suomeksi

Computer Organization I, final exam 17.4.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] Program, processor and system
    1. In what form is the program in execution seen by the processor?
    2. How is the program in execution executed by the processor?
    3. In what form is the program in execution seen by the operating system?
    4. How is the program in execution executed by the operating system?
       
  2. [9 p] Processor privileged execution mode.
    1. What is privileged execution mode and what is it used for?
    2. How does the privileged execution mode differ from the (normal) user mode? Give two machine language examples.
    3. When and how is the execution mode changed from user mode to privileged mode?
    4. When and how is the execution mode changed from privileged mode to user mode?
       
  3. [9 p] Java
    1. How is Java byte code executed by interpretation? What processes are involved and when?
    2. How is Java byte code executed with compilation? How does the execution differ from the previous case? What processes are involved and when?
    3. How is Java byte code executed with Java processors? How does the execution differ from the previous cases? What processes are involved and when?
    4. How is Java byte code executed with JIT-compilation? How does the execution differ from the previous cases? What processes are involved and when?
       
  4. [9 p]  Ttk-91, Titokone and TitoTrainer. Two-dimensional array t[7][8] is defined at main program level. So, array t has 7 rows (rows 0-6) and 8 columns (columns 0-7). Array t is stored in row-wise order. Variables i, j and x are defined at main program level. You may assume that i's value is within range 0-6 and that j's value is within range 0-7.
    1. Use symbolic ttk-91 assembly language to implement assignment statement x = t[5][3].
    2. Use symbolic ttk-91 assembly language to implement assignment statement x = t[i][j].
    3. Assume now that array t is stored in column-wise order. Use symbolic ttk-91 assembly language to implement assignment statement x = t[i][j].


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