Object-Oriented Parallel Paradigms
Total Page:16
File Type:pdf, Size:1020Kb
COPYRIGHT AND CITATION CONSIDERATIONS FOR THIS THESIS/ DISSERTATION o Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. o NonCommercial — You may not use the material for commercial purposes. o ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. How to cite this thesis Surname, Initial(s). (2012) Title of the thesis or dissertation. PhD. (Chemistry)/ M.Sc. (Physics)/ M.A. (Philosophy)/M.Com. (Finance) etc. [Unpublished]: University of Johannesburg. Retrieved from: https://ujdigispace.uj.ac.za (Accessed: Date). ~~\O v. \jK~ OBJECT-ORIENTED PARALLEL PARADIGMS by CHRIS KYRIAKIDES DISSERTATION presented in fulfilment of the requirements of the Degree MASTER OF SCIENCE m COMPUTER SCIENCE in the FACULlY OF NATURAL SCIENCE at the RAND AFRIKAANS UNIVERSIlY SUPERVISOR: DR MARTIN OLIVIER Objed.orieDtecl ParaDeI Paradigms Table of Contents Synopsis __•.....• I' I ............. 11 I .. Opsomming I IF I ••• • I"" '" I f U Preface " lIi.. I 111 II ....n II' II ..n ..... I ..lu..1t ill Ackn.owIedgm.ents . .. II , In II' .. III .11111 vi Problem Statement r II' I II n. "' • vii 1 Inttoduction Q I '11.11 al" ,..... .. • •••••••••• 2 1.1 Introduction to OOPP's Object Taxonomy __ 2 1.2 Introduction to Object-to-Processor Mapping __ 3 13 Introduction to the Manager-Employee Model 3 13.1 Fundamental concept of the Manager-Employee Approach 3 13.2 Dilemma of a Manager-free approach to mcorporatmg managerial duties 4 133 Approaches to representing Managers 4 1.4 Limitations on the current OOPP research 6 15 Suppo~ Languages and environments 7 1.6 Oblect-Onentation and Parallelism 7 1.7 Object Technology Classification 9 1.8 Summary 9 2 Introduction to Parallel Processing _ ....-........................................ U 2.1 Amdahl's Law 13 2.2 Flynn's Taxonomy 14 2.2.1 Processor Array Architecture 15 2.2.2 MIMD Computers 15 23 Developing Algorithms for MIMD Computers 16 23.1 Categorisation of MIMD Algorithms 16 23.1.1 Pipelined Algorithms 17 23.1.2 Partitioned Algorithms 17 23.13 Relaxation 18 23.2 Factors influencing Speedup 18 2.4 Correctness for Concurrent Processes 20 25 Process Communication and Synchronisation on MIMD Models 21 2.6 In support of Object-Oriented Parallelism 21 27 Summary: Parallel Processing 21 3 Object Technolog)'. Concepts 1.1 I...................................... 24 3.1 Object Technology Fundamentals 24 3.1.1 Object-Oriented Approach 25 3.1.2 Class-Based Approach 26 3.13 Object-Based Approach 26 3.2 Objects 26 3.2.1 Methods and Attributes 26 3.2.2 Private and Public parts 27 3.23 Operations Z7 3.2.4 Object Behaviour 28 33 Message Passing Protocol 28 33.1 Messages :........................................... 28 33.2 Methods 28 333 Signatures 29 33.4 Message Names 29 3.4 Classes and Instances 29 35 Object Relationships 30 3.6 Inheritance 32 3.6.1 Class/Static Inheritance 33 3.6.2 Dynamic Inheritance 35 3.63 Other Inheritance issues 36 3.7 Polymorphism 37 May 1994 C Kyriakides Page i Object-OrieDted Parallel Paradigms 3.7.1 Polymorphic Variables 38 3.7.2 Polymorphic Functions 38 3.7.3 Polymorphic Operators _........................................ 39 3.7.4 Polymorphic Messages _ 39 3.7.5 Inclusion Polymorphism _ 40 3.7.6 Polymorphism's role as an Abstraction Mechanism ._....................................... 40 3.8 Homogeneous models _....................................... 40 3.9 Encapsulation _ 41 3.10 Reusability _.. • 41 3.10.1 Dynamic and Static Instantiation ", " 41 3.10.2 Object Classes ~........... 42 3.10.3 Inheritance 42 3.10.4 Polymorphism ,. 42 3.10.5 Generic Classes "................................ 43 3.10.6 Object Types •. 43 3.11 Concurrency 44 3.11.1 Concurrency using passive Objects 45 3.11.2 Concurrency using message passing 45 3.12 Interaction Primitives based on Message Passing 46 3.13 Object M~agement ;............................................................ 49 3.14 Ob~ect-Onented Databases ; 50 3.15 Object-Oriented Programming Environments 51 3.16 Conclusion: Object Technology Concepts 51 Obj~ 4 Technolog)" Methodologi.es , 11 1 _ S2 4.1 Data-Driven vs Responsibility-Driven Design 52 4.1.1 Data-Driven Design 53 4.1.2 Responsibili!y-Driven Design 53 4.1.2.1 The Client/Server Model 55 4.1.3 Comparing Responsibility-Driven and Data-Driven Design 56 4.1.4 Langu~e Support 57 4.1.4.1 Luniting Access to Variables 57 4.1.4.2 Limiting Access to Behaviour 57 4.1.5 Conclusion of Responsibility-Driven vs Data-Driven Design 57 4.1.6 Yourdon's OOA and Responsibility-Driven Design 58 4.2 The Law of Demeter 59 4.2.1 Basic Concept of the Law of Demeter 60 4.2.1.1 Formulation Options of the Law of Demeter 61 4.2.2 Advantages and Disadvantages 61 4.2.3 Conclusion on the Law of Demeter 62 I~...-.I ~ 5 Parallel Object-Oriented Concepts II • •• I 64 5.1 Design Considerations 66 5.2 We,gner's Granularity of Modules 71 5.3 Object Taxonomy 72 5.3.1 Unaddressed issues of the Object Taxonomy........................................................... 76 5.3.2 Summary: Object Taxonomy 77 5.4 Object State and Method Coupling 79 5.5 Productivity and Workloads in computers 84 5.5.1 Summary: Productivity and Workloads 88 6 IndustJ-y' and De Facto Standards 111 111....... .. II "1'''1 III 9() 6.1 Industry Standards 90 6.1.1 OSI ;........................................................................ 90 6.1.2 Other Standards 91 6.1.3 ANSI C 92 6.1.4 Benefits of Standards 93 6.2 Object Technology Standards 93 6.2.1 Object Management Group (OMG) 94 6.2.1.1 Technical Objectives of the OMG 95 6.2.1.2 The OMG Object Model 101 May1994 C Kyriakides Page n Objed-OrieDted Parallel Paradigms 6.2.1.3 Object Management Architecture 102 6.2.1.4 ORB (Object Request Broker) ..........................................••••.•••...•..•.......•........ 103 6.2.15 CORBA (Common Object Request Broker Architecture) 104 6.2.1.6 Object Services 105 6.2.1.7 Common Facilities 106 6.2.1.8 Application Objects ...................•.................................•••...•.••.••..••.......•...............• 106 6.2.2 Committee for Advanced DBMS Function (CADF) 107 6.3 Conclusion: Industry and Technology Standards 108 7 Existing Models __ 11 I II' 11 II II .. 111 7.1 Simula Based Languages 117 7.1.1 Beta 118 7.1.2 Conclusion: Simula Based Languages 118 7.2 Smalltalk Based Languages ..................•••.•.••.............................•....•••••.•_ 119 7.2.1 Smalltalk-SO 120 7.2.2 Smalltalk/V ...............•..................•.••..•••.............................•..•....•.••_........................ 120 7.2.3 Concurrent Smalltalk 121 7.2.4 Conclusion: Smalltalk Based Languages 121 7.3 C Based Languages ................................................................................................................• 122 7.3.1 Objective-C 122 7.3.2 C+ + 123 7.3.3 PROCOL: PROtocol-constrained Concurrent Object Language 125 7.3.4 Conclusion: C Based Languages 128 7.4 LISP Based Languages 130 7.4.1 CWS 131 7.4.1.1 The Three Layers of CWS 132 7.4.1.2 Basic Concepts 132 7.4.1.3 Slots 133 7.4.1.4 Generic Functions and Methods 134 7.4.15 Initialisation 135 7.4.1.6 Inheritance .........................................................................................•..•..•.•........•.. 135 7.4.2 CommonObjects 136 7.4.3 MITRE's Future Generation Computer Architectures Program 137 7.4.4 Conclusion: liSP Based Languages ....................................................•.......•...•....•..•.. 138 75 PROWG Based Languages 139 75.1 PROLOGIV 139 75.2 Concurrent Prolog : 141 75.2.1 Vulcan ........•............................................................................................................ 144 75.3 SPOOL 145 75.4 Conclusion: PROWG Based Languages 146 7.6 Actor Based Languages 148 7.6.1 The Actor Model 149 7.6.1.1 Common Characteristics .•.......................................•................•..........•...••...•..•... 149 7.6.1.2 Basic Concepts ............................•......................................................................... 150 7.6.1.3 Basic Commands ...................................................................•.............................. 150 7.6.1.4 Primitive and Non-Primitive Actors ..............................................•................•. 151 7.6.15 Message Passing Protocol 151 7.6.1.6 Delegation 152 7.6.1.7 Recursion and Communication 153 7.6.1.8 Guardians 154 7.6.1.9 Transactions ~.....................•.................................................................................... 154 7.6.1.10 RACE actors 155 7.6.1.11 Receptionists •...............................................................................................•....... 156 7.6.2 ABCLll 156 7.6.2.1 Message Passing ........................................................................•.........................• 157 7.6.2.2 Project Teams and Project Leaders 160 7.6.3 Actl, Act2 and Act3 161 7.6.4 Conclusion: Actor Based Languages 162 7.7 Object-Oriented Databases (OODB) 165 7.7.1 Conclusion: Object-Oriented Databases 168 7.8 Other Models 171 C Kyriakides Page iii Objed-Oriented Parallel Paradigms 7.8.1 POOL-T 171 7.8.1.1 Conclusion: POOL-T 172 7.8.2 MACE 172 7.8.2.1 Conclusion: MACE •.............•........................................•....••................................ 173 7.8.3 Orient84/K 174 7.8.4 Emerald ·174 7.8.4.1 Conclusion: Emerald 175 7.8.5 Eiffel 176 7.8.5.1 Conclusion: