This problem is to design and implement a process with a producer and consumer thread using N different buffers (use a fixed size for N of 25). Base your solution on the solution to the producer-consumer problem. You will need a mutual exclusion semaphore to prevent the producer the producer and consumer from manipulating the list of buffers at the same time, a semaphore so that the producer can signal the consumer to start processing when it creates full buffer, and another semaphore for the consumer to signal the producer when it creates an empty buffer.
You will need the POSIX thread, or pthread package.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
4) **COMMENTS, COMMENTS, COMMENTS**!
5) The attached file contains pseudocode given in the textbook. Below are some other instructions:
-You will need to include the pthread.h header file to define various thread types such as pthread_t and pthread_attr_t and the function prototypes exported by the pthread package.
- Here are the function prototypes for creating a mutex (pthread_mutex_init()), for destroying a mutex (pthread_mutex_destroy()).
-"Start with the pseudocode solution. You may have to reformulate parts of the pseudocode, and you will certainly have to flesh out the entire implementation."