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.
1. Read a text file (e.g., unsorted.txt). Each line in the file should contain a word.
2. Sort a list containing the read words using two different parallel sorting algorithms: Parallel MergeSort and Parallel QuickSort.
3. 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 16 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 16 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 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 Programming Questions!