You are to write both a producer and a consumer C programs thatuses pthreads to process and synchronize concurrent fileactivities.
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 following four threads.- The reader thread will read an input file, oneline at a time. It will pass each line of input to the characterthread through a queue of messages.
- The character thread component will scan theline
OROR