I DOPC++: EXTENDING C++ with DISTRIBUTED OBJECTS and OBJECT MIGRATION for PGAS MODEL a Thesis Submitted to Kent State University
Total Page:16
File Type:pdf, Size:1020Kb
DOPC++: EXTENDING C++ WITH DISTRIBUTED OBJECTS AND OBJECT MIGRATION FOR PGAS MODEL A thesis submitted to Kent State University in partial fulfillment of the requirements for the degree of Master of Science by Salwa Aljehane December,2015 i Thesis written by Salwa Aljehane B.S., Tibah University, KSA 2007 M.S., Kent State University, USA, 2015 Approved by Dr. Arvind Bansal , Advisor, Master Thesis Committee Dr. Austin Milton , Members, Master Thesis Committee Dr. Angela Guercio , Members, Master Thesis Committee Accepted by Dr. Javed Khan , Chair, Department of Computer Science Dr. James L. Blank , Dean, College of Arts and Sciences ii TABLE OF CONTENTS LIST OF FIGURES ..................................................................................................... VIII! LIST OF TABLES .......................................................................................................... IX! ACKNOWLEDGEMENTS ............................................................................................ X! ABSTRACT ................................................................................................................... XII! CHAPTER 1 INTRODUCTION ..................................................................................... 1! 1.1! Motivation .................................................................................................................. 1! 1.2! Previous Work and Current Limitations .................................................................... 3! 1.4! Objectives of this Research: ....................................................................................... 6! 1.5! Methodology .............................................................................................................. 8! 1.6! Contributions .............................................................................................................. 9! 1.7! Organization ............................................................................................................... 9! CHAPTER 2 BACKGROUND AND DEFINITION ................................................... 11! 2.1! Object Oriented Programming ................................................................................. 11! 2.1.1! Class and Objects ........................................................................................... 11! 2.1.2! Subclass and Inheritance ................................................................................ 11! 2.1.3! Extending Class Definitions .......................................................................... 12! 2.1.4! Methods ......................................................................................................... 13! 2.2! Concepts in Massive Parallel Computing ................................................................ 13! 2.2.1! “Race condition” ............................................................................................ 13! 2.2.2! Atomicity and Synchronization ..................................................................... 14! 2.2.3! Critical Sections and Locks ........................................................................... 14! iii 2.3! Models for Massive Parallel Computing ................................................................. 14! 2.3.1! Shared Memory “Open MPI” ........................................................................ 14! 2.3.2! Distributed Memory “MPI” ........................................................................... 15! 2.3.3! Partitioned Global Address Space (PGAS) ................................................... 16! 2.3.4! Single Program Multiple Data (SPMD) ........................................................ 16! 2.4! Distributed Object Based Model .............................................................................. 17! 2.4.1! Object Migration ............................................................................................ 17! 2.4.2! Remote Method Invocation ........................................................................... 17! 2.4.3! Distributed Objects ........................................................................................ 18! 2.5! Definitions in Distributed Languages with Object Oriented Programming ............ 18! 2.5.1! Definitions in Emerald ................................................................................... 18! 2.5.2! Definitions in Chapel ..................................................................................... 19! 2.5.3! Definitions in X10 ......................................................................................... 20! 2.6! List of Acronyms ..................................................................................................... 20! CHAPTER 3 LITERATURE REVIEW ....................................................................... 22! 3.1! High Performance Computing Models .................................................................... 22! 3.1.1! Message Passing Interface (MPI) Model ....................................................... 22! 3.1.2! Partitioned Global Address Space (PGAS) Model ........................................ 23! 3.1.3! Shared Memory (OpenMP) Model ................................................................ 24! 3.1.4! Comparison between MPI Model , PGAS Model and OpenMP ................... 25! 3.2! Chapel ...................................................................................................................... 25! 3.2.1! Execution Model – Mapping on PGAS Model .............................................. 26! iv 3.2.2! Synchronization ............................................................................................. 27! 3.2.3! Data parallelism ............................................................................................. 27! 3.2.4! Task parallelism ............................................................................................. 28! 3.3! X10 ........................................................................................................................... 28! 3.3.1! Execution Model – Mapping ......................................................................... 29! 3.3.2! Spawning Multiple Threads ........................................................................... 29! 3.3.3! Synchronization ............................................................................................. 29! 3.4! UPC++ ..................................................................................................................... 30! 3.4.1! Execution Model ............................................................................................ 31! 3.4.2! Construct: ....................................................................................................... 31! 3.5! Emerald – Distributed Object Based Language ....................................................... 32! 3.5.1! Flat Objects .................................................................................................... 32! 3.5.2! Remote Method Invocation ........................................................................... 33! 3.6! Java .......................................................................................................................... 34! CHAPTER 4 COMPARATIVE STUDY OF RELEVANT LANGUAGES .............. 36! 4.1! X10 ........................................................................................................................... 36! 4.1.1! Parallel Construct ........................................................................................... 36! 4.1.2! Synchronization in threads ............................................................................ 37! 4.1.3! Atomicity ....................................................................................................... 38! 4.1.4! Object Oriented Features ............................................................................... 39! 4.2! Chapel ...................................................................................................................... 39! 4.2.1! Parallel Construct ........................................................................................... 39! v 4.2.2! Synchronization in threads ............................................................................ 42! 4.2.3! Atomicity ....................................................................................................... 42! 4.2.4! Object Oriented Features ............................................................................... 42! 4.3! Comparison between X10 and Chapel ..................................................................... 43! 4.4! UPC++ ..................................................................................................................... 44! 4.4.1! Execution model: ........................................................................................... 44! 4.4.2! Parallel Constructs ......................................................................................... 44! 4.4.3! Synchronization ............................................................................................. 46! 4.4.4! Shared Object ................................................................................................. 46! 4.4.5! Remote Function Invocation .......................................................................... 47! 4.5! Comparison between UPC++ and other PGAS Languages ..................................... 47! 4.6! Emerald ...................................................................................................................