The goal of this assignment is to gain an understanding ofsemaphores through the use of pthreads by designing andimplementing a multi-threaded application. A secondary goal is tounderstand how semaphores are used in operating systems andapplications.
You are to write both a producer and a consumer Cprograms that uses pthreads to process and synchronizeconcurrent file activities.
The Details
Your solution must include the following:
- The Consumer
Submits processing requests to the producer by supplying afile name, its location and a character. It also outputs thecontents of the file provided by the producer to the standardoutput. - The Producer
Accepts multiple consumer requests and processes eachrequest by creating the followingOROR