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.
- [9 p] Program, processor and system
- In what form is the program in execution seen by the processor?
- How is the program in execution executed by the processor?
- In what form is the program in execution seen by the operating system?
- How is the program in execution executed by the operating system?
- [9 p] Processor privileged execution mode.
- What is privileged execution mode and what is it used for?
- How does the privileged execution mode differ from the (normal) user mode? Give two machine language examples.
- When and how is the execution mode changed from user mode to privileged mode?
- When and how is the execution mode changed from privileged mode to user mode?
- [9 p] Java
- How is Java byte code executed by interpretation? What processes are involved and when?
- How is Java byte code executed with compilation? How does the execution differ from the previous case? What processes are involved and when?
- How is Java byte code executed with Java processors? How does the execution differ from the previous cases? What processes are involved and when?
- How is Java byte code executed with JIT-compilation? How does the execution differ from the previous cases? What processes are involved and when?
- [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.
- Use symbolic ttk-91 assembly language to implement assignment statement x = t[5][3].
- Use symbolic ttk-91 assembly language to implement assignment statement x = t[i][j].
- 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