Unix Systems Programming: Lab 7- Pipes and System V IPC:  messaging, semaphores, shared memory

Due:          Monday, February 25, 2013 @ 5:00 pm.


Purpose and Rationale

The purpose of this lab is to allow students to become comfortable with the utilization of Unix pipes, named and unnamed, and introduce to System V IPC through semaphores, message queues and shared memory.

Resources

FAQ (submission instructions and other useful stuff)
Please look at lab5 FAQ for useful material on unnamed and named pipes.
If you are not in our course email list, please subscribe to the cspp51081 email list here:
        http://mailman.cs.uchicago.edu/mailman/listinfo/cspp51081

Lecture 7 is the primary source for information on System V IPC. You can find additional information in the manpages, online, as well as the following sources:

All work should be done on a machine in the department's Linux cluster. You can refer to ssh for more information on how to log into a remote machine.

Marks Distribution

In this assignment you will have to complete 3 excercises. First, you will do two exercises (left previously from Lab 5): PART 1 - Unnamed pipes and PART 2 - Named pipes .
Part 1 - Unnamed Pipes 10 points
Part 2 - Named Pipes 10 points

Then for the third exercise you will choose ONE of three options:

Exercise 1: Message Queues 8 points
Exercise 2: Shared Memory 8 points
Exercises 2 and 3: Shared Memory with Semaphores 8 points + 2 bonus points
TOTAL 16 points (+2 bonus points)

LAB 7

Deliverables

Carefully follow the 5 steps below. NOTE: Each assignment has specific directions on how to submit.

  1. Part 1: Create directory ex1


  2.    This directory will implement the shell pipe using an unnamed pipe.
  3. Part 2: Create directory ex2

  4.    This directory will implement named pipes.
  5. Part 3: You will have one directory to store this part of your assignment (except for the last option):
  6. When you are finished with your directory you will create a compressed archive file using tar (this utility stores your directory as a single file, then compresses its size.)
           tar -czvf   username.lab7.tgz   username.lab7

  7. You will email your file to our grader as an attachment. She will send an acknowledgement that your assignment has been received.

Maria Power