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 . 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 source program name is corresponding to buffer_sem.c. For buffer_sem.c, you must refer to pages 236-240 in the textbook for the details. One hint is you can use the structure of the program in the textbook. In part 2, you need to use Pthread Conditional Variables. The C source program name is
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.

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