Question: In this project, an application will be developed with a C code that can sort the lines of a text file using parallel sorting techniques.
In this project, an application will be developed with a C code that can sort the lines of a text file using parallel sorting techniques. The application should be able to implement at least two different parallel sorting algorithms, and the sorting performance will be evaluated with various numbers of threads. The sorting results will be written to an output file.
Read a text file eg unsorted.txt Each line in the file should contain a word.
Sort a list containing the read words using two different parallel sorting algorithms: Parallel MergeSort and Parallel QuickSort.
Take the number of threads at runtime from the user. This should allow the program to be executed from the terminal in the following format:
mySort # of threads
For example;
mySort unsorted.txt output.txt quick
In this example, unsorted.txt is the name of the file to be sorted, output.txt is the name of the output file where the sorted words will be written, and is the number of threads. 'Quick' indicates the name of the sorting algorithm to be used.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
