581305-6 Computer Organization
I
(toisella puolella suomeksi )
course examination 6.9.2002 (Open Univ.)
Write in each answer sheet your name, signature, id-number, course name,
and page nr/total nr of pages
- [12 p] Process.
- [2 p] Define concept prosessi. How does it differ from program?
- [2 p] What is the representation of a process is system? What data is
in it? Where is it located?
- [2 p] What is a system process? How does it differ from
ordinary process?
- [2 p] What happens in the system during process switch? What happens
to the previous process?
- [2 p] Give an example of a situation where process state changes from
"Running" to "Ready-to-Run"?
- [2 p] Give an example of a situation where process in state
"waiting" changes first to state "Ready-to-Run" and
then immediately to state "running".
- [12 p] Instruction execution.
- [2 p] How is ttk-91 instruction "ADD R2, VarX(R1)"
represented in memory?
- [4 p] What happens in the processor during machine instruction "ADD
R2, VarX(R1)" execution in different phases of the exection
cycle?
- [3 p] Define concept interrupt (exception). What type of
interrupts are there? How are interrupts handled in the processor?
- [3 p] What interrupts can occur during the execution of machine
instruction "ADD R2, VarX(R1)"?
- [12 p] Java
- [3 p] What is common in executing Java-programs with executing ttk-91
programs in Koksi simulator?
- [3 p] What is different in executing Java-programs with executing
ttk-91 programs in Koksi simulator?
- [3 p] What is Java Virtual Machine (JVM)? Why is it important?
- [3 p] How does JVM differ from ordinary processors (E.g., Intel
Pentium, IBM PowerPC, AMD Athlon)?
- [12 p] Implementation of subroutines/functions
- [3 p] How are subroutines implemented at machine language level? What
aspects are important in subroutine implementation?
- [1 p] What is special in implementing recursive subroutines?
- [4 p] Function Aver(A, B, C, D) returns as its value the average of
for integer values given to it as parameters.
The parameters are all call-by-value parameters. Give in Ttk-91
symbolic assembly language a program, that (i) reads four interger
values, (ii) computes the average of those values with function
Aver, and (iii) finally prints out the average.
- [4 p] Implement the function Aver(A, B, C, D) given in part (c) with
ttk-91 symbolic assembly language.
Follow the subroutine (function) implementation and call mechanism introduced
in lectures and in practice sessions.
TTK-91 assembly language instructions are: NOP, STORE, LOAD, IN, OUT, ADD, SUB,
MUL, DIV, MOD, AND, OR, XOR, SHL, SHR, COMP, JUMP, JNEG, JZER, JPOS, JNNEG,
JNZER, JNPOS, JLES, JEQU, JGRE, JNLES, JNEQU, JNGRE, CALL, EXIT, PUSH, POP,
PUSHR, POPR, SVC