Abstract
Sorting huge amounts of datasets have become essential in many computer applications, such as search engines, database and web-based applications, in order to improve searching performance. Moreover, due to the witnessed prevalence of the commercial Simultaneous Multithreaded architecture (SMT), parallel programming using multithreading becomes a dire need for efficiently using all available hardware resources for one application. In this paper, one of the efficient and quick algorithms, the Quicksort, is applied as a parallel multithreaded algorithm on SMT architecture, where virtual parallelization has been achieved using the POSIX threads (Pthreads) library. The proposed algorithm is evaluated and compared with its sequential counterpart. The obtained analytical and experimental results reveal that multithreading is a viable technique for implementing the parallel Quicksort algorithm efficiently on SMT architecture, where it has been shown both analytically and experimentally that the parallel multithreaded Quicksort algorithm outperforms the sequential Quicksort algorithm in terms of various performance metrics including; time complexity and speedup.
Similar content being viewed by others
References
Knuth DE (1998) The art of computer programming. Sorting and searching, vol 3, 2nd edn. Addison-Wesley, Reading
Knuth DE (1970) Von Neumann’s first computer program. Comput Surv 2:247–260
Hoare CAR (1962) Quicksort Comput J 5(1):10–15
JaJa J (2000) A perspective on Quicksort. Comput Sci Eng 2(1):43–49
Cormen T, Leiserson C, Rivest R, Stein C (2001) Introduction to algorithms, 2nd edn. The MIT Press, Cambridge
Jelenković L, Omrčen-Čeko G (1997) Experiments with multithreading in parallel computing. In: Proceedings of the 19th international conference on information technology interfaces (ITI’97), computer and intelligent systems, Croatia
Sun Microsystems (2008) Multithreaded programming guide. http://docs.oracle.com/cd/E19253-01/816-5137/816-5137.pdf. Accessed 06 August 2012
Grama A, Gupta A, Karypis G, Kumar V (2003) Introduction to parallel computing, 2nd edn. Addison-Wesley, Reading (an imprint of Pearson Education Limited)
Ungerer T, Robic B, Silc J (2002) Multithreaded processors. Comput J 45:320–348
Zang C, Imai S, Frank S, Kimura S (2008) Issue mechanism for embedded simultaneous multithreading processor. IEICE Trans Fundam Electron Commun Comput Sci E91-A(4):1092–1100
Jain R (1991) The art of computer systems performance analysis: techniques for experimental design, measurement, simulation, and modeling. Wiley, New York
Kumari A, Chakraborty S (2007) Software complexity: a statistical case study through insertion sort. Appl Math Comput 190:40–50
Walsh TR (1984) How evenly should one divide to conquer quickly? Inf Process Lett 19(4):203–208
Al-Darwish N (2005) Formulation and analysis of in-place MSD radix sort algorithms. J Inf Sci 31(6):467–481
Chamberlain B, Callahan D, Zima H (2007) Parallel programmability and the Chapel language. Int J High Perform Comput Appl 21(3):291–312
Bitton D, DeWitt D, Hsiao D, Menom J (1984) A taxonomy of parallel sorting. Comput Surv 16(3):287–318
Sanders P, Hansch T (1997) On the efficient implementation of massively parallel Quicksort. In: 4th international symposium on solving irregularly structured problems in parallel. Lecture notes in computer science, vol 1253. Springer, Berlin, pp 13–24
Brest J, Vreže A, Žumer V (2000) A sorting algorithm on PC cluster. In: Proceedings of the 2000 ACM symposium on applied computing, Como, Italy, vol 2, pp 710–715
Lan Y, Mohamed MA (1992) Parallel Quicksort in hypercubes. In: Proceedings of the 1992 ACM/SIGAPP symposium on applied computing: technological challenges of the 1990’s, Kansas City, Missouri, pp 740–746
Tsigas P, Zhang Y (2003) A simple, fast parallel implementation of Quicksort and its performance evaluation on SUN enterprise 10000. In: Eleventh Euromicro conference on parallel, distributed and network-based processing, Genova, Italy
Heidelberger P, Norton A, Robinson JT (1990) Parallel Quicksort using fetch-and-add. IEEE Trans Comput 39(1):133–138
Tikhonova A, Tanase G, Tkachyshyn O, Amato N, Rauchwerge L (2005) Parallel algorithms in STAPL: sorting and the selection problem. Technical Report TR05-005 in Parasol Lab, Department of Computer Science, Texas A&M University
Nagaraja S, Pan Y, Badii M (2001) A parallel merging algorithm and its implementation with Java threads. In: Proceeding of MASPLAS’01 the mid-Atlantic student workshop on programming languages and systems. IBM Watson Research Centre, Armonk
Johnson E (1998) Support for parallel generic programming. Dissertation, Indiana University
Berlin J, Tanase G, Bianco M, Rauchwerger L, Amato NM (2007) Sample sort using the standard template adaptive parallel library. Technical Report TR07-002, Parasol Lab, Dept of Computer Science, Texas A&M University, College Station, USA
Garcia P, Korth HF (2005) Multithreaded architectures and the sort benchmark. In: Proceedings of the first international workshop on data management on new hardware (DaMoN ’05), Baltimore, Maryland
Wang D, Zhang X, Men T, Wang M, Qin H (2012) An implementation of sorting algorithm based on Java multi-thread technology. In: Proceedings of 2012 international conference on computer science and electronics engineering (ICCSEE 2012), vol 1, pp 629–632
Lin H, Li C, Wang Q, Zhao Y, Pan N, Zhuang X, Shao L (2010) Automated tuning in parallel sorting on multi-core architectures. In: Lecture notes in computer science, LNCS, vol 6271. Springer, Berlin, pp 14–25
Rashid L, Hassanein WM, Hammad MA (2010) Analyzing and enhancing the parallel sort operation on multithreaded architectures. J Supercomput 53(2):293–312
Wilkenson B (1996) Computer architecture design and performance, 2nd edn. Prentice Hall, London
Deitel PJ, Deitel HM (2007) C++ how to program, 6th edn. Prentice Hall, New York
Hennesy J, Patterson D (2006) Computer architecture: a quantitative approach, 4th edn. Morgan Kaufmann, San Mateo
Acknowledgements
The author would like to express his deep gratitude to the anonymous referees for their valuable comments and helpful suggestions, which improved the paper.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Mahafzah, B.A. Performance assessment of multithreaded quicksort algorithm on simultaneous multithreaded architecture. J Supercomput 66, 339–363 (2013). https://doi.org/10.1007/s11227-013-0910-2
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-013-0910-2