Question: Write a program in a generator process to perform: 5 threads are responsible to generate 2000 random numbers based on the thread number to send

Write a program in a generator process to perform:
5 threads are responsible to generate 2000 random numbers based on the thread number to send a message format i.e: Thread#1: Thread Number generate to pipeline processing.
a pipeline to handle all thread calls’ with Mustex synchronization.
a child process to read from the pipeline and it is stored in shared memory. This process will send an internal signal to rerun 5 threads if the total random numbers are
Design a number generator and monitor processing as the below diagram: Thread #1 (Generate a random number between 1 to 100) Thread #2 (Generate a random number between 101 to 200) Thread #3 (Generate a random number between 201 to 300) Thread #4 (Generate a random number between 301 to 400) Thread #5 (Generate a random number between 401 to 500) Generator Processor Thread #1: Thread Number generate Monitor Processor Pipe Processing Signal Trigger Processing Child Process Keep tracking if there any sync signal with other processing. Parent Process Read From Shared Memory to store into a log file. Send to Shared Memory Shared Memory
Step by Step Solution
There are 3 Steps involved in it
Generator process in C include include include include include include using namespace std mutex mtx queue pipeline void generateRandomNumbersint thre... View full answer
Get step-by-step solutions from verified subject matter experts
