Question: ALERT: ONLY LINUX EXPERT WITH C++ KNOWLEDGE.PLEASE TAKE YOUR TIME WRITE COMPLETE PROGRAM Write a C program that should run on Linux platform using gcc

ALERT: ONLY LINUX EXPERT WITH C++ KNOWLEDGE.PLEASE TAKE YOUR TIME WRITE COMPLETE PROGRAM

Write a C program that should run on Linux platform using gcc compiler. You are required to simulate threads creation and termination behavior by using POSIX threads library. Input: In the main program, first take the value for total number of threads and then ask user to provide the arrival time and CPU time (i.e. running time) for each thread. Output: Simulate the behavior of threads arrival, working and termination at a specific time interval (i.e. 500ms). Requirements: i. Name the program threadsimulator.c ii. Create each thread as its arrival time comes, keep it in working state and terminate as the CPU time finishes. iii. All creation and termination of threads must be done by using POSIX threads library. iv. During the process, keep record of all non-terminated threads and show them in working state continuously. v. The time duration between two intervals must be 500ms. vi. Provide the commands to compile and run the program. vii. Submit the program as a separate file. Dont embed the code in the assignment solution word file. viii. Follow the sample interface and output for the program which is shown subsequently. A sample interface and output for the program is shown as follows. Here to keep it short, only ten threads are taken. Your program should work for 1, 2, 3, 4, , up to 50 threads. The input from user is shown in bold

Output:

ALERT: ONLY LINUX EXPERT WITH C++ KNOWLEDGE.PLEASE TAKE YOUR TIME WRITE COMPLETE

NOTE:

I am posting above question 4th time on this platforms but sorry to say that all experts who replied previously have given same code with copy and paste and this code does nothing with my question and does not give me required output solution, if any one have exact code which can solve above program with steps should post here. i think it would not be a complex program as given by other experts. plz see below code

Enter the total number of threads (1 to 50) 10 Enter Arrival Time of thread M: 1 enter ceu Time of thread 3 Enter Arrival Time of thread 2 Enter Time of thread B: 8 Enter Arrival Time of thread c: 3 Enter Time of thread C 2 Enter Arrival Time of thread D 4 enter c Time of thread o: 1 Enter Arrival Time of thread s Enter Time of thread E: 4 Enter Arrival Time of thread Fr 6 Enter cev Time of thread s s Enter Arrival Time of thread G 7 Enter Time of thread G Enter Arrival Time of thread R: 8 enter ceu Time of thread R 3 Enter Arrival Time of thread 9 Enter Time of thread I: 8 Enter Arrival Time of thread 10 Enter Time of thread working Threads Time Interval Arrival Threads A, B B, C 10 11 13 14 Finish Threads C, D

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!