|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Abnormal producer consumer problem driving me nuts
normally, i hate asking someone to do my homework for me but am getting desperate right now. i have a project about consumer producer problem. the deadline is tonight at 23:55. but i havent gotten it working yet. i just COULDNT get it to work right yet. the problem is as follows: the C - program will prompt for the following integer inputs: Code:
m: the number of producer threads n: the number of consumer threads k: the size of the bounded buffer array i: the number of candy items to be filled in each box j: the number of candy items produced by each producer thread before it quits now each producer thread produces a specific candy item, and each consumer thread takes an item out of the buffer one at a time. say producer1 produces red, prducer2 blue and so on.. as for consumer threads. after a given consumer thread has filled a given box; it prints the contents of the box as follows: Consumer thread A filled a new box of candy containing: blue 3, red 7, green 8, ... if you dont have the time to waste on beginngers' coding: atleast please hint out on how i should plan my work, because may be my problem is in the code structure. thanks my head is now throbbing i can nolonger even think straight. anyhelp will be deeply appreciated. thanks in advance.
Last edited by jim mcnamara; 01-05-2013 at 08:02 AM.. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| producer consumer | gokult | Programming | 0 | 12-01-2010 04:02 PM |
| Short code driving me nuts. | daddygrant | Shell Programming and Scripting | 9 | 02-09-2009 01:22 PM |
| producer-consumer problem | joey | Programming | 2 | 12-20-2008 08:09 AM |
| Dumb question but its driving me nuts | jepombar | UNIX for Dummies Questions & Answers | 3 | 07-03-2007 02:32 PM |
| Producer/Consumer | poorni_uma | UNIX for Dummies Questions & Answers | 3 | 07-08-2005 08:03 AM |
|
|