581305-6 Computer Organization I, 2 ov, course exam 17.12.2001
(toisella puolella suomeksi )
Write in each answer sheet: your name and signature, id-number, course
name, and page nr/total nr of pages
[12 p] Process.
[2 p] Define concept prosess. How does it differ from program?
[2 p] What is the representation of a process in the system?
[2 p] What is an operating system process? How does it differ
from ordinary process?
[2 p] What happens in the system at process switch? What happens to
the previous process?
[2 p] Give an example on an occasion when a process in running state
is transferred to ready-to-run state.
[2 p] Give an example on an occasion when a process in waiting state
is transferred first to ready-to-run state and then immediately
to running state.
[12 p] Machine instruction execution.
[2 p] Define concept instruction execution cycle. What
phases belong to it?
[4 p] What happens at the processor in different instruction execution
cycle phases when instruction "ADD R5, =345" is
executed?
[3 p] Define concept exception (interrupt). What type exceptions
are there? How are exeptions handled in the processor?
[3 p] Define concept priviledged state (supervisor state). How
does it affect instruction execution?
[12 p] Java. Assume that program MyProg is written in Java and that it
will be executed in the system with interpretation.
[2 p] What needs to be done for program MyProg before the actual
execution begins? In what form is MyProgs representated during execution
time and how is that representation achieved?
[2 p] How does program MyProg's execution finally occur at execution
time? Which process (processes) known by the operating system is
executed during program MyProg execution?
[2 p] Some people claim that executing Java programs with
interpretation is slower that executing similar compiled C-programs in
that same environment. Give a answer with good reasoning to this claim.
[2 p] How does the situation to cases (a) and (b) change, if
JIT-compilation is used?
[2 p] How does the situation to cases (a) and (b) change, if
Java-processor is used?
[2 p] How does the situation to cases (a) and (b) differ from the case
where your program would be written in C and it would be executed in the
"normal way"?
[12 p] Activation records. TTK-91 machine subroutines are
implemented with activation records.
[3 p] Define concept activation record. What information and
fields does it have?
[2 p] Which fields in activation record are used in the actual body of
the subroutine and how are they referred to?
[2 p] Define concept activation record stack.
[3 p] When and how is a new activation record stored to the activation
record stack? How many machine instructions does it take?
[2 p] When and how is an activation record removed from the activation
record stack? How many machine instructions does it take?
Follow the subroutine (function) implementation and call mechanism
introduced in lectures and in practice sessions. Use a descriptive
and comprehensive example in you answers to all cases.