Question: Old MathJax webview ( Using C program for all Questions ) Task 1 Write a C program in which you need to sort an integer
Old MathJax webview

( Using C program for all Questions )
Task 1 Write a C program in which you need to sort an integer array of 10,000 using a single process. The array should be initialized using the rand() function between 1 and 30. Task 2 Write a C program in which you need to sort an integer array of 10,000 elements using an N number of threads. N should be passed through a command line argument. The array should be initialized using the rand() function between 1 and 30. You must carefully consider which sub-part of the array to pass to each thread. Task 3 Write a C program in which you need to sort integer array of 10,000 elements using N processes. N N should be passed through a command line argument. The array should be initialized using the rand() function between 1 and 30. You must carefully consider which sub-part of the array to pass to each child. Fill the following table with execution times of all of the three programs and identify which program's execution time is less. (You need to use the time command to run programs.) Real time (Seconds) User time (Seconds) System time (Seconds) Processes/Times Task 1 Task 2 Task3 Assignment#2 Deliverables: You are required to submit . Task1.c Task2.c Task3.c Comparison.doc (This file will contain the table shown above.) . Getting Time adnan@AdnanPc: $ time ls real Om0.017s user Omo.cees sys Omo.0315 adnan@AdnanPc: $
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
