M.I.T. DEPARTMENT OF EECS

6.033 - Computer System Engineering Handout 3 - February 8, 2000

Assignment 2: February 14 through February 24

For Lecture: Monday, February 14

Today's lecture will be on virtual memory.

For Recitation: Tuesday, February 15

Today you should turn in your second written assignment. Your one page report should address the following question, which is based on Ritchie and Thompson's ``The UNIX time-sharing system'' (reading #9):

Ritchie and Thompson's decision to base all UNIX I/O around a stream based model was partially influenced by the fact that programs could only access 64 KBytes of memory (addresses had to fit into 16 bits), and the fact that most devices were sequential (e.g. text terminals, line printers, tape drives). If Ritchie and Thompson had designed UNIX to run on a modern machine with a large bitmapped graphics display (which requires several megabytes of memory to hold the screen image), and with programs able to access several gigabytes of memory, how might the I/O design be different? Would a different I/O design be good for both file I/O and device I/O? Why or why not? Be specific and give one concrete example of why stream-based I/O may or may not be appropriate for graphics displays.

Stream-based I/O is described in the paper, especially in section 3.6. Look at the bottom of page 1912 and page 1913 which describes reading and writing to a file.

When thinking about a graphics display, you may wish to consider what sort of I/O operations might be required to draw a line or move a window around the screen. How would you access the memory to do that in a stream-based system? What might be a better way of doing so?

Remember that you can check out the 1999 6.033 web pages for examples of good one-page reading reports. Also, please apply the guidelines you learned in the special lecture offered by the Writing Program; check the 6.033 FAQ for formatting instructions.

For Lecture: Wednesday, February 16

Today's lecture will be based on the different levels of memory systems.

For Recitation: Thursday, February 17

There will be a hands-on assignment for today: check the 6.033 web site, as the assignment will be posted shortly.

Update: The hands-on assignment is out.

Today's recitation is on Kaehler's ``Virtual Memory for an Object-Oriented Language'' (reading #8).

To give you something to think about when you read this paper, here is last year's writing assignment based on this paper:

Kaehler's "Virtual Memory for an Object-Oriented Language" talks about how an object-oriented virtual memory design can improve performance of a system when compared to a page-based virtual memory design. But an object-oriented memory system has its disadvantages too.

Can you think of two significant disadvantages of using an object-oriented virtual memory system as opposed to a page-based virtual memory system?

For Lecture: Tuesday, February 22

Since Monday was a holiday and today is a virtual Monday, there will be a lecture today on threads.

For Lecture: Wednesday, February 23

Today's lecture will be on concurrency.

For Recitation: Thursday, February 24

There will be a hands-on assignment for today, which will be posted on the web shortly.

Update: The hands-on assignment is out.

Read Savage's paper, "Eraser: A Dynamic Data Race Detector for Multi-threaded Programs" (reading #10). If you read this paper sequentially, you might not reach all the important issues. Skim over the section describing the Lockset algorithm. After you understand the main concepts of the paper, return to the Lockset algorithm. We do not expect you to memorize this algorithm. Rather, we expect you to learn about synchronization issues.

In Figure 2 of the paper, remember that "y:=y+1" is not necessarily atomic. First, the processor loads the value of y into a register. Next, the processor increments the register value. Finally, the value is written back to y. Can you find interleavings which result in different values of y? For your convenience, here are some useful definitions:

Static prevention
When all operations occur before execution to help prevent problems.
Dynamic detection
When operations occur during execution to help detect problems.
Bohr bug /bohr buhg/
Jim Gray calls a bug with a repeatable, deterministic behavior a Bohr bug (e.g., a program which always fails when you divide by zero).
heisenbug /hi:'zen-buhg/
Jim Gray calls a bug with non-deterministic (or timing dependent) behavior a heisenbug. These are particularly nasty bugs (e.g., a data race).

The Eraser paper refers to "static detection" rather than "static prevention". In dynamic detection, a program will try to catch errors when they happen, but will halt execution when errors arise. In static prevention, a program will try to catch errors before they happen -- preventing errors from happening in the first place.

System aphorism of the week

Everything should be made as simple as possible, but not simpler. (A. Einstein)
Go to 6.033 Home Page Questions or Comments: 6.033-tas@mit.edu