Question: C++ code, Pthreads, Semaphore: Currently using (c++ name.cpp -lpthread -o name) to compile if anything should be need for threads please let me know Data-Center
C++ code, Pthreads, Semaphore:

Currently using (c++ name.cpp -lpthread -o name) to compile if anything should be need for threads please let me know
Data-Center Simulation use POSIX threads and semaphores create a system to simulate a data center. The following rules apply: 1) 5 data-generator threads are created in the main thread at the start of simulation. Each data-generator thread has a unique index ranging from 1 to 5. Each data-generator thread generates 10 random numbers (no duplicate numbers) with the following requirement: a) b) c) d) e) The random numbers generated by data-generator thread 1 are ranging from 100 to 199. The random numbers generated by data-generator thread 2 are ranging from 200 to 299 The random numbers generated by data-generator thread 3 are ranging from 300 to 399. The random numbers generated by data-generator thread 4 are ranging from 400 to 499 The random numbers generated by data-generator thread 5 are ranging from 500 to 599 Data-Center Simulation use POSIX threads and semaphores create a system to simulate a data center. The following rules apply: 1) 5 data-generator threads are created in the main thread at the start of simulation. Each data-generator thread has a unique index ranging from 1 to 5. Each data-generator thread generates 10 random numbers (no duplicate numbers) with the following requirement: a) b) c) d) e) The random numbers generated by data-generator thread 1 are ranging from 100 to 199. The random numbers generated by data-generator thread 2 are ranging from 200 to 299 The random numbers generated by data-generator thread 3 are ranging from 300 to 399. The random numbers generated by data-generator thread 4 are ranging from 400 to 499 The random numbers generated by data-generator thread 5 are ranging from 500 to 599
Step by Step Solution
There are 3 Steps involved in it
To accomplish this task using C with POSIX threads and semaphores you need to set up a multithreaded program where each thread generates unique random ... View full answer
Get step-by-step solutions from verified subject matter experts
