SCOOP: Simple Concurrent Object-Oriented Programming Piotr Nienaltowski, Volkan Arslan, Bertrand Meyer presented by: Mark Schall.

Slides:



Advertisements
Similar presentations
Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Advertisements

SCOOP: Simple Concurrent Object-Oriented Programming Extend the pure, strongly typed, object-oriented language Eiffel with a general and powerful concurrency.
Threads, SMP, and Microkernels
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 10: Advanced Object-Oriented Mechanisms (based on.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 1: Eiffel Introduction.
2 nd Microsoft Rotor Workshop, Pisa, April 23-25, SCOOPLI for.NET: a library for concurrent object-oriented programming Volkan Arslan, Piotr Nienaltowski.
SCOOP on.NET Volkan Arslan Chair of Software Engineering ETH Zurich, Switzerland
CS 5704 Fall 00 1 Monitors in Java Model and Examples.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 7: SCOOP Type System (based on work with Piotr Nienaltowski)
Chair of Software Engineering PPoPP 2003, , San Diego SCOOP it up! Piotr Nienaltowski Chair of Software Engineering, ETH Zurich, Switzerland.
Computer Systems/Operating Systems - Class 8
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Multithreading The objectives of this chapter are:
Chair of Software Engineering OOSC Lecture 20 - Concurrency Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering Piotr Nienaltowski, SCOOP Simple Concurrent Object-Oriented Programming.
Chair of Software Engineering SCOOP: an introduction Bertrand Meyer Chair of Software Engineering, ETH Zurich, Switzerland
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
DISTRIBUTED AND HIGH-PERFORMANCE COMPUTING CHAPTER 7: SHARED MEMORY PARALLEL PROGRAMMING.
-5- Exception handling What is an exception? “An abnormal event” Not a very precise definition Informally: something that you don’t want to happen.
Chair of Software Engineering Piotr Nienaltowski, , Concurrent Object-Oriented Programming Bertrand Meyer, Piotr Nienaltowski.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Chair of Software Engineering SCOOP for ROTOR Bertrand Meyer Capstone (ROTOR final workshop), 2005 © Bertrand Meyer, 2005.
Chair of Software Engineering ATOT - Lecture 26, 30 June Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering ATOT - Lecture 25, 30 June Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 9: Contracts and Inheritance (based on work with.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 6: Object Creation.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 6:Computational Model (based on work with Piotr Nienaltowski)
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 2: an overview of SCOOP.
PRASHANTHI NARAYAN NETTEM.
Chair of Software EngineeringPiotr Nienaltowski, 2 nd SCOOP workshop, SCOOP update and proposed extensions Piotr Nienaltowski.
Chair of Software EngineeringOOSC – Summer Semester 2005 Object-Oriented Software Construction Bertrand Meyer Lecture 19: SCOOP Simple Concurrent Object-Oriented.
Fundamentals of Python: From First Programs Through Data Structures
Chair of Software Engineering JMLC 2003, , Klagenfurt Austria Event Library: an object-oriented library for event-driven design Volkan Arslan,
Network File System (NFS) in AIX System COSC513 Operation Systems Instructor: Prof. Anvari Yuan Ma SID:
What is Concurrent Programming? Maram Bani Younes.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
DCE (distributed computing environment) DCE (distributed computing environment)
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
IBM OS/2 Warp Mike Storck Matt Kerster Mike Roe Patrick Caldwell.
111 © 2002, Cisco Systems, Inc. All rights reserved.
ABSTRACT The real world is concurrent. Several things may happen at the same time. Computer systems must increasingly contend with concurrent applications.
Contracts for Concurrency - Contracts & Inheritance Aryabrata Basu University of Georgia.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
Chapter 2: A Brief History Object- Oriented Programming Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer.
Threaded Programming in Python Adapted from Fundamentals of Python: From First Programs Through Data Structures CPE 401 / 601 Computer Network Systems.
Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
The Mach System Silberschatz et al Presented By Anjana Venkat.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Multithreading The objectives of this chapter are:
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
SCOOPLI for .NET: a library for concurrent object-oriented programming
Simple Concurrent Object-Oriented Programming
Software Design and Architecture
An Overview of Java.
Shared Memory Programming
Multithreaded Programming
What is Concurrent Programming?
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Multithreading The objectives of this chapter are:
Lecture 12 Input/Output (programmer view)
Presentation transcript:

SCOOP: Simple Concurrent Object-Oriented Programming Piotr Nienaltowski, Volkan Arslan, Bertrand Meyer presented by: Mark Schall

The Problem “What is the simplest, smallest and most convincing extension to the method of systematic object-oriented software construction that can address the needs of concurrent and distributed computing as well as those of sequential computation?” – Bertrand Meyer

SCOOP Model High-level concurrency mechanism Based on Design by Contract Full use of inheritance Applicable to many physical setups: multiprocessing, multithreading, distributed execution

Brief History First published in 1993 by Bertrand Meyer Designed as extension to Eiffel First prototype was implemented in 1995

Architecture Top Layer: – platform independent Bottom Layer: – language/platform specific

Bottom Layer Eiffel: – Added single new keyword separate.NET – Add two new classes to be inherited: SEPARATE_CLIENT SEPARATE_SUPPLIER

Separate Calls Keyword separate declares if an object should be handled on the same processor or not SOME_ROUTINE( x: separate CLASS ) is do x.f() end … x: separate CLASS create x.make b.SOME_ROUTINE(x) x.f() will be handled on a different processor then the call b.SOME_ROUTINE(x)

Client and Supplier Object b (Client) Processor 1 Object x (Supplier) Processor 2 SOME_ROUTINE(x) x.f() f() is do … end

Processors Not just mean physical CPU Threads Processes Computers in a distributed system Application Domain

Access control policy Separate calls are valid if the target of the call is an argument of the enclosing routine SOME_ROUTINE( x: separate CLASS ) is do x.f() end … a: separate CLASS create a.make SOME_ROUTINE(a) -- instead of a.f()

Basic Access Control Policy Example Processor 1 while( !lock(a) ) wait( a ) SOME_ROUTINE(a) a.f() release(a) Processor 2 f() is do … end

Access control policy Using Design by Contract store(buffer: separate BUFFER; value: INTEGER) is require -- precondition buffer_not_full: not buffer.is_full do buffer.put(value) ensure -- postcondition buffer_not_empty: not buffer.is_empty end … buf: separate BUFFER store(buf, 20)

Wait by necessity Client Objects – do not need to wait for feature calls of a supplier in order to call another feature call – must wait on query calls for all previous calls to finish on the same supplier

Example some_feature( x, y, z: separate CLASS ) is do x.f y.f x.g z.f y.g v := x.is_empty -- wait for x.f and x.g v := x.value > y.value -- wait for y.f and y.g end

Producer/Consumer Example ProduceAndConsume( p: separate PRODUCER, c: separate CONSUMER ) is do c.consume_n(5); p.produce_n(5); end … buf: separate BUFFER consumer: separate CONSUMER producer: separate PRODUCER create c.make(buf) create p.make(buf) ProduceAndConsume(producer, consumer)

Producer produce_n (n: INTEGER) is local value: INTEGER i: INTEGER do from i := 1 until i > n loop value := random_gen.next store (buf, value) i := i + 1 end end -- class PRODUCER store (buffer: separate BUFFER [INTEGER]; value: INTEGER) is require buffer_not_full: not buffer.is_full value_provided: value /= Void do buffer.put (value) end

Consumer consume_n (n: INTEGER) is local i: INTEGER do from i := 1 until i > n loop consume_one (buf) i := i + 1 end consume_one (buffer: separate BUFFER [INTEGER]) is require buffer_specified: buffer /= Void buffer_not_empty: not buffer.is_empty do value := buffer.item buffer.remove end

Producer/Consumer Example ProduceAndConsume( p: separate PRODUCER, c: separate CONSUMER ) is do c.consume_n(5); p.produce_n(5); end … buf: separate BUFFER consumer: separate CONSUMER producer: separate PRODUCER create c.make(buf) create p.make(buf) ProduceAndConsume(producer, consumer)

Reusing old software Support for inheritance allows for reuse of non-concurrent software May only require a simple wrapper class separate class BUFFER inherit QUEUE end

Distributed Computing Processors can be Computers in the network Concurrency Control File – maps processors to physical addresses machines processes etc. Can take advantage of.NET Remoting library

Distributed Computing Home Desktop pacific.cse.msu.edu arctic.cse.msu.edu Processor 1 Processor 3 Processor 2 Processor 4 Processor 5 o1 o2 o3 o4 o5 o6 LAN Internet

Duels An attempt to grab a shared object from the current holder Holder – retain (default) – yield Challenger – wait_turn (default) – demand – insist Exceptions interrupt either the Holder or Challenger to settle the Duel

Future Work Real-time programming – Priority mechanisms – Timeout controls Deadlock Avoidance

Future Work RECOOP – Reliable and Efficient Concurrent Object-Oriented Programs Microsoft’s Safe and Scalable Multicore Computing RFP Continuation of SCOOP Developing a practical formal semantics and proof mechanism