• No results found

Computer Systems Exam 3 June 2013

N/A
N/A
Protected

Academic year: 2021

Share "Computer Systems Exam 3 June 2013"

Copied!
3
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Computer Systems Exam

3 June 2013

This is a closed book exam: no documentation is allowed.

Please make sure that your handwriting is readable!

Q1. Encode the following word using Hamming code (with even parity). The least significant bit is on the left.

0 0 1 1 0 1 1 0 0 1 0 0 0

Q2. What was the revolutionary idea that the Von Neumann architecture intro- duced?

Q3. Draw a digital logic circuit which implements the following truth table. You can use only basic gates: AND, OR, NOT.

Input A Input B Input C Output

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 0

1 1 0 1

1 1 1 0

Q4. What does this circuit do? Explain briefly how it works.

1

(2)

Q5. Give the Java statement (e.g., a=b+x) that was translated to the following IJVM code:

ILOAD a ILOAD b IADD BIPUSH 7 ISUB DUP IADD ISTORE x

Q6. Why are cache memories useful? What is the principle of their operation?

(no details, just the principle)

Q7. The Mic-1 micro-instructions use 9 bits to select the registers where a micro- instruction’s result must be stored, but only 4 bits to select the registers from which the operands must be read. Why?

Q8. What does the following micro-program do? Which IJVM instruction does it implement?

Main1 PC = PC + 1; fetch; goto (MBR) xxx1 MAR = SP = SP - 1; rd

xxx2

xxx3 TOS = MDR; goto Main1

Q9. In the Mic-1, registers can output their value only to one single bus. How is it possible for the ALU to perform operations with the values of two registers (e.g., additions)? Please explain.

Q10. What is the principle of pipelining? How does it improve performance?

Q11. What is DMA (Direct Memory Access)? Why is it desirable?

Q12. A computer executes the following program:

int main () { int a, b;

a = 8;

b = 4;

foo(a);

return 0;

}

void foo (int x) { int c = 5;

c = c+x;

}

Show the content of the stack while function foo() is executing (i.e., at line

“c=c+x;”).

Q13. What is the result of this reverse polish notation computation?

10 7 3 - 2 5 * + *

2

(3)

Q14. Draw the state-machine of a process (i.e., the diagram showing the possible states of a process, and the transitions among them).

Q15. A disk driver is using the Scan policy for ordering I/O requests. In the recent past it has received the following list of requests that it didn’t have time to serve:

• Read block 17

• Read block 85

• Read block 87

• Write block 92

• Read block 40

• Write block 98

• Write block 15

• Read block 5

The disk arm is currently in front of block 50. Give the order in which the disk driver will process these requests. If there are multiple possible answers, give the full list of correct answers.

Q16. Explain what is a race condition. What can be done about it?

Q17. What is Virtual Memory, and why is it useful? Explain the principle (not details).

Q18. Can you write a micro-program for the processor of your laptop at home? If yes, what kind of compiler do you need? If not, why not?

Q19. Explain (briefly) what is an “i-node”. What does an inode-based filesystem do to store very large files?

Q20. What is a memory-mapped device?

— the end —

3

Referenties

GERELATEERDE DOCUMENTEN

Draw the state-machine of a process (i.e., the diagram showing the possible states of a process, and the transitions among

(0.5 pt) The Mic-1 micro-instructions use 9 bits to select the registers where a micro-instruction’s result must be stored, but only 4 bits to select the registers from which

Process A copies data from one disk to another by alternately reading a large block of data from disk 1 and then writing it to disk 2.. Process B determines whether a very large

\marksthe{section}{hcontenti} Marks the hcontent i into the named mark register hsectioni in the same way as the ε-TEX primitive \marks: in particular the hcontent i is

Once the initial design is complete and fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.. Thus, I came to the

Judicial interventions (enforcement and sanctions) appear to be most often aimed at citizens and/or businesses and not at implementing bodies or ‘chain partners’.. One exception

In this paper it is shown that if the three round MD4 algorithm is stripped of its rst round, it is possible to nd for a given (initial) input value two di erent messages hashing

The teachers I can remember who made a difference were people who had three characteristics, which I would put to you as the characteristics of good teaching in the 20th century,