581305-6 Computer Organization I, 2 ov, final exam 27.3.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] Data representation
Give separately Big Endian ja Little Endian
16-bit representations for decimal
numbers +23 and -75 in a machine
that uses
signed
two's complement
one's complement
biased by 32767 (Note that 32767=215-1)
integer representations.
Assume now that we have the most common
Big Endian byte order.
What floating point value
corresponds to 32-bit IEEE standard
(8 bit exponent) representation 0x41300000?
(Prefix "0x" means that the number after that
is in hexadesimal notation)
The tkk-91 machine has
no floating point instructions.
Can one do floating point arithmetics with ttk-91?
If "yes", then how? If "no", then why not?
Ttk-91 integer instructions are there
for integer computations.
What happens if one tries to use them add
together a machine instruction and an integer value,
for example with the following instructions:
LOOP LOAD R1, LOOP
ADD R1, =1
STORE R1, LOOP
If this leads to an error situation, explain that
situation.
If this does not lead to an error situation,
explain what happens.
[15 p] Virtual memory
Why does virtual memory exist?
What problem does it solve?
How does paging virtual memory basically work?
What does the concept "page fault" mean
and what happens in the system with a page fault?
What is TLB and why is it needed?
What does the concept "TLB miss" mean
and what happens in the system with a TLB miss?
Give a machine language level example
on a situation where a TLB miss occurs but
a page fault does not.
Give a detailed explanation on which part of instruction
execution the TLB miss occurs, and and explanation on
why there is no page fault in this case.
Give a machine language level example
on a situation where a page fault occurs but
a TLB miss does not.
Give a detailed explanation on which part of instruction
execution the page fault occurs, and and explanation on
why there is no TLB miss in this case.
[15 p] Program execution
How does a processor execute
machine language programs?
What types of events cause disruptions to
the normal order of instruction execution?
How are these disruptions handled?
How does the handling of these exceptional
situations relate to subroutine call and
subroutine returns? Differences/similarities?
[15 p] Ttk-91 assembly language programming
We have a 2-dimensional
integer array T[4,6] defined at main program level.
I.e., the array has 4 words (rows 0,...,3)
and 6 colums (columns 0,...,5).
Integer variables
i and j have been defined on the main program level.
Give assembly language instructions to
print the value of element T[i,j].
Give assembly language instructions to
print the sum of elements at row i.
Write integer function RowSum(Tbl, iRow),
that returns as its value
the sum of elements at row iRow in array Tbl.
Array Tbl has the same type as array T
and it is passed as a call-by-reference parameter.
Parameter iRow is passed as a call-by-value parameter.