Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Design a number generator and monitor processing as the below diagram: Thread #1 (Generate a random number

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

Step: 1

Generator process in C include include include include include include using namespace std mutex mtx queue pipeline void generateRandomNumbersint thre... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Information Security

Authors: Michael E. Whitman, Herbert J. Mattord

7th Edition

035750643X, 978-0357506431

More Books

Students also viewed these Operating System questions