|
15-410 Homework 2This homework assignment is due Friday, May 2nd at 23:59:59. As we intend to make solutions available on the web site immediately thereafter, . Homework must be submitted (online) in either PostScript or PDF format (not:
Microsoft Word, Word Perfect, Apple Works, LaTeX,
XyWrite,
WordStar,
etc.). Except as otherwise directed (in the crypto question), turn
in your answers as either
As usual, you may discuss this assignment with others, but you must then go off by yourself to write up the solution. Question 1 - Public Key PracticumThis question is not hard, but it does take some time to do it right. Please don't leave this question to the last minute, and think carefully about what the various steps accomplish. Follow the directions in gpg.html to generate
a PGP key ring,
containing public and private keys
for digital signature and encryption purposes.
Do not turn the key ring in to your
Question 2 - Virtual MemorySuppose that our Simics PC configuration were extended to add a disk device and that we gave you a simple disk device driver. This hardware could be used to virtualize RAM, i.e., to use physical memory frames as a cache for a larger, virtual, memory system. The x86 hardware mapping unit defines "present" bits in both the page-directory entry and the page-table entry. As we discussed in class, a "not present" page-directory entry can be used to cheaply mark a large part of an address space as invalid. However, in a kernel using a paging disk, when a particular page table entry is marked "not present" this may indicate either that the address is invalid or that the indicated page has been evicted to disk. Likewise, a "not present" page directory entry may indicate that an address range is permanently invalid or temporarily unavailable due to a "miss in the RAM cache". Part AImagine that a program successfully stores a value into some memory page but later receives a page fault while trying to retrieve that value. Consider the case where the page fault exception is raised because the "present" bit is turned off in the relevant page directory entry. Assume that the address is still logically valid, i.e., the program is entitled to fetch from that address, the kernel will fix the problem without intervention from the program, and the instruction will eventually succeed when retried. This situation strongly suggests that the kernel embodies a particular feature, design decision, or practice. Explain--why was it sensible for this fault to happen? Part BBriefly sketch the sequence of operations the kernel will take in response to this fault. Try to provide roughly the level of detail given in "Another story about read()" in the "Hardware" lecture or the "I/O Completion Example" in the "Yield" lecture. Question 3 - Non-blocking send()Consider the example presented on slide 20
of the "IPC/RPC" lecture.
Note that the Part ADraw a picture of a deadlock which may result in this scenario. You may wish to make explicit assumptions about the number of objects in the system (e.g., assume a certain number of processes). Part BWhich deadlock management approach would you suggest be applied to this system? Why? Helpful HintBy the way, if you think you are having AFS permission problems,
try running the program located at
| ||||||||||
[Last modified Monday April 28, 2008] |