Name: Gomathy Gowri Narayanan
Email: ggkrs@yahoo.com


Sample Sort:
Stored in the file Samplesort.c . The sample sort program makes use of the data file DATA1 that Dr. Edsha gave. To compile the program type "gcc Samplesort.c -lpthread -lposix4" in the command prompt and after the program is compiled type "a.out" to run the program. It asks for the input of number of threads to be created. the output of the sorted file is then printed. It also prints the system time and user time. 

Explanation of the code:
The program has a qsort which sorts the numbers. The input is got in the file
format and converted into an array splitter[i] and the input of how many
threads to be span is got from the user. This is basically the number of
splitters we need. The threads are spawn and divided into buckets. the qsort
sorts the elelments in each bucket parallely and there are k(k-1) elements
selected from them. the host sorts them out and selects k Actual_splitters and
stores them. Then there are k threads spawn and the host puts each of the
elements in the original file in the approriate bucket and each thread sorts
them parallelly and produces the output.


Radix Sort:
Stored in the file Radix.c
The Radix sort program is not completed fully. The code works till the input is retrieved from the file. The Radix sort program makes use of the data file DATA2that Dr. Edsha gave. To compile the program type "gcc Radix.c -lpthread -lposix4" in the command prompt. 

Explanation of the code:
The countrank counts the number of digits in each of the positions
sequentiallly. This is given to the Radixsort(), which basically sorts the
elements by taking one position of the elments at a time and then does it
recursively to get the final sorted array. The elements are stable. 
