Show Bid Request
Producer-Consumer processes
Bid Request Id: 18749
|
|
|
Posted by: |
CheatMode (4 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 16.67%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Jun 10, 2002 8:32:47 PM EDT
|
Bidding Closes: |
Jun 12, 2002 8:35:37 PM EDT
|
Viewed (by coders): |
242 times
|
Deadline: |
6/13/2002
TIME EXPIRED
|
|
|
|
Description:
This program should create two concurrent processes that will communicate between themselves with the help of shared memory and semaphores. The processes will be a producer and a consumer. The producer will produce items (e.g. integer numbers) and place them on a buffer (a queue perhaps?), which will exist on the shared memory. The consumer will remove items from the buffer and “consume” them. The queue will have a maximum capacity of 10 items.
Fork should be used to create the two processes. (parent process: producer, child process: consumer) The shared memory should be created with shmget and will be deleted with shmdt. Also for the shared memory part, the following commands should be used: shmop, shmat, shmctl, ipcrm, ipcs) Semaphores will be used for the synchronization of the two processes (the commands sema_init, sema_destroy, sema_wait, sema_trywait and sema_post should be used). In the attached .zip file there is a .pdf that might help with some of the commands that should be used and a sample code file that roughly shows how the code should look like.
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Complete copyrights to all work purchased.
Platform:
It should compile on gcc and run in linux
Must be 100% finished and received by buyer on:
Jun 13, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Special Conditions / Other:
Ofcourse when the buffer is full, the procducer should suspend itself and thus give time to the consumer in order to consume the items on the buffer. If the buffer is empty, the consumer should suspend itself and give time to the producer to produce more items. In order to work on this project one must be familiar with the term "critical section" and its significance in a process. Therefore the following rules should be kept in order for the program to function properly: 1.The two processes must never be in critical sections at the same time. 2.A process that is not in a critical section will not be allowed to suspend the other process. 3.The maximum time that a process has to wait before entering a critical section must be defined.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$25 (USD)
|
Jun 10, 2002 10:17:58 PM EDT
|
10
(Excellent)
|
|
|
I can do this for you no problem. I have done similar problems to this one a few times in the past. I will write code that is well commented and easy to follow. Check my ratings for references. |
|
|
|
|
|