Concurrent Programming Project 1 - Operating Systems | COP 4600, Assignments of Operating Systems

Material Type: Assignment; Class: Operating Systems; Subject: Computer Programming; University: University of Central Florida; Term: Fall 2005;

Typology: Assignments

Pre 2010

Uploaded on 02/25/2010

koofers-user-hcu
koofers-user-hcu 🇺🇸

5

(1)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UCF
School of computer Science
COP 4600: Operating Systems
Fall 2005
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.

Partial preview of the text

Download Concurrent Programming Project 1 - Operating Systems | COP 4600 and more Assignments Operating Systems in PDF only on Docsity!

UCF

School of computer Science

COP 4600: Operating Systems

Fall 2005

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.