Abstract
We present a new deterministic sorting algorithm that interleaves the partitioning of a sample sort with merging. Sequentially, it sorts n elements in O(n logn) time cache-obliviously with an optimal number of cache misses. The parallel complexity (or critical path length) of the algorithm is O(logn loglogn), which improves on previous bounds for deterministic sample sort. Given a multicore computing environment with a global shared memory and p cores, each having a cache of size M organized in blocks of size B, our algorithm can be scheduled effectively on these p cores in a cache-oblivious manner.
We improve on the above cache-oblivious processor-aware parallel implementation by using the Priority Work Stealing Scheduler (PWS) that we presented recently in a companion paper [12]. The PWS scheduler is both processor- and cache-oblivious (i.e., resource oblivious), and it tolerates asynchrony among the cores. Using PWS, we obtain a resource oblivious scheduling of our sorting algorithm that matches the performance of the processor-aware version. Our analysis includes the delay incurred by false-sharing. We also establish good bounds for our algorithm with the randomized work stealing scheduler.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Acar, U.A., Blelloch, G.E., Blumofe, R.D.: The data locality of work stealing. In: Theory of Computing Systems, vol. 35(3). Springer, Heidelberg (2002)
Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. CACM 31, 1116–1127 (1988)
Ajtai, M., Komlos, J., Szemeredi, E.: An O(n log n) sorting network. Combinatorica 3, 1–19 (1983)
Arge, L., Goodrich, M.T., Nelson, M., Sitchinava, N.: Fundamental parallel algorithms for private-cache chip multiprocessors. In: ACM SPAA, pp. 197–206 (2008)
Blelloch, G., Chowdhury, R., Gibbons, P., Ramachandran, V., Chen, S., Kozuch, M.: Provably good multicore cache performance for divide-and-conquer algorithms. In: ACM-SIAM SODA, pp. 501–510 (2008)
Blelloch, G., Gibbons, P., Simhadri, H.: Brief announcement: Low depth cache-oblivious sorting. In: ACM SPAA. ACM, New York (2009)
Blumofe, R., Leiserson, C.E.: Scheduling multithreaded computations by work stealing. JACM, 720–748 (1999)
Blumofe, R.D., Leiserson, C.E.: Scheduling multithreaded computations by work stealing. Journal of the ACM 46(5), 720–748 (1999)
Burton, F., Sleep, M.R.: Executing functional programs on a virtual tree of processors. In: ACM FPLCA, pp. 187–194 (1981)
Chowdhury, R.A., Silvestri, F., Blakeley, B., Ramachandran, V.: Oblivious algorithms for multicores and network of processors. In: IEEE IPDPS (2010)
Cole, R.: Parallel merge sort. SIAM J Comput 17(4) (1988)
Cole, R., Ramachandran, V.: Efficient resource oblivious scheduling of multicore algorithms (2010) (Manuscript)
Cole, R., Ramachandran, V.: Resource oblivious sorting on multicores. TR-10-13, Dept of Comp Sci, UT-Austin (2010)
Cole, R., Ramachandran, V.: Resource oblivious sorting on multicores. (Submitted, 2010)
Frigo, M., Leiserson, C.E., Prokop, H., Ramachandran, S.: Cache-oblivious algorithms. In: IEEE FOCS (1999)
Valiant, L.G.: A bridging model for multi-core computing. In: Halperin, D., Mehlhorn, K. (eds.) Esa 2008. LNCS, vol. 5193, pp. 13–28. Springer, Heidelberg (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cole, R., Ramachandran, V. (2010). Resource Oblivious Sorting on Multicores. In: Abramsky, S., Gavoille, C., Kirchner, C., Meyer auf der Heide, F., Spirakis, P.G. (eds) Automata, Languages and Programming. ICALP 2010. Lecture Notes in Computer Science, vol 6198. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14165-2_20
Download citation
DOI: https://doi.org/10.1007/978-3-642-14165-2_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14164-5
Online ISBN: 978-3-642-14165-2
eBook Packages: Computer ScienceComputer Science (R0)