(1) This exam is closed book, closed notes, and
closed neighbor.
(2) You have 110 minutes to
complete this exam. If you finish early,
you may turn in your exam at the front of the room and leave. However if you finish during the last ten
minutes of the exam please remain seated until the end of the exam so you don't
disturb others.
(3) Write all answers on the
exam. If you need additional paper, I
will provide it. Make sure your name is on any additional sheets.
(4) Partial
credit will be given for most questions assuming I can figure out what you were
doing.
(5) Please
write neatly. Print your answers if your handwriting is hard to read. If you write something, and wish to cross it
out, simply put an X through it. Please
indicate if your answer continues onto another page.
Question
|
Possible
|
Score
|
1
|
25
|
|
2
|
25
|
|
3
|
35
|
|
4
|
20
|
|
5
|
15
|
|
6
|
15
|
|
7
|
15
|
|
Total
|
150
|
|
1.)
(25 points) Define (or explain) the following
terms:
a)
Physical security
b)
Encapsulation
c)
Virtual Address
d)
Computer Virus
e)
Routing
2.)
(25 points) Memory Systems
On the IA-32 processor (aka x86),
pages are 4KB and a two level page table (page directory and page table) is
used to access up to 4GB of memory.
Also, entries in the page directory may refer to super-pages which are
single pages as large as is reachable from all of the pages in one full page
table.
a)
If only regular size pages are used and the TLB
contains 64 entries, what is the maximum number of different bytes of memory
that can be accessed without a TLB miss?
b)
If super pages are used, how many different
bytes of memory can be accessed without a miss in a 64 entry TLB?
c)
Consider a virtual memory system such that a
memory access takes 100ns if the page is in memory, takes 10msec if there is a
page fault and there is a clean page to replace it with, and 20msec if there is
a page fault and only dirty pages are available. If the probability of a page fault is 2 x 10-5,
and on any given page fault, the probability of there only being a dirty page
available is ¼ what is the effective access time to memory?
3.)
(35 Points) Synchronization: Use binary
semaphores to implement a solution to the standard readers/writers problem (i.e.
readers preferred) that allows either a single writer or at most five
readers at a time. Show all variable and semaphore declarations and initial
values.
Declarations
Reader
Writer
4.)
(20
Points) The GeekOS file-system currently allows for a single file on one disk
and that the file is at most a few GB.
List three things that would need to be changed to allow a single file
to be up to 10 TB and to allow blocks for that single file to be stored on
multiple disk drives.
5.)
(15 points) System Calls
a)
When passing a pointer as a parameter to a
system call, the kernel needs to carefully check it to make sure its valid,
why?
b)
System calls generally don’t return points to
data structures, why?
6.)
(15 points) Encryption
a)
When using public key encryption, why might
someone want to publish their encryption key, but keep their decryption key
private?
b)
When using public key encryption, why might
someone want to publish their decryption key, but keep their encryption key
private?
c)
Given the flexibility of public key encryption,
why might a given system also use private key encryption?
7.)
(15 points) Explain how you unified console
(keyboard and screen) I/O with file I/O in your project #6. What data structures changed? How did you
know if a given I/O was for a file or for the console?