School of Computer and Information Science
|
|
- Veronica Bond
- 6 years ago
- Views:
Transcription
1 School of Computer and Information Science CIS Research Placement Report Multiple threads in floating-point sort operations Name: Quang Do Date: 8/6/2012 Supervisor: Grant Wigley Abstract Despite the vast improvements in CPU design and the inclusion of multiple cores in even the low end processors, little has been done to improve the performance of sorting algorithms in this respect. This paper aims to justify the benefits of the use of multiple cores in these operations. It will also show how to implement these sorting operations.
2 1. Introduction Multi-threaded applications are starting to become a necessity as hardware development shifts from speed to multiple cores. Even though they have been around for quite a while, many applications and operating systems do not yet efficiently use them. The purpose of this paper is to show the possible performance increases by multi-threading different sorting algorithms. This is achieved by showing uses of different sorting algorithms and to display the differences between single threaded and multi-threaded versions of the same algorithms. An overview of the steps taken to achieve the data is given along with the resulting data. ing algorithms make up the basis of many applications used in the real world. Since their uses are so abundant, it is extremely useful to be able to speed up their processing time. This results in more efficient applications that respond and output data at an increased rate and throughput. Although there are many advantages to multi-threading an algorithm, which is the reason why so many technologies and hardware platforms are moving to multiple core processors, there are also several disadvantages. 1.1 Floating Point Numbers Floating-point numbers, in this paper, are 32 bit single precision numbers. All sorting operations performed are on these 4 byte values. 1.2 ing Algorithms There are several sorting algorithms that are used within this document. Most of these are commonly used to display the differences between sorting efficiency instead of real world uses. Insertion sort is used to display the performance changes for an algorithm which does not have an average processing time of but instead. Quick sort is an algorithm which is used in Java for its sorting operations. As such it is often used in real world applications and games. It has an average case performance of. Shell sort is yet another sorting algorithm with a different average processing time. It has an average performance case of.
3 All of these algorithms, though, are naturally sequential and single threaded. They rely on the data within the list to be sorted to be in one place and be unchanged as the processing is done to sort the list. In order to allow for comparisons of different single threaded sorting algorithms when they are multi-threaded, the use of a parallel sorting algorithm is required. In this paper, bucket sort is used to allow a useful comparison. Bucket sort works by first splitting the array of objects to be sorted, in this case float point numbers, by specified criteria. The aim is to have each of the buckets containing a similar number of objects. For a random set of data, this may be difficult to achieve. For a completely random set of data, the data could be split by numbers between certain ranges. Once the splitting of data is done, a different sorting algorithm would be used of each of the buckets until fully sorted. Since the buckets contain within them fully sorted data of the appropriate order, they can be simply joined together to return the completed sorted array. Naturally, the first division of data into buckets incurs a loss in performance, so the algorithm does not scale the individual sorting algorithms used perfectly. This is the downside of using a parallel sorting algorithm such as bucket sort. But since each of the algorithms incurs the same loss in performance, the difference is negligible. Figure 1.1 Bucket of Percentages
4 Figure 1.1 shows an example of bucket sort on percentages. The data has been arbitrarily chosen to be split equally between 0 and 100. The number of buckets has been decided as 4. This may be because the system doing the processing is a quad core, quad thread processor. Each of the buckets can then be sorted on each of the threads. The circles represent where the individual buckets data is sorted. This can consist of any single or even multi-thread sorting algorithm. This area is where each of the sorting algorithms in Figure 1.2 is used. The placing of data into buckets in a bucket sort takes a constant O(n) time. ing Algorithm Best Case Performance Worst Case Performance Quick Shell ( ) Insertion Average Performance Figure 1.2 ing Algorithms Memory Usage
5 1.3 Insertion Insertion sort is a very simple sorting algorithm that uses comparisons to sort an array. Its speed depends on the size of the array; larger arrays take a significantly larger amount of time to sort. It is also efficient on arrays that are already partially sorted and very easy to implement. Insertion sort works by methodically going along an array, starting at position 0, comparing the element with the rest of the elements before that position, and putting it in the right position. For example: [ ] Starting array [ ] Start at first element [ ] Move to next element. It is larger so no sorting is required. [ ] Move to next element. Element is smaller so it is inserted at the correct position. [ ] Move to next element. It is also smaller so it is inserted at the correct position. [ ] Completed sorted array. The best case for insertion sort is when the array is already sorted. It then has a running time of O(n). The worst case for insertion sort is when it is used on array already sorted in reverse order. This has a running time of O(n 2 ).
6 1.4 Quick Quick sort is said to be the fastest sorting algorithm for sorting random sets of data. This makes it ideal to be used for testing of floating point sorting. Quick sort works by: A pivot point is chosen, in the case of our algorithm, we use the middle element. It can have any value, even if it is not within the array. Any values in the array that are greater than the pivot value are put on the right of the pivot point. Values that are smaller are put in the left side and values that are equal are left in either side. The algorithm then recursively sorts both sides of the pivot. [ ] Starting array [ ] Choose pivot point [ ] Arrange elements [[2 1] [4 3]] Recursively quick sort [[1 2] [3 4]] [ ] ed array The best case for quick sort is when each partition is the same size after each step. This is still considered O( ), which is the same as its average case. The worst case scenario is O(n 2 ) for when the array is when the last element in the array is selected as the pivot and the array is already sorted.
7 1.5 Shell Shell sort is a sorting algorithm that, like the other algorithms discussed in this paper, uses comparison based sorting. It is an improvement upon insertion sort that allows elements to be exchanged even if they are not adjacently located. A gap size is chosen. For this paper, a gap size of half of the length of the array is used. Each element at the gap position is added to a sub array and sorted. The gap is then reduced, in our case, it is halved. This is continuously done until the gap size is set to 1, effectively turning into an insertion sort on an almost completely sorted array. [ ] Gap size is 3. [ ] the array of [3 5] [ ] the array of [1 2] [ ] the array of [6 4] = [4 6] = [ ] Gap size is 2 [ ] the array of [3 4 2] = [2 3 4] [ ] the array of [1 5 6] = [ ] Gap size is 1 [ ] = [ ] Finished array The best case for shell sort is when the elements are already sorted. This is O(n). The worst case scenario for this version of shell sort is the same as insertion sort. That is when the data set is sorted in the reverse order. It is also O(n 2 ).
8 2. Results To be able to get a fair comparison of sorting algorithms when multi-threaded, comparisons need to be made to their single threaded processing times. The sorting algorithms being tested are: Insertion, Quick and Shell. The system used to perform all these sorting operations is a 64-bit Windows 7 Machine with an Intel Xeon 3.47GHz. This CPU is a hyper-threaded quad core, meaning it has a total of 8 threads. The machine uses a WD Black 1TB hard drive as the primary drive and has 6 GB of DDR3 RAM. The sorting algorithms are programmed in Java and run using the Java Virtual Machine. This incurs only a minor performance loss in these trials. Threads are used in Java to perform the sorting of the float arrays. Each thread is considered a bucket in the bucket sort algorithm. On each of these threads, one of the following sorting algorithms is performed. The resulting time taken is then compared with a sequential single threaded form of the algorithm. All times are first measured in nanoseconds for the greatest accuracy and then converted to the appropriate value. The results are organized from 8 threads to one thread in order to easily show the performance changes. The floating point numbers are generated using a pseudo-random number generator.
9 No. of Objects No. of Objects Using 8 Threads: ing Algorithms (8 Threads) Objects 1000 Objects 100 Objects Shell Quick Insertion Time (Seconds) ing Algorithms (8 Threads) Objects Objects Objects Shell Quick Insertion Time (Seconds) With fewer objects, insertion sort performs the fastest with 8 threads on the quad core machine. At 1000 objects, insertion sort already starts to fall to the other sorting algorithms. It regains its place at objects, remaining similar with shell sort in speed while quick sort is significantly slower. Shell sort begins to show its speed when objects number and over. Insertion sort rapidly becomes slower than the other algorithms, eventually at 10 million objects; it is unable to sort the float array under a minute. Quick sort is the fastest algorithm at 10 million objects.
10 No. of Objects No. of Objects Using 4 Threads ing Algorithms (4 Threads) Objects 1000 Objects 100 Objects Shell Quick Insertion Time (Seconds) ing Algorithms (4 Threads) Objects Objects Objects Shell Quick Insertion Time (Seconds) Unlike in the results above, where insertion sort is able to best some of the other sorting algorithms with the lower number of elements; it manages to come last in every trial. This is due to the use of 4 threads instead of 8, severely limiting its speed as it is an O(n 2 ) algorithm. With a million objects, insertion sort takes 28 seconds compared to a bit over 5 seconds with 8 threads. This is a reduction in speed of about 511%. Quick sort, once again, is the leader in speed when a large number of elements are required to be sorted.
11 No. of Objects No. of Objects Using 2 Threads ing Algorithms (2 Threads) Objects 1000 Objects 100 Objects Shell Quick Insertion Time (Seconds) ing Algorithms (2 Threads) Objects Objects Objects Shell Quick Insertion Time (Seconds) Using just 2 threads, insertion sort, once again, suffers even more performance loss. It is unable to sort even a million objects in under a minute. The time it takes insertion sort to sort objects is comparable to that of shell sort sorting 10 million objects, a speed difference of 100 times. Shell sort is the fastest using 2 threads at 1000 objects and under. Quick sort then quickly takes the lead from or more elements.
12 No. of Objects No. of Objects Using 1 Thread ing Algorithms (1 Thread) Objects 1000 Objects 100 Objects Shell Quick Insertion Time (Seconds) ing Algorithms (1 Thread) Objects Objects Objects Shell Quick Insertion Time (Seconds) By sorting without using bucket sort, each of the algorithms performs much faster at 1000 and less objects. At objects, insertion sort already shows a massive increase in processing time. At one thread, this effect is more pronounced and noticeable at an earlier stage. The time it takes to sort objects is twice as long as that of shell sort sorting a 10 million object array, a performance decrease of around 200 times. Quick sort is once again the clear victor in terms of speed. Shell sort solidly maintains its second place position.
13 3. Conclusion Based on the results (viewable in appendix A), it can be concluded that: - With around 1000 objects or less to be sorted, the overhead from multithreaded sorting makes it inefficient to multi-thread these sorts; the speed of a single-threaded sorting algorithm is much faster than a multithreaded one at this stage. o Shell sort and quick sort both have similar sorting times at this stage, so their use would be recommended. Although insertion sort is slower than these two, it is not significantly slower at this stage. - At numbers greater than 1000, multi-threading starts to have an effect. o Insertion sort is clearly the slowest by far of these three sorting algorithms, achieving times that are many times greater than those of the other two. o Even though insertion sort gains significant speed increases every time extra threads are added, this is still not enough for it to compete with the other more efficient sorting algorithms. o Single threaded sorting is still mainly faster, as with each thread increase, the processing overhead also increases. - Once there are elements are more in the floating point array, the power of multi-threading really starts to show. o Insertion sort, from 1 thread to 2 threads shows a performance increase of 400%. Quick sort and shell sort also show an improvement along the lines of 20 to 50%. o At 4 threads, insertion sort is over 1200% faster than the single threaded variant. At 8 threads, this improvement is over 4800%. o With 4 threads, an improvement of 188% is noticed with Quick sort. Shell sort is sped up by 203%. o At 8 threads, the performance of Quick sort and Shell sort is actually decreased from 4 threads.
14 - With elements, a single threaded insertion sort is unable to sort this in under a minute. o Both Quick sort and Shell sort suffer from a loss of performance when compared to their 4 thread counterparts. Quick sort suffers most heavily, becoming even slower than its single core version. - At extremely high numbers of : o Quick sort at 4 threads is the fastest overall, taking an average of a bit over half a second to sort the array. o The fastest form of shell sort is also with 4 threads, taking about 50% longer than Quick sort. It seems that 4 threads are the ideal method for multi-threading sorting algorithms on CPUs. This gave the best performance based on the results. The trend seems to be that more threads are better for more elements. This means that for arrays of data over the that was tested, it may be more efficient to increase the number of threads. This also means that insertion sort may even be a viable solution, given enough threads; although this does mean a great deal of overhead due to the large amount of threads. The improvement may even be more pronounced if implemented on a GPU as they are able to have hundreds of cores.
15 4. Bibliography ing Algorithms Compared - Cprogramming.com ing Algorithms Compared - Cprogramming.com. Available at: [Accessed 21 May 2012]. What different sorting algorithms sound like - YouTube What different sorting algorithms sound like - YouTube. Available at: [Accessed 1 June 2012]. Bucket and radix sorting Bucket and radix sorting Available at: [Accessed 21 May 2012].
16 5. Appendix A Floating point numbers compared with Integers The sorting of floating point numbers may at first seem like a simple task, but the truth is that there is much more processing required to sort a set of floating point numbers when compared to integers. Due to each number having up to 32 bits of information, comparisons take a significant amount of time and logical processing. This also means that the algorithm chosen to perform this task needs to be suitable and efficient. Results in graph form These results are reduced to 5 decimal places to ensure clarity. The original results were taken with an accuracy of 9 decimal places. 8 Threads Insertion Quick Shell Objects Objects Objects Objects Objects Objects Threads Insertion Quick Shell Objects Objects Objects Objects Objects Objects
17 2 Threads Insertion Quick Shell Objects Objects Objects Objects Objects Objects Thread Insertion Quick Shell Objects Objects Objects Objects Objects Objects
Merge Sort Roberto Hibbler Dept. of Computer Science Florida Institute of Technology Melbourne, FL
Merge Sort Roberto Hibbler Dept. of Computer Science Florida Institute of Technology Melbourne, FL 32901 rhibbler@cs.fit.edu ABSTRACT Given an array of elements, we want to arrange those elements into
More informationParallel Merge Sort with Double Merging
Parallel with Double Merging Ahmet Uyar Department of Computer Engineering Meliksah University, Kayseri, Turkey auyar@meliksah.edu.tr Abstract ing is one of the fundamental problems in computer science.
More informationFaster Sorting Methods
Faster Sorting Methods Chapter 9 Contents Merge Sort Merging Arrays Recursive Merge Sort The Efficiency of Merge Sort Iterative Merge Sort Merge Sort in the Java Class Library Contents Quick Sort The Efficiency
More informationLab 4. 1 Comments. 2 Design. 2.1 Recursion vs Iteration. 2.2 Enhancements. Justin Ely
Lab 4 Justin Ely 615.202.81.FA15 Data Structures 06 December, 2015 1 Comments Sorting algorithms are a key component to computer science, not simply because sorting is a commonlyperformed task, but because
More informationCSC 273 Data Structures
CSC 273 Data Structures Lecture 6 - Faster Sorting Methods Merge Sort Divides an array into halves Sorts the two halves, Then merges them into one sorted array. The algorithm for merge sort is usually
More informationMultiple Pivot Sort Algorithm is Faster than Quick Sort Algorithms: An Empirical Study
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 11 No: 03 14 Multiple Algorithm is Faster than Quick Sort Algorithms: An Empirical Study Salman Faiz Solehria 1, Sultanullah Jadoon
More information*Yuta SAWA and Reiji SUDA The University of Tokyo
Auto Tuning Method for Deciding Block Size Parameters in Dynamically Load-Balanced BLAS *Yuta SAWA and Reiji SUDA The University of Tokyo iwapt 29 October 1-2 *Now in Central Research Laboratory, Hitachi,
More informationSoftware within building physics and ground heat storage. HEAT3 version 7. A PC-program for heat transfer in three dimensions Update manual
Software within building physics and ground heat storage HEAT3 version 7 A PC-program for heat transfer in three dimensions Update manual June 15, 2015 BLOCON www.buildingphysics.com Contents 1. WHAT S
More informationParallel Systems Course: Chapter VIII. Sorting Algorithms. Kumar Chapter 9. Jan Lemeire ETRO Dept. Fall Parallel Sorting
Parallel Systems Course: Chapter VIII Sorting Algorithms Kumar Chapter 9 Jan Lemeire ETRO Dept. Fall 2017 Overview 1. Parallel sort distributed memory 2. Parallel sort shared memory 3. Sorting Networks
More informationScheduling the Intel Core i7
Third Year Project Report University of Manchester SCHOOL OF COMPUTER SCIENCE Scheduling the Intel Core i7 Ibrahim Alsuheabani Degree Programme: BSc Software Engineering Supervisor: Prof. Alasdair Rawsthorne
More informationCS 137 Part 8. Merge Sort, Quick Sort, Binary Search. November 20th, 2017
CS 137 Part 8 Merge Sort, Quick Sort, Binary Search November 20th, 2017 This Week We re going to see two more complicated sorting algorithms that will be our first introduction to O(n log n) sorting algorithms.
More informationParallel Sorting Algorithms
CSC 391/691: GPU Programming Fall 015 Parallel Sorting Algorithms Copyright 015 Samuel S. Cho Sorting Algorithms Review Bubble Sort: O(n ) Insertion Sort: O(n ) Quick Sort: O(n log n) Heap Sort: O(n log
More informationCS125 : Introduction to Computer Science. Lecture Notes #40 Advanced Sorting Analysis. c 2005, 2004 Jason Zych
CS125 : Introduction to Computer Science Lecture Notes #40 Advanced Sorting Analysis c 2005, 2004 Jason Zych 1 Lecture 40 : Advanced Sorting Analysis Mergesort can be described in this manner: Analyzing
More informationL14 Quicksort and Performance Optimization
L14 Quicksort and Performance Optimization Alice E. Fischer Fall 2018 Alice E. Fischer L4 Quicksort... 1/12 Fall 2018 1 / 12 Outline 1 The Quicksort Strategy 2 Diagrams 3 Code Alice E. Fischer L4 Quicksort...
More informationReal-world sorting (not on exam)
Real-world sorting (not on exam) Sorting algorithms so far Insertion sort Worst case Average case Best case O(n 2 ) O(n 2 ) O(n) Quicksort O(n 2 ) O(n log n) O(n log n) Mergesort O(n log n) O(n log n)
More informationWe can use a max-heap to sort data.
Sorting 7B N log N Sorts 1 Heap Sort We can use a max-heap to sort data. Convert an array to a max-heap. Remove the root from the heap and store it in its proper position in the same array. Repeat until
More informationThe p196 mpi implementation of the reverse-and-add algorithm for the palindrome quest.
The p196 mpi implementation of the reverse-and-add algorithm for the palindrome quest. Romain Dolbeau March 24, 2014 1 Introduction To quote John Walker, the first person to brute-force the problem [1]:
More informationAlgorithms and Applications
Algorithms and Applications 1 Areas done in textbook: Sorting Algorithms Numerical Algorithms Image Processing Searching and Optimization 2 Chapter 10 Sorting Algorithms - rearranging a list of numbers
More informationScan Primitives for GPU Computing
Scan Primitives for GPU Computing Shubho Sengupta, Mark Harris *, Yao Zhang, John Owens University of California Davis, *NVIDIA Corporation Motivation Raw compute power and bandwidth of GPUs increasing
More informationPerformance of Multicore LUP Decomposition
Performance of Multicore LUP Decomposition Nathan Beckmann Silas Boyd-Wickizer May 3, 00 ABSTRACT This paper evaluates the performance of four parallel LUP decomposition implementations. The implementations
More informationMaximizing Memory Performance for ANSYS Simulations
Maximizing Memory Performance for ANSYS Simulations By Alex Pickard, 2018-11-19 Memory or RAM is an important aspect of configuring computers for high performance computing (HPC) simulation work. The performance
More informationCSE 332: Data Structures & Parallelism Lecture 12: Comparison Sorting. Ruth Anderson Winter 2019
CSE 332: Data Structures & Parallelism Lecture 12: Comparison Sorting Ruth Anderson Winter 2019 Today Sorting Comparison sorting 2/08/2019 2 Introduction to sorting Stacks, queues, priority queues, and
More informationAzure database performance Azure performance measurements February 2017
dbwatch report 1-2017 Azure database performance Azure performance measurements February 2017 Marek Jablonski, CTO dbwatch AS Azure database performance Introduction The popular image of cloud services
More informationMillisort: An Experiment in Granular Computing. Seo Jin Park with Yilong Li, Collin Lee and John Ousterhout
Millisort: An Experiment in Granular Computing Seo Jin Park with Yilong Li, Collin Lee and John Ousterhout Massively Parallel Granular Computing Massively parallel computing as an application of granular
More informationSorting Algorithms. Slides used during lecture of 8/11/2013 (D. Roose) Adapted from slides by
Sorting Algorithms Slides used during lecture of 8/11/2013 (D. Roose) Adapted from slides by Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar To accompany the text ``Introduction to Parallel
More informationQuick Sort. CSE Data Structures May 15, 2002
Quick Sort CSE 373 - Data Structures May 15, 2002 Readings and References Reading Section 7.7, Data Structures and Algorithm Analysis in C, Weiss Other References C LR 15-May-02 CSE 373 - Data Structures
More informationDisk Scheduling COMPSCI 386
Disk Scheduling COMPSCI 386 Topics Disk Structure (9.1 9.2) Disk Scheduling (9.4) Allocation Methods (11.4) Free Space Management (11.5) Hard Disk Platter diameter ranges from 1.8 to 3.5 inches. Both sides
More informationInformation Coding / Computer Graphics, ISY, LiTH
Sorting on GPUs Revisiting some algorithms from lecture 6: Some not-so-good sorting approaches Bitonic sort QuickSort Concurrent kernels and recursion Adapt to parallel algorithms Many sorting algorithms
More informationOptimizing Multiple GPU FDTD Simulations in CUDA
Center of Applied Electromagnetic Systems Research (CAESR) Optimizing Multiple GPU FDTD Simulations in CUDA Matthew J. Inman mjinman@olemiss.edu Atef Z. Elsherbeni Center For Applied Electromagnetics Systems
More informationPerformance impact of dynamic parallelism on different clustering algorithms
Performance impact of dynamic parallelism on different clustering algorithms Jeffrey DiMarco and Michela Taufer Computer and Information Sciences, University of Delaware E-mail: jdimarco@udel.edu, taufer@udel.edu
More informationKey question: how do we pick a good pivot (and what makes a good pivot in the first place)?
More on sorting Mergesort (v2) Quicksort Mergesort in place in action 53 2 44 85 11 67 7 39 14 53 87 11 50 67 2 14 44 53 80 85 87 14 87 80 50 29 72 95 2 44 80 85 7 29 39 72 95 Boxes with same color are
More informationParallel Computing: Parallel Architectures Jin, Hai
Parallel Computing: Parallel Architectures Jin, Hai School of Computer Science and Technology Huazhong University of Science and Technology Peripherals Computer Central Processing Unit Main Memory Computer
More informationDual Sorting Algorithm Based on Quick Sort
Dual ing Algorithm Based on Quick 1 P. Dhivakar, 2 G. Jayaprakash 1 PG Student, 2 PG Student, Department of CSE M. Kumarasamy College of Engineering (Autonomous), Karur, TamilNadu, India dhivakarit92@gmail.com
More informationRAID SEMINAR REPORT /09/2004 Asha.P.M NO: 612 S7 ECE
RAID SEMINAR REPORT 2004 Submitted on: Submitted by: 24/09/2004 Asha.P.M NO: 612 S7 ECE CONTENTS 1. Introduction 1 2. The array and RAID controller concept 2 2.1. Mirroring 3 2.2. Parity 5 2.3. Error correcting
More informationSorting Algorithms. + Analysis of the Sorting Algorithms
Sorting Algorithms + Analysis of the Sorting Algorithms Insertion Sort What if first k elements of array are already sorted? 4, 7, 12, 5, 19, 16 We can shift the tail of the sorted elements list down and
More informationPerformance and Optimization Issues in Multicore Computing
Performance and Optimization Issues in Multicore Computing Minsoo Ryu Department of Computer Science and Engineering 2 Multicore Computing Challenges It is not easy to develop an efficient multicore program
More informationFORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours
TED (10)-3071 Reg. No.. (REVISION-2010) (Maximum marks: 100) Signature. FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours PART
More informationMergesort again. 1. Split the list into two equal parts
Quicksort Mergesort again 1. Split the list into two equal parts 5 3 9 2 8 7 3 2 1 4 5 3 9 2 8 7 3 2 1 4 Mergesort again 2. Recursively mergesort the two parts 5 3 9 2 8 7 3 2 1 4 2 3 5 8 9 1 2 3 4 7 Mergesort
More informationSorting Algorithms Spring 2019 Mentoring 10: 18 April, Asymptotics Potpourri
CSM 61B Sorting Algorithms Spring 2019 Mentoring 10: 18 April, 2018 1 Asymptotics Potpourri Stability is a property of some sorting algorithms. Stability essentially means that if we have two elements
More informationCHAPTER 6 Memory. CMPS375 Class Notes (Chap06) Page 1 / 20 Dr. Kuo-pao Yang
CHAPTER 6 Memory 6.1 Memory 341 6.2 Types of Memory 341 6.3 The Memory Hierarchy 343 6.3.1 Locality of Reference 346 6.4 Cache Memory 347 6.4.1 Cache Mapping Schemes 349 6.4.2 Replacement Policies 365
More informationCS240 Fall Mike Lam, Professor. Quick Sort
??!!!!! CS240 Fall 2015 Mike Lam, Professor Quick Sort Merge Sort Merge sort Sort sublists (divide & conquer) Merge sorted sublists (combine) All the "hard work" is done after recursing Hard to do "in-place"
More informationCSE 530A. B+ Trees. Washington University Fall 2013
CSE 530A B+ Trees Washington University Fall 2013 B Trees A B tree is an ordered (non-binary) tree where the internal nodes can have a varying number of child nodes (within some range) B Trees When a key
More informationWorst-case running time for RANDOMIZED-SELECT
Worst-case running time for RANDOMIZED-SELECT is ), even to nd the minimum The algorithm has a linear expected running time, though, and because it is randomized, no particular input elicits the worst-case
More informationThe Central Processing Unit
The Central Processing Unit All computers derive from the same basic design, usually referred to as the von Neumann architecture. This concept involves solving a problem by defining a sequence of commands
More informationDOWNLOAD PDF LINKED LIST PROGRAMS IN DATA STRUCTURE
Chapter 1 : What is an application of linear linked list data structures? - Quora A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements
More informationIntroduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006
November 21, 2006 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds MBs to GBs expandable Disk milliseconds
More informationMerge Sort Algorithm
Merge Sort Algorithm Jaiveer Singh (16915) & Raju Singh(16930) Department of Information and Technology Dronacharya College of Engineering Gurgaon, India Jaiveer.16915@ggnindia.dronacharya.info ; Raju.16930@ggnindia.dronacharya.info
More informationSorting on CUDA. Providence College. Ayushi Sinha Providence College
Providence College DigitalCommons@Providence Annual Celebration of Student Scholarship and Creativity Spring 2011 Sorting on CUDA Ayushi Sinha Providence College Follow this and additional works at: http://digitalcommons.providence.edu/student_scholarship
More informationIntel Core i7 Processor
Intel Core i7 Processor Vishwas Raja 1, Mr. Danish Ather 2 BSc (Hons.) C.S., CCSIT, TMU, Moradabad 1 Assistant Professor, CCSIT, TMU, Moradabad 2 1 vishwasraja007@gmail.com 2 danishather@gmail.com Abstract--The
More informationFloating Point Considerations
Chapter 6 Floating Point Considerations In the early days of computing, floating point arithmetic capability was found only in mainframes and supercomputers. Although many microprocessors designed in the
More informationChapter 1: Introduction to the Microprocessor and Computer 1 1 A HISTORICAL BACKGROUND
Chapter 1: Introduction to the Microprocessor and Computer 1 1 A HISTORICAL BACKGROUND The Microprocessor Called the CPU (central processing unit). The controlling element in a computer system. Controls
More informationOverview of Sorting Algorithms
Unit 7 Sorting s Simple Sorting algorithms Quicksort Improving Quicksort Overview of Sorting s Given a collection of items we want to arrange them in an increasing or decreasing order. You probably have
More informationTable ADT and Sorting. Algorithm topics continuing (or reviewing?) CS 24 curriculum
Table ADT and Sorting Algorithm topics continuing (or reviewing?) CS 24 curriculum A table ADT (a.k.a. Dictionary, Map) Table public interface: // Put information in the table, and a unique key to identify
More informationCharacterizing Storage Resources Performance in Accessing the SDSS Dataset Ioan Raicu Date:
Characterizing Storage Resources Performance in Accessing the SDSS Dataset Ioan Raicu Date: 8-17-5 Table of Contents Table of Contents...1 Table of Figures...1 1 Overview...4 2 Experiment Description...4
More information3.3 Hardware Parallel processing
Parallel processing is the simultaneous use of more than one CPU to execute a program. Ideally, parallel processing makes a program run faster because there are more CPUs running it. In practice, it is
More informationScan and Quicksort. 1 Scan. 1.1 Contraction CSE341T 09/20/2017. Lecture 7
CSE341T 09/20/2017 Lecture 7 Scan and Quicksort 1 Scan Scan is a very useful primitive for parallel programming. We will use it all the time in this class. First, lets start by thinking about what other
More informationThe Limits of Sorting Divide-and-Conquer Comparison Sorts II
The Limits of Sorting Divide-and-Conquer Comparison Sorts II CS 311 Data Structures and Algorithms Lecture Slides Monday, October 12, 2009 Glenn G. Chappell Department of Computer Science University of
More informationNOTE: The Tmpg software package only encodes to the MPEG-2 video format; it will not be included on graphs which refer to other video formats.
ProCoder Comparative Analysis Version 1.0 July 25, 2002 Objective This document is a straightforward head-to-head comparison of three readily available software packages used for encoding video to various
More informationSorting and Searching Algorithms
Sorting and Searching Algorithms Tessema M. Mengistu Department of Computer Science Southern Illinois University Carbondale tessema.mengistu@siu.edu Room - Faner 3131 1 Outline Introduction to Sorting
More informationHTRC Data API Performance Study
HTRC Data API Performance Study Yiming Sun, Beth Plale, Jiaan Zeng Amazon Indiana University Bloomington {plale, jiaazeng}@cs.indiana.edu Abstract HathiTrust Research Center (HTRC) allows users to access
More informationDIVIDE AND CONQUER ALGORITHMS ANALYSIS WITH RECURRENCE EQUATIONS
CHAPTER 11 SORTING ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA AND MOUNT (WILEY 2004) AND SLIDES FROM NANCY M. AMATO AND
More informationComparing Implementations of Optimal Binary Search Trees
Introduction Comparing Implementations of Optimal Binary Search Trees Corianna Jacoby and Alex King Tufts University May 2017 In this paper we sought to put together a practical comparison of the optimality
More informationImplementing a Statically Adaptive Software RAID System
Implementing a Statically Adaptive Software RAID System Matt McCormick mattmcc@cs.wisc.edu Master s Project Report Computer Sciences Department University of Wisconsin Madison Abstract Current RAID systems
More informationOpenVMS Performance Update
OpenVMS Performance Update Gregory Jordan Hewlett-Packard 2007 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Agenda System Performance Tests
More information6.2 DATA DISTRIBUTION AND EXPERIMENT DETAILS
Chapter 6 Indexing Results 6. INTRODUCTION The generation of inverted indexes for text databases is a computationally intensive process that requires the exclusive use of processing resources for long
More informationSorting: Quick Sort. College of Computing & Information Technology King Abdulaziz University. CPCS-204 Data Structures I
Sorting: Quick Sort College of Computing & Information Technology King Abdulaziz University CPCS-204 Data Structures I Quick Sort Most common sort used in practice Why? cuz it is usually the quickest in
More informationParallel Systems Course: Chapter VIII. Sorting Algorithms. Kumar Chapter 9. Jan Lemeire ETRO Dept. November Parallel Sorting
Parallel Systems Course: Chapter VIII Sorting Algorithms Kumar Chapter 9 Jan Lemeire ETRO Dept. November 2014 Overview 1. Parallel sort distributed memory 2. Parallel sort shared memory 3. Sorting Networks
More informationUnit-2 Divide and conquer 2016
2 Divide and conquer Overview, Structure of divide-and-conquer algorithms, binary search, quick sort, Strassen multiplication. 13% 05 Divide-and- conquer The Divide and Conquer Paradigm, is a method of
More informationIS 709/809: Computational Methods in IS Research. Algorithm Analysis (Sorting)
IS 709/809: Computational Methods in IS Research Algorithm Analysis (Sorting) Nirmalya Roy Department of Information Systems University of Maryland Baltimore County www.umbc.edu Sorting Problem Given an
More informationAN 831: Intel FPGA SDK for OpenCL
AN 831: Intel FPGA SDK for OpenCL Host Pipelined Multithread Subscribe Send Feedback Latest document on the web: PDF HTML Contents Contents 1 Intel FPGA SDK for OpenCL Host Pipelined Multithread...3 1.1
More informationOrder Analysis of Algorithms. Sorting problem
Order Analysis of Algorithms Debdeep Mukhopadhyay IIT Kharagpur Sorting problem Input: A sequence of n numbers, a1,a2,,an Output: A permutation (reordering) (a1,a2,,an ) of the input sequence such that
More informationMain Memory and the CPU Cache
Main Memory and the CPU Cache CPU cache Unrolled linked lists B Trees Our model of main memory and the cost of CPU operations has been intentionally simplistic The major focus has been on determining
More informationDATABASE SCALABILITY AND CLUSTERING
WHITE PAPER DATABASE SCALABILITY AND CLUSTERING As application architectures become increasingly dependent on distributed communication and processing, it is extremely important to understand where the
More informationUnit 6 Chapter 15 EXAMPLES OF COMPLEXITY CALCULATION
DESIGN AND ANALYSIS OF ALGORITHMS Unit 6 Chapter 15 EXAMPLES OF COMPLEXITY CALCULATION http://milanvachhani.blogspot.in EXAMPLES FROM THE SORTING WORLD Sorting provides a good set of examples for analyzing
More informationCS125 : Introduction to Computer Science. Lecture Notes #38 and #39 Quicksort. c 2005, 2003, 2002, 2000 Jason Zych
CS125 : Introduction to Computer Science Lecture Notes #38 and #39 Quicksort c 2005, 2003, 2002, 2000 Jason Zych 1 Lectures 38 and 39 : Quicksort Quicksort is the best sorting algorithm known which is
More informationEnhancing the Efficiency of Radix Sort by Using Clustering Mechanism
Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320 088X IMPACT FACTOR: 5.258 IJCSMC,
More informationOptimization of Boyer-Moore-Horspool-Sunday Algorithm
Optimization of Boyer-Moore-Horspool-Sunday Algorithm Rionaldi Chandraseta - 13515077 Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika, Institut Teknologi Bandung Bandung, Indonesia
More informationCS1 Lecture 30 Apr. 2, 2018
CS1 Lecture 30 Apr. 2, 2018 HW 7 available very different than others you need to produce a written document based on experiments comparing sorting methods If you are not using a Python (like Anaconda)
More informationTwo Efficient Algorithms for VLSI Floorplanning. Chris Holmes Peter Sassone
Two Efficient Algorithms for VLSI Floorplanning Chris Holmes Peter Sassone ECE 8823A July 26, 2002 1 Table of Contents 1. Introduction 2. Traditional Annealing 3. Enhanced Annealing 4. Contiguous Placement
More informationParallelism and Concurrency. COS 326 David Walker Princeton University
Parallelism and Concurrency COS 326 David Walker Princeton University Parallelism What is it? Today's technology trends. How can we take advantage of it? Why is it so much harder to program? Some preliminary
More informationEntuity Network Monitoring and Analytics 10.5 Server Sizing Guide
Entuity Network Monitoring and Analytics 10.5 Server Sizing Guide Table of Contents 1 Introduction 3 2 Server Performance 3 2.1 Choosing a Server... 3 2.2 Supported Server Operating Systems for ENMA 10.5...
More informationPerformance Pack. Benchmarking with PlanetPress Connect and PReS Connect
Performance Pack Benchmarking with PlanetPress Connect and PReS Connect Contents 2 Introduction 4 Benchmarking results 5 First scenario: Print production on demand 5 Throughput vs. Output Speed 6 Second
More informationCS61B, Spring 2003 Discussion #15 Amir Kamil UC Berkeley 4/28/03
CS61B, Spring 2003 Discussion #15 Amir Kamil UC Berkeley 4/28/03 Topics: Sorting 1 Sorting The topic of sorting really requires no introduction. We start with an unsorted sequence, and want a sorted sequence
More informationQuestion Bank Subject: Advanced Data Structures Class: SE Computer
Question Bank Subject: Advanced Data Structures Class: SE Computer Question1: Write a non recursive pseudo code for post order traversal of binary tree Answer: Pseudo Code: 1. Push root into Stack_One.
More informationReview: Performance Latency vs. Throughput. Time (seconds/program) is performance measure Instructions Clock cycles Seconds.
Performance 980 98 982 983 984 985 986 987 988 989 990 99 992 993 994 995 996 997 998 999 2000 7/4/20 CS 6C: Great Ideas in Computer Architecture (Machine Structures) Caches Instructor: Michael Greenbaum
More informationSorting. Sorting in Arrays. SelectionSort. SelectionSort. Binary search works great, but how do we create a sorted array in the first place?
Sorting Binary search works great, but how do we create a sorted array in the first place? Sorting in Arrays Sorting algorithms: Selection sort: O(n 2 ) time Merge sort: O(nlog 2 (n)) time Quicksort: O(n
More informationSorting Algorithms. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University
Sorting Algorithms CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 QuickSort Divide-and-conquer approach to sorting Like
More informationLecture Notes 14 More sorting CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson
Lecture Notes 14 More sorting CSS 501 - Data Structures and Object-Oriented Programming Professor Clark F. Olson Reading for this lecture: Carrano, Chapter 11 Merge sort Next, we will examine two recursive
More informationParallelizing SAT Solver With specific application on solving Sudoku Puzzles
6.338 Applied Parallel Computing Final Report Parallelizing SAT Solver With specific application on solving Sudoku Puzzles Hank Huang May 13, 2009 This project was focused on parallelizing a SAT solver
More informationDatabase System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use
Chapter 11: Indexing and Hashing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files Static
More information32 Hyper-Threading on SMP Systems
32 Hyper-Threading on SMP Systems If you have not read the book (Performance Assurance for IT Systems) check the introduction to More Tasters on the web site http://www.b.king.dsl.pipex.com/ to understand
More informationCSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms. Catie Baker Spring 2015
CSE373: Data Structure & Algorithms Lecture 23: More Sorting and Other Classes of Algorithms Catie Baker Spring 2015 Admin No class on Monday Extra time for homework 5 2 Sorting: The Big Picture Surprising
More informationGPU ACCELERATED SELF-JOIN FOR THE DISTANCE SIMILARITY METRIC
GPU ACCELERATED SELF-JOIN FOR THE DISTANCE SIMILARITY METRIC MIKE GOWANLOCK NORTHERN ARIZONA UNIVERSITY SCHOOL OF INFORMATICS, COMPUTING & CYBER SYSTEMS BEN KARSIN UNIVERSITY OF HAWAII AT MANOA DEPARTMENT
More informationCOMP 352 FALL Tutorial 10
1 COMP 352 FALL 2016 Tutorial 10 SESSION OUTLINE Divide-and-Conquer Method Sort Algorithm Properties Quick Overview on Sorting Algorithms Merge Sort Quick Sort Bucket Sort Radix Sort Problem Solving 2
More informationWhite Paper. File System Throughput Performance on RedHawk Linux
White Paper File System Throughput Performance on RedHawk Linux By: Nikhil Nanal Concurrent Computer Corporation August Introduction This paper reports the throughput performance of the,, and file systems
More informationChapter 5. Large and Fast: Exploiting Memory Hierarchy
Chapter 5 Large and Fast: Exploiting Memory Hierarchy Processor-Memory Performance Gap 10000 µproc 55%/year (2X/1.5yr) Performance 1000 100 10 1 1980 1983 1986 1989 Moore s Law Processor-Memory Performance
More informationChapter 11: Indexing and Hashing" Chapter 11: Indexing and Hashing"
Chapter 11: Indexing and Hashing" Database System Concepts, 6 th Ed.! Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use " Chapter 11: Indexing and Hashing" Basic Concepts!
More informationMerge Sort. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong
Department of Computer Science and Engineering Chinese University of Hong Kong In this lecture, we will design the merge sort which sorts n elements in O(n log n) time. The algorithm illustrates a technique
More information8 Introduction to Distributed Computing
CME 323: Distributed Algorithms and Optimization, Spring 2017 http://stanford.edu/~rezab/dao. Instructor: Reza Zadeh, Matroid and Stanford. Lecture 8, 4/26/2017. Scribed by A. Santucci. 8 Introduction
More informationTowards Breast Anatomy Simulation Using GPUs
Towards Breast Anatomy Simulation Using GPUs Joseph H. Chui 1, David D. Pokrajac 2, Andrew D.A. Maidment 3, and Predrag R. Bakic 4 1 Department of Radiology, University of Pennsylvania, Philadelphia PA
More information