Project3 - CSSE 340 Operating Systems Project 3:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSSE 340 Operating Systems Project 3: Producer-Consumer Problem Project Objectives: [1] Understand POSIX Pthread APIs. [2] Understand the critical-section problem in the Producer-Consumer Problem. [3] Understand process synchronization using Pthread lock, semaphore and conditional variables. Project Descriptions: In this project, the producers and consumers are running as separate threads. Suppose your final executable program is prog , then the command line looks like: prog sleep_seconds #-of-producers #-of-consumers Where sleep_seconds represents the seconds the main thread sleeps before termination. The buffer used in the project is a fixed-size array of type int . The size of buffer is 20. In practice, the buffer will act as a circular queue. The task of the project consists of two parts. In part 1, you need to use Pthread Semaphores. The C/C++ source program name is corresponding to buffer_sem.c. For buffer_sem.c/cpp, you must refer to pages 236-240 in the textbook for the details. One
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/01/2011 for the course CSSE 250 taught by Professor Dr.yingwuzhu during the Spring '11 term at UH Clear Lake.

Page1 / 2

Project3 - CSSE 340 Operating Systems Project 3:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online