Project 3: Shared Memory

Important Dates And Notes

Questions about the project? Send them to 537-help@cs.wisc.edu .

Due: Wednesday 11/02 by 9:00 pm.

You are allowed to have ONE partner for the Linux portion of this project. You must do the xv6 portion on your own. Your project partner must be in your discussion section; we consider your discussion section to be the one in which your handin directory exists (which we have moved if you requested a switch).

For future projects, you may change your project partner.

You should expect that for future projects we will continue to change which portion you do alone and which you can do with a partner, so make sure you understand both parts.

Copying code from other groups (whether from this semester or previous semesters) is considered cheating. Also, be sure to work on the xv6 portion on your own without your partner.

Overview

There are two parts to this project:

  • Linux Shared Memory:. To be done on a linux machine, so you can learn more about programming in C on a typical UNIX-based platform. You'll implement a server process and multiple client process that communicate through shared memory (all on the same machine). You'll use a semaphore as a lock and set up a signal handler to catch Ctrl-C. Unfortunately, there is no discussion video for this part.
  • Shared Memory in xv6:. There are two videos that you may find helpful for this part of the project. The first OPTIONAL video covers how to make xv6 incur a segmentation fault when address 0x0 is dereferenced (i.e., a NULL ptr). You will NOT be implementing this functionality, but you may find the explanation of how the address space is structured in xv6 useful. The second video describes how to deal with shared physical pages; note the the interface they implemented that semester for shared memory is not exactly the same as yours (e.g., you must support keys and a variable number of associated pages). The basic ideas are still similar. You must do this portion of the project on your own.

Click on the above links to learn more about what you should do. READ EACH CAREFULLY!

Handing It In

Your handin directory is ~cs537-1/handin/DISCUSSION/LOGIN/p3 where DISCUSSION is your discussion section (e.g., 301, 302, 303, or 304) and LOGIN is your CS login.

For the C/Linux part of this project all of your .c files. You should copy all of you .c files into your handin directory into the subdirectory called linux. You should also include a simple makefile , so we can simply type make and build your testable binaries and library. If you worked with a partner for Part A, you should only submit to ONE of your handin directories.

If you have a partner, please create a file called partner.login in the p3 directory that contains only your partner's CS login (and nothing else). Both partners should create the partner.login file, but only one partner should submit code (for P3a).

For the xv6 part of the project, copy all of your source files (but not .o files, please, or binaries!) into the xv6/ subdirectory of your p3 directory. A simple way to do this is to copy everything into the destination directory directory, then type make to make sure it builds, and then type make clean to remove unneeded files.

Finally, into your p3 directory, put a README file. Both project partners should have a README in their p3 directory. In there, describe what you did a little bit. The most important bit, at the top, however, should be the authorship of the project, particularly if you had a partner for Part A. Include both partner's full names, and both your CS and wisc logins to receive credit. We will only grade directories that have a README file in them.