Computer Science 414—Operating Systems



Computer Science 414—Operating Systems

Final Exam, due Thursday, 5/12/05, 1pm

Time limit: Four hours

(You must upload your answers within four hours from the time you fill out the web form to receive the link to the test)

▪ Upload your completed exam to the Toolkit as an assignment. You will find “Final exam” listed as an assignment. Your upload must be in either .txt, .pdf, .ps, or .doc format.

▪ The questions are of equal weight, but the individual parts are not. If you are stuck on a problem, don’t waste time. Move on and come back to it later.

▪ This is an open-book, open-notes exam. You may also use other OS textbooks, e.g. Silberschatz et al. However, you may not use any other resources, such as other books, the Web, email, etc. You also may not refer to prior 414 tests or solutions (even if you made your own copy of them) once you start the test. You must of course work the test individually, and cannot discuss the test with anyone until after the deadline has passed.

▪ Show your work for partial credit. But do not “kitchen sink” – incorrect statements, even if irrelevant or extraneous, will be held against you!

▪ In any question, make any assumptions that you need to, but document your assumptions.

Time limit: Four hours

NAME

PLEDGE (Write out pledge in full. Append your name as a binding signature.):

This page intentionally left blank

1. Two different protection mechanisms that we have discussed are capabilities and access control lists.

a) Explain how these mechanisms can be derived from the access matrix.

For parts b – d tell whether capabilities, ACLs, or both can be used to solve the following protection goals, and very briefly explain your answer.

b) Ben wants his files readable by everyone except his parents.

c) Puyan and Nick want to share some secret files.

d) Anindo wants some of his files to be public.

2. About demand paging:

a) In what way is the page table like a mathematical function?

b) Is it one-to-one? Why or why not?

c) Which of the following pairs of TLB/page-table misses are legitimate?

- No TLB miss, no PT miss

- TLB miss but no PT miss

- PT miss but no TLB miss

- TLB miss and PT miss

d) How could some process A be able to read data from some page P that belongs to some other process’s memory, if that page P was never mapped in process A’s address space?

3. Suppose a disk crash causes a complete loss of the free-block list.

a) Can this be recovered if the file system does not use journaling? How?

b) Can this be recovered if the file system does use journaling? How?

c) Why do journaling file systems typically not log changes to data blocks?

d) Soft errors (random bit flips due to cosmic rays or electrical noise) are becoming a more serious problem in memories (e.g. DRAM). Would it make sense to apply the journaling concept to memory management? Explain.

4. Transactions: Suppose a bank transfer from account A to account B works like this:

Read balance from source account: Read S

Write new balance of source account: Write S

Read balance from destination account: Read D

Write new balance of destination account: Write D

Suppose John and Alice share accounts and go to different ATMs at the same time. John transfers $100 from checking to savings; while Alice transfers $200 from savings to checking. (Note that one transfer goes from checking to savings, while the other is reversed.) Suppose that John and Alice’s transfers happen simultaneously.

For each of the following, state whether such a scenario exists, and if so, give an example.

a) A safe interleaving (i.e., it gives the correct final balances) [although it is safe, purely sequential operation of John’s and Alice’s operations isn’t sufficient for this answer—you must show an interleaving]

b) An unsafe (i.e., incorrect) interleaving

c) A safe interleaving that can happen with the timestamp protocol but not with two-phase locking

d) Two-phase locking causes deadlock

5. Security: Skadco Inc. is a new e-commerce startup company and is just establishing its web presence.

a) Customers will want their transactions to be encrypted using SSL. What information does Skadco’s website provide as part of the SSL protocol to ensure that transactions with Skadco are safely encypted and that only Skadco’s servers can decrypt them? Explain.

b) If SSL is properly set up and all customer data stored in Skadco’s systems is stored in encrypted form, is that sufficient to guarantee privacy of the transactions and the stored customer data? Explain.

c) Do buffer overflows in the data or heap segments present security vulnerabilities? Explain.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download