Carnegie Mellon
SCS logo
Computer Science Department

15-410 Homework 2

This homework assignment is due Friday, May 5th at 23:59:59. As we intend to make solutions available on the web site immediately thereafter, please turn your solutions in on time.

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 .../$USER/hw2/$USER.pdf or .../$USER/hw2/$ If you use another filename, there is some risk that your solutions will not be credited to you.

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 Practicum

This 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 pgp.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 hw2 directory. Instead, follow the directions on how to export the public key information from the key ring into a file, hw2/$USER.asc. Then create a secret message for the course staff, in hw2/$USER.secret.asc

Question 2 - Nuts & Bolts

The ELF file format specifies addresses for the text, data, rodata, and bss regions, but not the stack region.

Part A

Briefly explain why it is ok for this information to be missing from the executable file.

Part B

The fact that the executable file doesn't specify the address range used by the stack allows interested kernels the freedom to deploy a mild optimization for some programs. Briefly explain, referring to the Pebbles environment if you wish to use a specific example.

Question 3 - VM

On the IA32 platform, we have two ways to remove entries from the TLB, namely setting %cr3 and INVLPG.

Part A

Explain how to implement INVLPG in terms of setting %cr3.

Part B

Explain how to implement flushing the whole TLB in terms of INVLPG.

Part C

Now imagine you can purchase a version of the IA32 processor family which implements one TLB-removal method or the other, but not both. Which would you choose, and why?

Helpful Hint

By the way, if you think you are having AFS permission problems, try running the program located at
% /afs/

[Last modified Monday May 01, 2006]