Concurrent Object-Oriented Programming Languages Chris Tomlinson Mark Scheevel.

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

Introduction to Object Orientation System Analysis and Design
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
1/25 Concurrency and asynchronous computing How do we deal with evaluation when we have a bunch of processors involved?
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors.
CS 584. A Parallel Programming Model We need abstractions to make it simple. The programming model needs to fit our parallel machine model. Abstractions.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Software Connectors. Attach adapter to A Maintain multiple versions of A or B Make B multilingual Role and Challenge of Software Connectors Change A’s.
Chair of Software Engineering 1 Concurrent Object-Oriented Programming Arnaud Bailly, Bertrand Meyer and Volkan Arslan.
Concurrency CS 510: Programming Languages David Walker.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
3.5 Interprocess Communication
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Asynchronous Message Passing EE 524/CS 561 Wanliang Ma 03/08/2000.
PRASHANTHI NARAYAN NETTEM.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.
The chapter will address the following questions:
Introduction To System Analysis and design
Ryan McAlister CONNECTORS. Introduction Integration and interaction As important as developing functionality More challenging decisions Transfer control.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Architecting Web Services Unit – II – PART - III.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
Reliable Communication in the Presence of Failures Based on the paper by: Kenneth Birman and Thomas A. Joseph Cesar Talledo COEN 317 Fall 05.
Concurrent Aggregates (CA) Andrew A. Chien and William J. Dally Presented by: John Lynn and Ryan Wu.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Hadi Salimi Distributed Systems Lab, Computer Engineering School, Iran University of Schience and Technology, Tehran, Iran Winter 2011.
1 Advanced Behavioral Model Part 1: Processes and Threads Part 2: Time and Space Chapter22~23 Speaker: 陳 奕 全 Real-time and Embedded System Lab 10 Oct.
Chapter 12 Support for Object oriented Programming.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Lecture 8 Page 1 CS 111 Online Other Important Synchronization Primitives Semaphores Mutexes Monitors.
Object Oriented Discrete-Event Simulation CS4730 Fall 2010 Jose M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Software Connectors Acknowledgement: slides mostly from Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic,
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Software Connectors in Practice Software Architecture.
 Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Interprocess Communication  Communication in Client-Server.
CS533 - Concepts of Operating Systems 1 Threads, Events, and Reactive Objects - Alan West.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
A Survey of Object-Oriented Concept Oscar Nierstrasz.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Distributed Computing, M. L. Liu 1 Interprocess Communications Mei-Ling L. Liu.
Adding Concurrency to a Programming Language Peter A. Buhr and Glen Ditchfield USENIX C++ Technical Conference, Portland, Oregon, U. S. A., August 1992.
Software Connectors.
#01 Client/Server Computing
COT 5611 Operating Systems Design Principles Spring 2012
Transactional Memory Semaphores, monitors, and conditional critical regions all suffer from limitations based on lock semantics Naïve synchronization may.
Mobile Agents.
Chapter 20 Object-Oriented Analysis and Design
Threading And Parallel Programming Constructs
Software Connectors.
Lecture 24: Multiprocessors
COT 5611 Operating Systems Design Principles Spring 2014
Ch 3.
#01 Client/Server Computing
Presentation transcript:

Concurrent Object-Oriented Programming Languages Chris Tomlinson Mark Scheevel

Introduction (i) Concurrency –multiple independent activities within a system, including control and communication Message passing –distinguish between metaphor for interaction among objects ”real” message passing as communication in the context of concurrent computational activity –A number of design issues for the latter can be safely ignored when there is no real concurrency

Introduction (ii) In the message passing metaphor objects are autonomous active entities that synchronize and exchange information by sending messages This has advantage over shared memory approaches that separate the universe into passive data and active processes Message passing combines information transfer with synchronization into one construct (more favourable than the use of semaphores) A shared memory model does not lend itself very well to distributed implementations

Introduction (iii) Reasons to consider explicit features of concurrency in programming languages –The world is concurrent and the task of program design will be eased if expressing concurrency is closely matched to the concurrency to be modelled –Performance gain over sequential implementations –Replication of processing can benefit from a well designed method of expressing concurrency

Introduction (iv) Benefit of object orientation –object orientation describes things as multiple independent and interacting entities –high degree of reference locality minimizing the amount of communication activity most frequently accessed data are most easily accessed eliminating unnecessary sharing among relative independent program parts object oriented languages explicitly identify the most intimate pieces of code and data and facilitates decision about placement and separation

Interaction primitives Interaction between two objects involves –one object sending a message –one (or more) objects receiving the message There may be more that one construct provided to send or receive messages in a given language Constructs may be –synchronous (causing the process to block until some message related event occur) –asynchronous (allowing the object to continue processing when the message construct is executed locally)

Message constructs The character of concurrent languages is determined by –the set of sending and receiving constructs –the way these constructs interact Four possible sets of constructs covering the major design approaches that have been taken (pages and figures are missing....) –asynchronous message passing – –non-blocking remote procedure call –future rpc

Encapsulation Ideally objects maintain their own local state and state is only accessible by its own local methods Synchronization problems: –class variables violates this principle –method lookup can also be viewed as class variable access –scoping rules and block objects

Class consistency Object migration and independent redefinition can cause class inconsistency If objects do not migrate and creation requires existence of appropriate class objects at the same node, then objects are guaranteed to be consistent If object migration is allowed, it is possible for an object to migrate to a node with an incompatible or missing class object The proper approach is to work with a system wide class hierarchy

The Actor Model (i) Everything in a system is taken to be an actor Actors are completely independent on other actors All actions taken by an actor upon receipt of a message are concurrent, no implicit serial ordering of the actions in a method Actors are characterized by an identity and a current behaviour Actors may be partitioned into primitive and non primitive classes

The Actor Model (ii) Non primitive actors have –an identity represented by a mail-address –current behaviour composed of a set of acquaintances (instance variables or local state) and a script defining the actions that an actor will take upon receipt of a message Message passing is nonblocking and asynchronous using a mail-queue All message sends are concurrent

Issues The actor model does not define any model for code sharing Delegation can provide some of the effects of sharing that inheritance can provide

Other approaches

Concurrent Smalltalk synchronization by various forms of message passing –asynchronous message passing; anObject aMess & –Cbox Objects ; an intermediary that serve as a synchronization point for two asynchronously communicating objects –NonBlocking reply ; an object is allowed to reply to a sender without terminating the execution of the enclosing method –atomic objects behaves as serialized resources –Secretaries is another method for serialized execution, with a secretary object responsible for suspending and reactivating methods

Dally’s Concurrent Smalltalk Asynchronous message passing –a form of future rpc that permits multiple requests to be send Lock variables and locking –defined in the class an instantiated per-instance –the method defines the set of locks that it requires and the set it excludes Distributed objects –multiple constituent objects with the same behaviour but with possibly different local data –message is sent to the logically distributed object but fielded by one of the constituent objects

Other approaches Orient84/K –combines a Smalltalk-like object oriented model with a Prolog-style deductive execution mechanism POOL-T –strongly typed concurrent object-oriented language