
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Operating Systems; Subject: Computer Programming; University: University of Central Florida; Term: Fall 2005;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Concurrent Programming Project 1( Due Sept. 23th)
You have to write a concurrent program using the BACI system. BACI provides the mechanisms to support the concurrent execution of programs written in the C - - programming language. This tiny programming language, C - - , allows you to use a constructs to initiate the concurrent execution of two or more processes. All you have to do is to enclose all the process (threads) to be executed concurrently in a cobegin { … } construct. For instance, we might indicate the concurrent execution of processes P1, P2, and P3 by using:
Cobegin{P1 (…); P2 (…); P3 (…)}
Process synchronization can be carried out in C - - using Semaphores and Monitors.
Write a concurrent program using semaphores to implement the Producer/Consumer algorithm. We will have two cases:
1.- One producer, one consumer, and one buffer.(the producer run faster than the consumer)
2.- One producer, one consumer, and one buffer.(the consumer run faster than the producer)
You must turn in a floppy or CD with the pseudo code of the above mentioned procedures and clearly indicate the initial values, and a running version of your solution in BACI with results for different data sets(different buffer sizes). The buffer size must be smaller than the number of items produced.