Menu

[Solved]-Solution Must Include Following Consumer Submits Processing Requests Producer Supplying Fi Q37196519

Your solution must include the following:

The Consumer
Submits processing requests to the producer by supplying a filename, its location and a character. It also outputs the contents ofthe file provided by the producer to the standard output.
The Producer
Accepts multiple consumer requests and processes each request bycreating the following four threads.
The reader thread will read an input file, one line at a time. Itwill pass each line of input to the character thread through aqueue of messages.
The character thread component will scan the line and replace eachblank character by the character supplied by the client. It willthen pass the line to the toUpper thread through another queue ofmessages.
The toUpper thread component will scan the line and convert alllower case letters to upper case. It will then pass the convertedline to the writer thread through another queue of messages.
The writer thread will write the line to an output file.
The producer will also return both the file name as well as itslocation to the consumer when the end of input file is reached.

Implementation Details

You should develop a module that implements a queue of characterstring buffers.
This structure will be an array of pointers to strings withintegers to indicate the head and tail of the list.
The maximum size of the buffer array will be 10.
Buffers will be created by the reader thread and destroyed by thewriter thread.
Threads should terminate when end of input file is reached.

Expert Answer


Answer to Your solution must include the following: The Consumer Submits processing requests to the producer by supplying a file n… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *