How Software Gets Done  


(No Login on Secured Page)

Custom Software Buyers
Request new bids
Search Coders
My Account
 
My Buyer 'To Do' List
 
My bid requests
  My escrow account
 
My General Info
Verification
 
Help for Buyers
Articles for Buyers
FAQ for Buyers
Latest News
 

Custom Software Coders

Newest open work
Browse all work
Search all work
My Account
 
My Coder 'To Do' List
 
My bids
 
My General Info
  My credit account
 
Help for Coders
Articles for Coders
FAQ for Coders
Latest News
 

Affiliates

My account
 
My pipeline
 
My credit account
 
Help for Affiliates
Latest News
 
Newest Open Bid Requests.
Fix bug in phys. mem. registry retrieval
By Sting-Ray on May 10
Max Bid: $20


High Impact Professional Website Design
By PCU on May 10
Max Bid: $450


questions, varied topics.
By jc0000 on May 10
Max Bid: $12


UML
By Anil Upadhyay on May 10
Max Bid: Open to fair suggestions


PROLOG HOMEWORK
By Anil Upadhyay on May 10
Max Bid: Open to fair suggestions


LISP HOMEWORK
By Anil Upadhyay on May 10
Max Bid: Open to fair suggestions


Click here to put this ticker on your own site

Open Work Categories.
Database 
(133 open)
   Access 
(60 open)
   MySQL 
(73 open)
   Oracle 
(9 open)
   SQL Server 
(53 open)
   Other DB 
(13 open)
Documentation / Tech Writing 
(36 open)
Data Entry 
(20 open)
Game Development 
(17 open)
Graphics / Art / Music 
(40 open)
   Graphics 
(45 open)
     3d Animation 
(13 open)
   Art (Misc.) 
(17 open)
   Music 
(6 open)
   3d Modeling 
(4 open)
Language Specific 
(98 open)
   ASP 
(66 open)
   C# 
(37 open)
   C++ / C 
(106 open)
   Cocoa / Obj-C 
(1 open)
   Cold Fusion 
(4 open)
   Delphi 
(27 open)
   Java 
(53 open)
   Perl 
(33 open)
   PHP 
(85 open)
   XML/XSL 
(23 open)
   Visual Basic 
(131 open)
   Visual Basic .Net 
(67 open)
   Other 
(45 open)
Misc 
(38 open)
   CAD 
(3 open)
MultiMedia 
(30 open)
Network 
(41 open)
   Network Design 
(7 open)
   Network Implementation 
(12 open)
Platforms 
(63 open)
   Windows 
(148 open)
     MS Exchange 
(3 open)
     MS Office 
(8 open)
     Other 
(8 open)
   Internet Browser 
(38 open)
   Linux 
(50 open)
   UNIX 
(22 open)
   Hand Held/PDA Programming 
(10 open)
Requirements 
(10 open)
Security 
(33 open)
Testing / Quality Assurance 
(16 open)
Web 
(142 open)
   Page Design 
(70 open)
   Flash 
(44 open)
   Web Services 
(66 open)
   Web (Other) 
(74 open)
Training 
(9 open)
   Computer Based 
(11 open)
 
Other
 
Other Sites

Download the free Rent A Coder IE toolbar!
 
Show Bid Request

Cosumer--Producer problem
Bid Request Id: 53534
Bookmark in my 'To Do' list
Posted by: alzoub1 (47 ratings)
(Software buyer rating 9.95)
Non-action Ratio: Very Good - 5.77%
Posted: Mar 18, 2003
9:09:54 PM EDT
Bidding Closes: Mar 20, 2003 EDT
Viewed (by coders): 192 times
Deadline: 3/22/2003
TIME EXPIRED
Phase:
100% of work completed and accepted. Coder has been paid.
Max Accepted Bid: Bidding is closed
Project Type: Personal Project / Homework Help
Bidding Type: Open Auction
Categories: C++ / C
Enter chat room for this bid request
(0 active users at May 10, 2003 9:46:00 PM EDT)

Description:
there is anexample of the cosumer and producer

Write a program in C++ and Win32 API to implement the producer-consumer problem .

You should implement the buffer pool using two queues (i.e. linked lists): the full queue and the empty queue. The full queue contains those nodes with an item (an integer) already deposited in them (the queue is initialized to 0). The empty queue contains those empty nodes and is initialized to 10.

The producer thread first asks the user to enter an integer (0..9). It then accesses the empty queue to get an empty node from the head of the queue and deposits the item in it. It then accesses the full queue to insert the node at the tail of the queue. The consumer thread accesses the full queue to get a full node from the head of the queue and removes the item from it. It then accesses the empty queue to insert the node at the tail of the queue.

Since both queues can be accessed by the two threads simultaneously, synchronization (implemented using three semaphores) is needed. The “full” semaphore (initialized to 0) is used to indicate how many full buffers have been created. The “empty” semaphore (initialized to 10) is used to indicate how many empty buffers are available. The “mutex” semaphore is used to synchronize the access to the buffer pool.

The following events should be addressed by sending a message to the screen.

When an empty buffer is obtained by the producer thread from the empty queue.
e.g. producer: an empty buffer is obtained from the empty queue.

(2) When a loaded buffer is returned to the full queue.
e.g. producer: buffer containing 3 is returned to the full queue.

When a loaded buffer is obtained by the consumer thread from the full queue.
e.g. consumer: buffer containing 5 is obtained from the full queue.

(4) When an empty buffer is returned to the empty queue.
e.g. consumer: an empty buffer is returned to the empty queue.

You may delay the consumer (e.g. Sleep(2000)) a little bit to offset the competition between the two threads.

example see attachment


Deliverables:


1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.



3) Complete ownership and distribution copyrights to all work purchased.



Platform:
xp,nt,98,melinum

usualy i use visual c++ 6.0

Must be 100% finished and received by buyer on:
Mar 22, 2003 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.

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!
bokbokan
(31 ratings)
in Manila, Manila
Philippines
Bid id: 575,887
 
$25 (USD) Mar 19, 2003
9:30:38 AM EDT
 9.96
(Excellent)
   
Hope to work with you again.

thanks
 




Quick Search
 

 Advanced Search
Newest Open Work
Latest News

 
Credentials


 

 
Rent A Coder upholds the rigorous business practices required to be both a BBB member and Square Trade vendor.
  • All customer issues addressed within 2 days
  • Openly disclosed pricing and return policies
  • Participation in mediation at buyer request
  • Superior selling track record
This site is verified through its parent company, Exhedra Solutions, Inc.
 

Rent A Coder Top Coders.


Anuj Gakhar
Rated a 9.98 on 92 jobs 
Securenext
Rated a 9.98 on 97 jobs 
Buddies
Rated a 9.82 on 76 jobs 
Codman
Rated a 9.97 on 138 jobs 
Andrei Remenchuk
Rated a 10 on 12 jobs 
Michael Sharp
Rated a 9.97 on 170 jobs 
teleCODERS
Rated a 9.93 on 67 jobs 
RNA
Rated a 9.93 on 35 jobs 
hernest
Rated a 10 on 109 jobs 
markesh
Rated a 10 on 21 jobs 

See all top coders...

(What makes a top coder?)

Top Exam Scorers
 
Other
Rent A Coder is PayPal verified through its parent company, Exhedra Solutions, Inc.

Created in partnership with:

 


Affiliate Sites



Latest News | About Us | Kudos | Feedback/Contact    Affiliates | Advertise    Privacy | Legal

Copyright © 2001, Exhedra Solutions, Inc. All rights reserved.
By using this site you agree to its Terms and Conditions.
"Rent A Coder" (tm), "Safe Project Escrow" (tm) and "How Software Gets Done" (tm)
are trademarks of Exhedra Solutions, Inc.