SCOOP: Simple Concurrent Object-Oriented Programming Extend the pure, strongly typed, object-oriented language Eiffel with a general and powerful concurrency.

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Eiffel: Analysis, Design and Programming Bertrand Meyer (Nadia Polikarpova) Chair of Software Engineering.
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.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
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
Chair of Software Engineering The alias calculus Bertrand Meyer ITMO Software Engineering Seminar June 2011.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 3: Abstract Data Types.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
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.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
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.
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 1 Concurrent Object-Oriented Programming Arnaud Bailly, Bertrand Meyer and Volkan Arslan.
Chair of Software Engineering ATOT - Lecture 12, 12 May Advanced Topics in Object Technology Bertrand Meyer.
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.
Concurrency CS 510: Programming Languages David Walker.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 4: The Interface of a Class.
Chair of Software Engineering OOSC - Lecture 4 1 Object-Oriented Software Construction Bertrand Meyer.
SCOOP: Simple Concurrent Object-Oriented Programming Piotr Nienaltowski, Volkan Arslan, Bertrand Meyer presented by: Mark Schall.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
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.
1 I/O Management in Representative Operating Systems.
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.
Chair of Software EngineeringOOSC – Summer Semester 2005 Object-Oriented Software Construction Bertrand Meyer Lecture 19: SCOOP Simple Concurrent Object-Oriented.
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
Chair of Software Engineering JMLC 2003, , Klagenfurt Austria Event Library: an object-oriented library for event-driven design Volkan Arslan,
CS252: Systems Programming Ninghui Li Final Exam Review.
Advances in Language Design
What is Concurrent Programming? Maram Bani Younes.
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Chapter 9 Message Passing Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
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.
Processes Introduction to Operating Systems: Module 3.
Synchronization Methods in Message Passing Model.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Fall 2000M.B. Ibáñez Lecture 26 I/O Systems II. Fall 2000M.B. Ibáñez Application I/O Interface I/O system calls encapsulate device behaviors in generic.
DBC NOTES. Design By Contract l A contract carries mutual obligations and benefits. l The client should only call a routine when the routine’s pre-condition.
18 September 2008CIS 340 # 1 Last Covered (almost)(almost) Variety of middleware mechanisms Gain? Enable n-tier architectures while not necessarily using.
Semaphores Chapter 6. Semaphores are a simple, but successful and widely used, construct.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
SCOOPLI for .NET: a library for concurrent object-oriented programming
Simple Concurrent Object-Oriented Programming
Outline Other synchronization primitives
Out-of-Process Components
Real-time Software Design
Concurrency Specification
The Active Object Pattern
Overview of AIGA platform
Out-of-Process Components
Foundations and Definitions
CS561 Computer Architecture Hye Yeon Kim
Presentation transcript:

SCOOP: Simple Concurrent Object-Oriented Programming Extend the pure, strongly typed, object-oriented language Eiffel with a general and powerful concurrency and distribution model. SCOOP goals: Minimality of mechanism (only one new keyword) Full use of inheritance and other object-oriented techniques Compatibility with Design By Contract Provability Support for command-query distinction Applicability to many forms of concurrency Adaptability through libraries Support for reuse of non-concurrent software Support for deadlock avoidance Processors separate class BOUNDED_BUFFER [G] inherit BOUNDED_QUEUE [G] end To use a call such as q.remove (where q: BOUNDED_BUFFER [G]), you must enclose it in a routine using q as formal argument. It may be useful to provide a class BUFFER_ACCESS that fully encapsulates the notion of bounded buffer. indexing description: Encapsulation of access to bounded buffers" class BUFFER_ACCESS [G] put (q: BOUNDED_BUFFER [G]; x: G) is -- Insert x into q, waiting if necessary until there is room. require not q.full do q.put (x) ensure not q.empty end remove (q: BOUNDED_BUFFER [G]) is -- Remove an element from q, waiting if necessary -- until there is such an element. require not q.empty do q.remove ensure not q.full end item (q: BOUNDED_BUFFER [G]): G is -- Oldest element not yet consumed require not q.empty do Result := q.item ensure not q.full end end -- BUFFER_ACCESS [G] Concurrent Object-Oriented Programming SCOOP Volkan Arslan, Bertrand Meyer, Piotr Nienaltowski Chair of Software Engineering, ETH Zurich, Switzerland Multiprocessing Client server computing Multitasking, multiprogramming Intra-application concurrency (concurrency within an application) Object Request Brokers (ORB) Remote execution (e.g. through the WWW) (Hard) real-time and embedded systems Systematic approach to deadlock prevention Precise fairness policies Proof rules, actual proofs GoalMethod Concurrency variants Challenges Example: Bounded Buffers SCOOP architecture To perform a computation is n to use certain processors to apply certain actions to certain objects. Definition: processor A processor is an autonomous thread of control capable of supporting the sequential execution of instructions on one or more objects. Need to declare whether client processor is the same as supplier processor or another. x: separate CLASS_X If Object 1 and Object 2 have the same processor, any further operation on Object 1 (next_instruction) must wait until the call terminates. Such calls are said to be synchronous. If Object 1 and Object 2 are handled by different processors, operation on Object 1 can proceed as soon as it has initiated the call on Object 2. Such calls are said to be asynchronous. class BUFFER_ACCESS [G] feature put (q: separate BOUNDED_QUEUE [G]; x: G) is -- Insert x into q, waiting if necessary until there is room. require not q.full do q.put (x) ensure not q.empty end The call put (q, a_value) will block until: q is available. the precondition not q.full is true. A precondition applying to a separate argument will be a wait condition instead of a correctness condition. Once a separate call has started, a client only needs to wait for its termination if the call is to a query. r (..., t: separate SOME_TYPE,...) is do t.p (...) other_instruction k := t.some_value end The attempt to snatch a shared object from its current holder. Request immediate service: immediate_service Accept immediate service: yield Challenger Holder normal_serviceimmediate_service retainChallenger waitsException in challenger yieldChallenger waitsException in holder; serve challenger Processor assignment Simple notation: Concurrency Control File (CCF) creation proc1: sales.microsoft.com (2), coffees.whitehouse.gov (5),... proc2: (1),... Physical resources may be Internet nodes, threads, Unix or Windows processes, etc. Reserving an object Separate Entities Dual semantics of a call: Wait by necessity Duels Two-level architecture: First layer:Platform independent Second layer:Platform dependent