|
15-410 Homework 2This homework assignment is due Friday, May 4th 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 MemoryPart A
Consider a
Assuming the kernel has "plenty of memory" (i.e., is not forcing
pages out to the swap disk), how many page faults might a single
Part B
How many page faults could a single Part C
In general, if you counted the number of page faults encountered
by all Question 3 - File System PerformanceBefore beginning to work on Project 5 (the file system project, which will be due on the last day of the final-exam period), you decide to do some simple performance investigation of the file system on a handy nearby Linux machine. In particular, /tmp happens to be an ext2 file system stored on the "hda7" partition of a Seagate Barracuda 7200.10 200 gigabyte disk. You write a program called timeseek which opens
a file and then repeatedly times how long it takes to execute
a function Because the Seagate data sheet for your disk says the average
time for a 1-sector transfer is 4.16 milliseconds, you expect
that most invocations of the While you are silently pondering what might explain this phenomenon, your project partner reminds you that Unix kernels provide a file interface to raw disk partitions. That is, by opening /dev/hda7, your program can do random I/O within a "file" larger than any which could fit inside the /tmp file system, since the device file represents not only the data sectors of /tmp but also the sectors used to store metadata. Imagine your surprise when random-block reads out of /dev/hda7 cluster nicely around 5 milliseconds. Part APlease explain this seeming paradox. Why is random I/O within this largest-possible file reliably faster than I/O within medium-sized files? Part BIf you can, explain the odd clustering of seek times within files in /tmp. Notes
Helpful HintBy the way, if you think you are having AFS permission problems,
try running the program located at
| ||||||||||
[Last modified Friday April 27, 2007] |