producer and consumer problem using multi-threads, mutex lock and semaphores.
$10-30 USD
In Progress
Posted over 3 years ago
$10-30 USD
Paid on delivery
C program utilizing multi-threads, mutex lock, and semaphores for the producer and consumer problem.
Define an integer buffer with the size of 32 and implement a circular queue data structure that is used by producers and a consumer. Next, you will need to initialize the mutex lock and semaphores. Here, you will use two semaphores where one indicates a full queue and the other indicates an empty queue. The producer function is used to insert a random number between 0 and 10 to the queue. The consumer function is used to remove a number from the queue in a FIFO fashion. In addition, inside the loops of the producer and consumer functions, add a random delay between 0 and 2 seconds to simulate various lengths of processes. In addition, you are required to use 2 producers and 1 consumer for this project where 0 and 2 are producers and 1 is consumer (3 threads). Finally, code should run forever. where the number is the thread identifier, the second number is the random number inserted to or removed from the queue, and the third number is the queue index. Also, print out a message when the buffer is full or empty.
Code should run in UNIX server.
Expected results should be similar to one in file provided.
Hello,
I just saw your offer. I believe that I have adequate knowledge and experience to build an exclusive c++ application. With me you'll gain guaranteed quality work for your application. I have immense experience in creating high performant, hyperthreaded and multitasking applications. I have worked in cplusplus on projects related to databases, parallel pipelining, compilers,distributed systems and trading software.
I have done multiples projects on producer consumer problem so i am pretty sure that i will be able to complete it
If the above offer sounds like something you would be interested in, I’d love to hear from you.
Looking forward to hearing from you
$30 USD in 2 days
5.0 (2 reviews)
1.2
1.2
5 freelancers are bidding on average $52 USD for this job
HI..I am proficient in C/C++ programming with multiple POSIX threads along with synchronisation using mutex locks, semaphores and can help you write the producer and consumer program.
Hi... I have already completed projects upon semaphore and mutex locks hence confident enough to complete your project within 2 working days time.
Ping me to discuss further
I'm an Electronic Engineering undergraduate and have completed the Real Time Operating Systems course last semester, where I got to work with exact same problems. I've already written similar code so I think I can deliver your content in just 24 hours time.
Let's get started!