Find Jobs
Hire Freelancers

C++ Program

$10-30 USD

Completed
Posted almost 10 years ago

$10-30 USD

Paid on delivery
You may choose one of them to work on. Please Find the attachments. Output should be in the same way as in scanned copies attached. Also attached Basic structure for both the programs. (1) Write a program in C++ to implement the bounded-buffer problem shown in class. The circular buffer pool has 10 buffers (0..9) in it which are accessed concurrently by 2 producers and 1 consumer. You should use 2 condition variables and two critical sections for the 2 types of threads. You should also implement the functions put() and get() shown in class for the producers and consumer, respectively. The items produced by the producer threads should be generated using a random number generator. You should also delay the two producers and the consumer by 1 second, 3 seconds, and 2 seconds, respectively, each time an item is deposited into or retrieved from the buffer pool. Refer to the handout distributed in class to get an idea of what need be generated from your program. (2) Write a program in C++ to synchronize two threads that both can increment “counter” concurrently. You should implement the functions sem_init(), sem_wait(), and sem_post() shown in Fig. 31.12 using a condition variable. The two threads are synchronized using sem_wait() and sem_post to increment “counter”. Refer to the handout distributed in class to get an idea of what need be generated from your program. Use the following criteria to prepare and turn your programs in. Submit ONLY your source code file(.cpp)
Project ID: 5844593

About the project

3 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, sir I considered your requirement. And I have some experiences like your project. I want you to discuss it more details. Regards, zong
$30 USD in 1 day
5.0 (1 review)
1.5
1.5
3 freelancers are bidding on average $47 USD for this job
User Avatar
Hi, I am a graduate in CS and working as a C++ programmer for 4+ years. I have done lots of assignments both in academic courses and in freelancer.com implementing circular buffer for generic types. Also I implemented producer/consumer, reader/writer and dining philosopher problem for multithread. I assure you of clean, efficient code with proper comment and documentation. thanks
$77 USD in 1 day
4.4 (23 reviews)
4.9
4.9
User Avatar
Hi, dear. And I am a freelancer had many good experiences like your project. So Please contact me, any message. Wait for your response.
$50 USD in 1 day
4.2 (9 reviews)
3.0
3.0
User Avatar
A proposal has not yet been provided
$35 USD in 5 days
5.0 (1 review)
1.1
1.1

About the client

Flag of UNITED STATES
Chicago, United States
5.0
1
Payment method verified
Member since Apr 23, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.