Lab 4: RingBuffer

Introduction

In this lab you'll be using pthreads to implement a producer/consumer model with a shared buffer. There will be two threads: a producer and a consumer. The producer will read information from standard input and place it into a ring buffer. The consumer will extract information from the buffer. More details:

  1. The lab writeup.
  2. Here is the tar file that includes the writeup, starter code, 5 test input files, and 2 output files your implementation must match exactly, as described in the writeup.

Due Date and Submission

Due: Friday March 14, 1:15pm.

As described in the writeup, you should submit ringbuf.c using the following command:

cs105submit -a 04 ringbuf.c