Getting Started
Note: This lab must be run on wilkes. (In principle, you could run it on a different machine, but it's best to run it on the server to avoid any issues with differences in environment or setup.)
Partner & Attendance Information
Please show you were here for the lab (or not) by filling out the following information:
Getting the Starter Code
The starter code for this lab is already available on the server in
the directory /cs/cs105/labs/lab4-ringbuf. The first step is to
get your own copy of the code to work on.
Run
mkdir -p ~/cs105
to create a cs105 directory to work in (skip if you already have one).
Then run
cd ~/cs105
cp -ai /cs/cs105/labs/lab4-ringbuf .
cd lab4-ringbuf
which will cd into your cs105 working directory, then copy the
starter code into a new directory called lab4-ringbuf and cd
into that directory.
If you run ls, you'll see that there are two C files:
party.c- A demo program to show how to use PThread mutexes and condition variables, which you'll be using in this lab.
ringbuf.c- The file you'll be editing to implement the ring buffer.
There's also a Makefile to build the code, and some test input and output files you can use to check your work.
Adding Your Names
Before you start working on the lab, open the file ringbuf.c in your favorite text editor (e.g., emacs, nano or vim), and add both partners names at the top of the file. Doing it now helps ensure you don't forget later.
(When logged in, completion status appears here.)