581305-6 Computer Organization I, 2 ov, final exam 26.1.2001
(toisella puolella suomeksi
)
Write in each answer sheet:
your name and signature, id-number,
course name, and page nr/total nr of pages
- [15 p] Interrupts (trap, exception, ...)
- Give four different types of interrupts?
Explain what is special in each type?
- How is an interrupt visible to the program in execution?
- How is an interrupt visible to the processor?
- How are interrupts processed?
- Why can one disable interrupts? Give an example.
- If an interrupt occurs when interrupts are disabled, how is such
interrupt handled?
- [15 p] Data representation
- [5 p] How does the system know whether some memory location
contains an integer number, floating point number or a machine instruction?
What happens, if during an integer add instruction one encounters
a floating point value in one of the argument registers?
- [5 p] Assume that the processor has no representation for
truth values (boolean),
I.e., it has no machine instructions using boolean data types.
However, Java language has a boolean data type with
domain {true, false}, and it is especially stated that
Java's boolean is not Java's integer
and Java's integer is not Java's boolean.
Can this processor be used to execute Java programs?
If the answer is yes, then how?
If the answer is no, then why not?
- [5 p] Assume that Hamming code (even parity) is used to secure 8-bit
internal data path.
How many parity bits are needed (in addition to 8 data bits)
for error correcting Hamming code?
Give an example for parity bit locations and their values when
one transfers 8-bit byte
0111 0101 ('u').
What would happen in the system, if the 4th bit from left
in this byte would flip on the way and the byte would arrive as
0110 0101 ('e')?
- [15 p] Memory hierarchy
- Which problem does the cache memory solve?
How is the solution implemented?
How can application programmer best influence
the proper operation of this solution?
What do the words "hit" and "miss" mean in this context
and what is the cost of a miss?
- Which problem does the virtual memory solve?
How is the solution implemented?
How can application programmer best influence
the proper operation of this solution?
What do the words "hit" and "miss" mean in this context
and what is the cost of a miss?
- Which problem does the Translation Lookaside Buffer (TLB) solve?
How is the solution implemented?
How can application programmer best influence
the proper operation of this solution?
What do the words "hit" and "miss" mean in this context
and what is the cost of a miss?
- [15 p] Assembly language programming
We need an integer valued function int FindMin (var int Arr, int N).
Function FindMin has two parameters:
integer array Arr and
the number of elements N in that array.
Function returns the value of smallest element in array Arr.
Parameter N is call-by-value and
parameter Arr is call-by-reference.
Function is implemented with
customary subroutine (function) implementation and call mechanism.
- [6 p] Using ttk-91 symbolic assembly language
implement the function FindMin described above.
- [5 p] Give ttk-91 symbolic assembly language instructions
to print the value of smallest element in 35 element array
Speed.
- [4 p] How should one modify function FindMin, if one would want it to return
the address of the smallest element instead of its value?
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, LEQU, JGRE, LNLES, LNEQU, NGRE, CALL, EXIT,
PUSH, POP, PUSHR, POPR, SVC