# Producer-Consumer Problem

Page 1 of 1

## 5 Replies - 2424 Views - Last Post: 16 April 2010 - 02:10 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=168457&amp;s=fc8c28c07b4b3d4a86c292a9488762a5&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 generals

Reputation: 0
• Posts: 2
• Joined: 16-April 10

# Producer-Consumer Problem

Posted 16 April 2010 - 12:12 PM

Dans une pessine municipale, chaque personne qui entre doit récupérer un paginée (si on a) parmi P paginée existant et ensuite cherche un vestiaire libre si on a. on peut donc a se moment changer d’habit et mettre ses habit dans le paginée, puis libérer le vestiaire. Apres une séance de natation on recherche un vestiaire libre et on change d’habit pour enfin libérer le vestiaire et le paginée avant de quitter. Sachant que P est supérieur à V (nbre de vestiaire)
Synchroniser ce problème en utilisant le sémaphore et la bibliothèque symaphore.h

Is This A Good Question/Topic? 0

## Replies To: Producer-Consumer Problem

### #2 PsychoCoder

Reputation: 1660
• Posts: 19,853
• Joined: 26-July 07

## Re: Producer-Consumer Problem

Posted 16 April 2010 - 12:26 PM

This is an English speaking forum only, when you post a question use only English or your thread will be closed.

• Saucy!

Reputation: 6259
• Posts: 24,028
• Joined: 23-August 08

## Re: Producer-Consumer Problem

Posted 16 April 2010 - 12:27 PM

### #4 generals

Reputation: 0
• Posts: 2
• Joined: 16-April 10

## Re: Producer-Consumer Problem

Posted 16 April 2010 - 01:58 PM

In a municipal Pessin, each person who enters must retrieve a paged (if it has) from P and then seeks expanded existing cloakroom free if you a. so we can have time to change clothes and put his coat in the expanded, then release the locker room. After a swim is looking for a free cloakroom and you change your clothes to finally release the locker room and expanded before leaving. Knowing that P is greater than V (no. of dressing)
Synchronize this problem by using the semaphore and the library symaphore.h

### #5 PsychoCoder

Reputation: 1660
• Posts: 19,853
• Joined: 26-July 07

## Re: Producer-Consumer Problem

Posted 16 April 2010 - 02:01 PM

Sorry but we can not give you the entire code to solve your problem. We are here to assist in solving problems with code you have written, with any error messages you are getting or what isn't working the way that you expect it to, we would be more than happy to help you with those problems. If there is a topic that you don't understand we would be more than happy to help you with that as well. Make sure to post any code with in code tags like below.

Be sure to visit our tutorial and snippet areas or read the FAQS at the top of the forums. Also, take a moment to read the rules about posting topics.

• Saucy!

Reputation: 6259
• Posts: 24,028
• Joined: 23-August 08

## Re: Producer-Consumer Problem

Posted 16 April 2010 - 02:10 PM