Object-Oriented Software Construction



Similar documents
SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

Lecture 1: Introduction

Chapter 7, System Design Architecture Organization. Construction. Software

Software: Systems and Application Software

Quotes from Object-Oriented Software Construction

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure


Distributed Systems LEEC (2005/06 2º Sem.)

A UML Introduction Tutorial

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Aerospace Software Engineering

Architecture Design & Sequence Diagram. Week 7

Automating Business Processes Using SharePoint Designer

Real Time Programming: Concepts

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Distributed Systems. REK s adaptation of Prof. Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 1

Software Life-Cycle Management

Web Services. Copyright 2011 Srdjan Komazec

Component Based Software Engineering: A Broad Based Model is Needed

Chapter 6, The Operating System Machine Level

Course Development of Programming for General-Purpose Multicore Processors

Infrastructure that supports (distributed) componentbased application development

A distributed system is defined as

Middleware Lou Somers

IEC The Fast Guide to Open Control Software

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

Object-Oriented Software Specification in Programming Language Design and Implementation

Implementing an IRC Server Using an Object- Oriented Programming Model for Concurrency

2.1 What are distributed systems? What are systems? Different kind of systems How to distribute systems? 2.2 Communication concepts

Programming Language Pragmatics

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

The Service Revolution software engineering without programming languages

Master Degree Program in Computer Science (CS)

CS222: Systems Programming

A Eiffel: The Essentials

The ConTract Model. Helmut Wächter, Andreas Reuter. November 9, 1999

Chapter 1: Introduction. What is an Operating System?

LabVIEW Advanced Programming Techniques

ANALYSIS OF GRID COMPUTING AS IT APPLIES TO HIGH VOLUME DOCUMENT PROCESSING AND OCR

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

Distributed File Systems

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

Designing Real-Time and Embedded Systems with the COMET/UML method

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE

Course MS10975A Introduction to Programming. Length: 5 Days

OPERATING SYSTEMS Internais and Design Principles

The ObjectStore Database System. Charles Lamb Gordon Landis Jack Orenstein Dan Weinreb Slides based on those by Clint Morgan

A Software Engineering Process for Operational Space Weather Systems. S. Dave Bouwer, W. Kent Tobiska Space Environment Technologies

A Multi-layered Domain-specific Language for Stencil Computations

1 Organization of Operating Systems

Middleware. Peter Marwedel TU Dortmund, Informatik 12 Germany. technische universität dortmund. fakultät für informatik informatik 12

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation.

Object-Oriented Modeling and Design

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements


Java SE 8 Programming

In the IEEE Standard Glossary of Software Engineering Terminology the Software Life Cycle is:

Web Application Architectures

Visual Basic. murach's TRAINING & REFERENCE

Introduction. What is an Operating System?

Vragen. Architecture presentations in practice. Some terms (from IEEE standard)


Objectives. Distributed Databases and Client/Server Architecture. Distributed Database. Data Fragmentation

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Java (12 Weeks) Introduction to Java Programming Language

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Software Design. Software Design. Software design is the process that adds implementation details to the requirements.

Japan Communication India Skill Development Center

Operating System Tutorial

Networking Operating Systems (CO32010)

RUP Design. Purpose of Analysis & Design. Analysis & Design Workflow. Define Candidate Architecture. Create Initial Architecture Sketch

Interconnection Networks

How To Design Software

Database System Concepts

In this Lecture you will Learn: Systems Development Methodologies. Why Methodology? Why Methodology?

Software Concepts. Uniprocessor Operating Systems. System software structures. CIS 505: Software Systems Architectures of Distributed Systems

Multi-threaded FTP Client

U III 5. networks & operating system o Several competing DOC standards OMG s CORBA, OpenDoc & Microsoft s ActiveX / DCOM. Object request broker (ORB)

An Eiffel Tutorial. Interactive Software Engineering

Virtual machine interface. Operating system. Physical machine interface

ECS 165A: Introduction to Database Systems

Basic Unix/Linux 1. Software Testing Interview Prep

The Fastest Way to Parallel Programming for Multicore, Clusters, Supercomputers and the Cloud.

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Ingegneria del Software Corso di Laurea in Informatica per il Management. Object Oriented Principles

Software Service Engineering Architect s Dream or Developer s Nightmare?

4.1 CD BSc (Hons) Information Technology (Diploma to Degree Upgrade 1.5 Years Part Time)

Chapter 3 Simulation Software. Simulation Modeling and Analysis Chapter 3 Simulation Software Slide 1 of 13

Fundamentals of Java Programming

The Mjølner BETA system

Software design (Cont.)

Parallel Computing in Python: multiprocessing. Konrad HINSEN Centre de Biophysique Moléculaire (Orléans) and Synchrotron Soleil (St Aubin)

Chapter 3: Operating-System Structures. Common System Components

Transcription:

1 Object-Oriented Software Construction Bertrand Meyer

2 Lecture 24: Concurrent O-O principles

The goal 3 Provide a practical and general foundation for concurrent and distributed programming, ensuring reliability, reusability availability and extendibility.

The issue 4 Everyone wants to benefit from concurrency and distribution Physical (networks, multiprocessors) Logical (processors, threads) but applications remain extremely difficult to build, especially to build right. SCOOP provides: Generality Ease of programming Robustness (including liveness,...) Availability Extendibility, reusability

Generality 5 Provide a simple, general, easy to use concurrency and distribution mechanism for programming concurrent applications: Internet and Web programming. Web services, peer-to-peer... Client-server applications. Distributed processing. Multi-threading. Multiple processes (Unix, Windows 95, Windows NT).

An example: Multithreading 6 Increasingly popular Notoriously hard to get right; major mistakes remain in released applications; theoretical pitfalls Impedance mismatch with O-O programming concepts Synchronization often achieved by low-level mechanisms O2 name landlord loved_one Figaro Almaviva O1 O3 Susanna

Concurrency and objects 7 I can t understand why objects [of O-O languages] are not concurrent in the first place. Robin Milner, 1991

Formulating the question 8 What is the simplest extension of object technology that will support all forms of concurrent computation in an elegant, general and efficient way?

Basic O-O mechanism 9 Feature call (message passing): x.f (a)

Concurrent O-O should be easy! 10 (But: it s not!) Analogies between objects/classes and processes/process-types: General decentralized structure, independent modules. Encapsulated behavior (a single cycle for a process; any number of routines for a class). Local variables (attributes of a class, variables of a process or process type). Persistent data, keeping its value between successive activations.

But the analogy breaks down quickly 11... and leaves room to apparent incompatibilities: Classes are repositories of services; it is fundamental that they should be able to support more than one. How will processes serve each other s requests? The "inheritance anomaly"

Capturing common behaviors 12 deferred class PROCESS feature live is do end feature {NONE} end -- General structure with variants. from until loop end finalize setup is deferred end setup over step over: BOOLEAN is deferred end step is deferred end finalize is deferred end Why limit ourselves to just one behavior when we can have as many as we want?

A printer mechanism 13 class PRINTER inherit PROCESS rename end over as off_line, finalize as stop feature stop is do end step is do end -- Go off-line. off_line := True -- Execute individual actions of an iteration step. start_job process_job finish_job

A printer mechanism (cont d) 14 feature {NONE} setup is do end start_job is do end process_job is do end end finish_job is do end

Other possible features 15 print_diagnostics prepare_for_maintenance restart_job

The basic triangle of computation 16 Computing consists of applying operations to objects; to do so requires the appropriate mechanisms processors. Action Object Processor

Separate entities 17 A call of the form x.f (a) has different semantics when handled by the same or different processors. Need to declare whether client processor is the same as supplier processor or another. x: separate A Contrast with the usual x: A which guarantees handling by same processor.

Consistency rule 18 In assignment x := y If the source y is separate, the target x must be separate too. Same rule for argument passing.

Separate entities and classes 19 b: separate BOUNDED_QUEUE [SOME_TYPE] or: separate class BOUNDED_BUFFER [G] inherit BOUNDED_QUEUE [G] end x: BOUNDED_BUFFER [SOME_TYPE]

Creation 20 If x is separate, then the creation instruction create x grabs a new processor, physical or virtual, and assigns it to handle the object. Also: it is possible to obtain a separate object as the result of a function. So processors can be allocated outside of Eiffel text proper.

Generality 21 Separate declaration does not specify the processor. Semantic difference between sequential and concurrent computation narrowed down to difference for separate calls: Precondition semantics Argument passing semantics Creation semantics.

Two-level architecture 22 General-purpose top layer (SCOOP). Several architecture-specific variants at the bottom layer (SCOOP handles). SCOOP HANDLE 1 HANDLE 2 HANDLE n Initial handles:.net remoting; POSIX threads;

Two-level architecture 23 SCOOP.NET THREADS

Predefined constructs and libraries 24 Define specific details (how many processors...) and scheduling policies through libraries.

Processor assignment 25 The assignment of actual physical resources to (virtual) processors) is entirely dynamic and external to the software text. Simple notation: Concurrency Control File (CCF) creation proc1: sales.microsoft.com (2), coffees.whitehouse.gov (5),... proc2: 89.9.200.151 (1),... Physical resources may be Internet nodes, threads, Unix or Windows processes, etc.

26 End of lecture 24