Below is a QuickSort Serial Algorithm.....
1. procedure QUICKSORT(A,q,r)
2. begin
3. if q < r then
4. begin
5. x := A[q];
6. s := q;
7. for i := q+1 to r do
8. if A <= x then
9. begin
10. s :=s+1;
11. swap(A[s],A);
12. end if
13. swap(A[q],A[s]);
14. QUICKSORT(A,q,s);
15. QUICKSORT(A,s+1,r);
16. end if
17. end QUICKSORT
The above pseudo quicksort serial algorithm should be parallelized but i really do not know how to to it.I just know that parallelizing a program forces a compiler to transform eligible loops for parallel execution in multiprocessor machines.In line 14 and 15 there is recursion ,the method calls itself,am wondering if thats where we have to bisect the above algorithm and parallize it at that point.
After Parallizing the above algorithm i would be happy if someone can suggest a possible multiprocessor architecture to be used...and please state how scalable,flexible and efficient of your suggested architecture.
Including the limitations of the parallelized algorithm will be more appreciated.
Thanks in Advance guys.....God Bless.