Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am in a BIG problem because i need to do an assignment upon which my whole faculty education depends. if i dont do it i'm off from the faculty so i beg you or someone to help me do it.

The assignment goes like this:

Simulate a system with m producers and n consumers who communicate through the buffer (it is shared buffer) of k character length. producers first load the string from the keyboard, and only after all the m producers loaded their keyboard strings, can they begin to send characters (one char not whole string) in to the buffer, and then consumers take char's one by one from the buffer. Each producer after sending one character waits a random number of seconds / milliseconds before attempting to send the next character. (Range mode as determined independently from 0 to 1500ms) The numbers m,n and k are entered as command line parameters. Each producer and consumer is simulated with a process. None of the producers can start until all producers load their string from the keyboard. Synchronization of that part is done with semaphores. Synchronization of the character exchange of producers and consumers also also needs to be done with semaphores. i need to display in the appropriate way the sending and receiving characters. Achieve program for UNIX (Linux) and Windows operating systems.

tnx in advance
Posted
Comments
Dalek Dave 30-Aug-10 16:17pm    
I admire your candour but I am afraid you may be in trouble.
This is quite a big ask and you are not implying that you have done anything toward solving this problem.
Have you done any coding? If so, post what you have done.

Was this conveyed to you yesterday only - Short notice? Do you lack knowledge to do so? Did you tried something?

If this was such a big issue then you should have taken some action long back. You have posted your project outline. First of all it would not fit in here as a Quick Q&A.

Second,
Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
 
Share this answer
 
Well, I think the requirements are very, very well stated.
All that you need is a bunch of technical knowledge and start coding.
The producer-consumer problem is very well know, thus you may find a lot of info around.
Good luck and enjoy!
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900