Scalable Algorithmic Techniques (Ch. 4-5 Lin Snyder Text) Johnnie W. Baker Feb 23 2011.

Slides:



Advertisements
Similar presentations
ITEC200 Week10 Sorting. pdp 2 Learning Objectives – Week10 Sorting (Chapter10) By working through this chapter, students should: Learn.
Advertisements

Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
MATH 224 – Discrete Mathematics
CSCI 4717/5717 Computer Architecture
Resource Management §A resource can be a logical, such as a shared file, or physical, such as a CPU (a node of the distributed system). One of the functions.
Optimal PRAM algorithms: Efficiency of concurrent writing “Computer science is no more about computers than astronomy is about telescopes.” Edsger Dijkstra.
1 Parallel Parentheses Matching Plus Some Applications.
Visual C++ Programming: Concepts and Projects
1 Potential for Parallel Computation Module 2. 2 Potential for Parallelism Much trivially parallel computing  Independent data, accounts  Nothing to.
Structure clashes and program decomposition
Algorithm An algorithm is a step-by-step set of operations to be performed. Real-life example: a recipe Computer science example: determining the mode.
Parallel Sorting Algorithms Comparison Sorts if (A>B) { temp=A; A=B; B=temp; } Potential Speed-up –Optimal Comparison Sort: O(N lg N) –Optimal Parallel.
Advanced Topics Object-Oriented Programming Using C++ Second Edition 13.
Chapter 11 Sorting and Searching. Topics Searching –Linear –Binary Sorting –Selection Sort –Bubble Sort.
Data Parallel Algorithms Presented By: M.Mohsin Butt
Sorting Algorithms CS 524 – High-Performance Computing.
Searches & Sorts V Deena Engel’s class Adapted from W. Savitch’s text An Introduction to Computers & Programming.
Rossella Lau Lecture 7, DCO20105, Semester A, DCO Data structures and algorithms  Lecture 7: Big-O analysis Sorting Algorithms  Big-O analysis.
COMPE575 Parallel & Cluster Computing 5.1 Pipelined Computations Chapter 5.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Principles of Parallel Programming First Edition by Calvin Lin Lawrence Snyder.
1 Lab Session-III CSIT-120 Spring 2001 Revising Previous session Data input and output While loop Exercise Limits and Bounds GOTO SLIDE 13 Lab session.
Introduction to Parallel Processing Ch. 12, Pg
Section 8.4 Insertion Sort CS Insertion Sort  Another quadratic sort, insertion sort, is based on the technique used by card players to arrange.
CSC220 Data Structure Winter
Advances in Language Design
This module was created with support form NSF under grant # DUE Module developed by Martin Burtscher Module B1 and B2: Parallelization.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Principles of Parallel Programming First Edition by Calvin Lin Lawrence Snyder.
CSCI-455/552 Introduction to High Performance Computing Lecture 18.
1 Chapter 1 Parallel Machines and Computations (Fundamentals of Parallel Processing) Dr. Ranette Halverson.
Chapter 16: Searching, Sorting, and the vector Type.
Prof. Yousef B. Mahdy , Assuit University, Egypt File Organization Prof. Yousef B. Mahdy Chapter -4 Data Management in Files.
1 Parallel Sorting Algorithms. 2 Potential Speedup O(nlogn) optimal sequential sorting algorithm Best we can expect based upon a sequential sorting algorithm.
Chapter 10 Applications of Arrays and Strings. Chapter Objectives Learn how to implement the sequential search algorithm Explore how to sort an array.
An Optimal Cache-Oblivious Priority Queue and Its Applications in Graph Algorithms By Arge, Bender, Demaine, Holland-Minkley, Munro Presented by Adam Sheffer.
Data Structure Introduction.
Communication and Computation on Arrays with Reconfigurable Optical Buses Yi Pan, Ph.D. IEEE Computer Society Distinguished Visitors Program Speaker Department.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Principles of Parallel Programming First Edition by Calvin Lin Lawrence Snyder.
Lecture 15- Parallel Databases (continued) Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
Sorting  Sorting Problem:  A list of items:  x1, x2, x3, …., xn  Arranging the list in ascending order  X1
5.3 Sorting Techniques. Sorting Techniques Sorting is the process of putting the data in alphabetical or numerical order using a key field primary key.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
1 String Processing CHP # 3. 2 Introduction Computer are frequently used for data processing, here we discuss primary application of computer today is.
Winter 2014Parallel Processing, Fundamental ConceptsSlide 1 2 A Taste of Parallel Algorithms Learn about the nature of parallel algorithms and complexity:
5.3 Sorting Techniques. Sorting Techniques Sorting is the process of putting the data in alphabetical or numerical order using a key field primary key.
Chapter 9 Sorting 1. The efficiency of data handling can often be increased if the data are sorted according to some criteria of order. The first step.
Chapter 9 Sorting. The efficiency of data handling can often be increased if the data are sorted according to some criteria of order. The first step is.
ArrayList is a class that implements the List interface. The List interface is a blueprint for its “implementor” classes. There is another implementor.
+ Even Odd Sort & Even-Odd Merge Sort Wolfie Herwald Pengfei Wang Rachel Celestine.
Review 1 Merge Sort Merge Sort Algorithm Time Complexity Best case Average case Worst case Examples.
Parallel Programming - Sorting David Monismith CS599 Notes are primarily based upon Introduction to Parallel Programming, Second Edition by Grama, Gupta,
Shell Sort. Invented by Donald Shell in 1959, the shell sort is the most efficient of the O(n²) class of sorting algorithms. Of course, the shell sort.
Chapter 9: Sorting1 Sorting & Searching Ch. # 9. Chapter 9: Sorting2 Chapter Outline  What is sorting and complexity of sorting  Different types of.
Sorting & Searching Geletaw S (MSC, MCITP). Objectives At the end of this session the students should be able to: – Design and implement the following.
CSCI-455/552 Introduction to High Performance Computing Lecture 21.
Autumn 2006CSE P548 - Dataflow Machines1 Von Neumann Execution Model Fetch: send PC to memory transfer instruction from memory to CPU increment PC Decode.
CHAPTER 51 LINKED LISTS. Introduction link list is a linear array collection of data elements called nodes, where the linear order is given by means of.
COMP7330/7336 Advanced Parallel and Distributed Computing Task Partitioning Dynamic Mapping Dr. Xiao Qin Auburn University
Chapter 16: Searching, Sorting, and the vector Type.
Prof. Amr Goneid, AUC1 CSCE 210 Data Structures and Algorithms Prof. Amr Goneid AUC Part 8a. Sorting(1): Elementary Algorithms.
1 Algorithms Searching and Sorting Algorithm Efficiency.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Assignment 5 is posted. Exercise 8 is very similar to what you will be doing with assignment 5. Exam.
Prof. U V THETE Dept. of Computer Science YMA
Parallel Programming By J. H. Wang May 2, 2017.
Warmup What is an abstract class?
Parallel & Distributed Computing Fall 2008
Database Systems (資料庫系統)
Parallel sorting.
Parallel Sorting Algorithms
Core Assessments Core #1: This Friday (5/4) Core #2: Tuesday, 5/8.
Presentation transcript:

Scalable Algorithmic Techniques (Ch. 4-5 Lin Snyder Text) Johnnie W. Baker Feb

Overview & Acknowledgements We have already quickly covered the slides from Larry Snyder on the Peril-L language from Chapter 4. The primary references for this set of slides are – Larry Snyder’s slides for Chapters 4 and 5 – Chapters 4-5 of the Lin-Snyder textbook.

Unlimited Parallelism (Odd-Even Sort) The Odd-Even Interchange Sort can utilize up to ½ the number of records being sorted. – This allows one-half of the records to be simultaneously compared to the other half of the records. – In a sequence of steps, consecutive odd/even pairs of values are compared in parallel, and are interchanged if they are out of order. – This half-step odd/even comparison is followed by a similar even/odd pair comparisons. – This alternating pairs of test –odd /even pairs followed by even/odd pairs – are executed in sequence until no more interchanges occur. Although there is plenty of concurrency, there is also plenty of copying. – A list with the smallest element at the end will move it through every position in the file.

Fixed Algorithm Create a thread for each letter of the alphabet – 26 Latin letters. Each thread counts the number of records that start with its letter Allocate storage for those records and move them into local storage for their thread. Sort records within each thread. Each determines the number of records preceding its records. Using a +-scan, each threads computes the global position for each of its records and writes its records back into the global array at the proper location. – OK to overwrite earlier records since they all are now stored in local storage.

Fixed Algorithm Comments Note the alphabetized batches cannot be returned to the global array until all threads have removed their batch of records from it. This algorithm solution is better than the unlimited parallelism version, but the number of parallel threads is fixed at 26 and does not scale.

Comparing the Three Solutions The odd/even sort is inefficient by any defn because it shifts the data towards its final destination at rate of one location move per time. The alphabetic bins solution has a minimal amount of movement – a maximum of two transfers for any record. While data movement is minimized, it uses excessive global communication to compute the positions of the letters. The scalable solution requires significant movement of descriptors of data, but unlike fixed approach, it moves them in streams that can be pipelined. – The actual records are only moved once at the end of the process.

Comparing the Three Solutions (cont) The main difference in the solutions is their generality regarding the number of processors they could use. – For n>P, the odd-even sort has to simulate threads. – The fixed solution can not use more than 26 threads. – The scalable method works for any number of threads up to P=n.

This HW is NOT Assigned