[an error occurred while processing this directive]
  [an error occurred while processing this directive]

Concurrent Object-Oriented Programming

Bertrand Meyer, Piotr Nienaltowski, summer semester 2006

Announcements Description Schedule Grading Textbooks Contacts

Announcements

20.06.2006  

The exercise session on 20 June is reserved for your questions about the final project. We will discuss, among others, the following problems:

  • Lock passing in practice
  • Feature 'sleep'
  • Rendezvous implementation
  • Use of 'deep_import'
     
15.06.2006  

The final exam will take place at 13:15 on 27 June (IFW E42). Note that we start one hour earlier, i.e. in the usual exercise session. The exam will take 90 minutes.

There will be 45 minutes for project-related questions after the exam (15:15 to 16:00). You can also schedule your project presentation during that time; let me know if you are interested.
 

15.06.2006  

The exercise session on 20 June is reserved for your questions about the final project. If you want me to discuss any particular problem and present a solution, send an e-mail to the course list before Monday afternoon.
 

14.06.2006  

Here is the lock passing example I presented in the lecture yesterday. Play around with it and try out several tricks: callbacks, sequences of command calls, mixed command and query calls, etc. Compare the behaviour of your program with and without lock passing. Have fun!

Remember: lock passing is applied by default; if you want to turn it off, use scoop2scoopli with /nolockpassing switch:

C:\MyApp>  scoop2scoopli  /nolockpassing  my_application.ace
 

13.06.2006  

In today's exercise session, we will have a look at the implementation of semaphores and barriers in SCOOP. Download the exercise sheet and the examples.

Make sure you have the freshest versions of SCOOP tools: SCOOPLI 0.3.2005 and scoop2scoopli 0.2.2008.
 

01.06.2006  

Have a look at our fresh articles on different aspects of SCOOP:

Piotr Nienaltowski, Bertrand Meyer: Contracts for concurrency, CORDIE'06, July 2006, York, UK. 

Piotr Nienaltowski: Flexible locking in SCOOP, CORDIE'06, July 2006, York, UK. 

Volkan Arslan, Bertrand Meyer: Asynchronous Exceptions in Concurrent Object-Oriented Programming, CORDIE'06, July 2006, York, UK.
 

01.06.2006  

Guest lecture next week (6 June): Volkan Arslan will talk about real-time programming.

IMPORTANT: due to the lecturer's schedule constraints, we will start one hour later (15:15) and the lecture will be shorter (55 minutes). The exercise session on 6 June is cancelled but I will be available for individual meetings during the usual office hours after the lecture. 
 

23.05.2006  

Reading assignment this week:

Bertrand Meyer: Attached types and their application to three open problems of object-oriented programming, ECOOP 2005.
 

23.05.2006   Final project will be announced in today's lecture. Here is the project sheet.
 
16.05.2006   Peter Steiner's implementation of Santa Claus is available for download . It's a nice piece of code that uses new synchronisation classes provided by Java 1.5.

Thanks for an excellent presentation, Peter!
 
15.05.2006   In tomorrow's exercise session, Peter Steiner will present his implementation of the Santa Claus scenario. Bring your laptop if you want to present your solution too.
 
15.05.2006  

I have found an interesting article on inheritance anomalies in modern OO languages (Java, C#, Eiffel/SCOOP):

Giuseppe Milicia, Vladimiro Sassone: The Inheritance Anomaly: Ten Years After, SAC 2004.

Read it before lecture 9 when I talk about inheritance anomalies in SCOOP.

15.05.2006   Slides for lecture 7 (Computational model of SCOOP) are available online.
 
09.05.2006   Updated slides for lecture 5 (CCRs, rendezvous, protected objects) are available online.
 
08.05.2006   Reading assignment for this week:
Satoshi Matsuoka, Akinori Yonezawa: Analysis of Inheritance Anomaly in Object-Oriented Concurrent Programming Languages
 
08.05.2006   I have updated the slides for tomorrow's lecture. A new exercise sheet and a zip file with examples are online.
 
02.05.2006   In the next two exercise sessions we will have a closer look at the implementation of different synchronisation scenarios in Java. We will borrow some examples from an online course on concurrency in Java by Stephen Hartley. The course contains plenty of examples and exercises; it is an excellent place to look for detailed information about multithreading in general and Java threads in particular. It is certainly worth reading!
 
02.05.2006   Read the chapter about Ada's rendezvous concept from

Mordechai Ben-Ari: Principles of Concurrent and Distributed Programming.  Prentice Hall, 1990.
 
12.04.2006   If you want to try out SCOOP tools before they are presented in the exercise session, download the tools (SCOOPLI and scoop2scoopli) from the SCOOP project page and install them (you'll find the instructions on the page).

IMPORTANT: scoop2scoopli requires EiffelStudio 5.5 to be installed (you can download it from here). EiffelStudio 5.6 and 5.7 are not supported.
 
12.04.2006  

A second crash-course on Eiffel and EiffelStudio will be held on April 25.

You don't need to show up if you're familiar with Eiffel and EiffelStudio.

Those of you who attend the crash course:

  • download the buffer example we used in the first session and try to figure out the missing contracts of features 'put' and 'get' in class INTEGER_BUFFER,
  • download the employee example that we're going to use in the next session and have a look at it.
     
06.04.2006   Since a few students have never programmed in Eiffel, there'll be an Eiffel and EiffelStudio crash-course in the exercise session on 11 April.

You don't need to show up if you're familiar with Eiffel and EiffelStudio.

Those of you who need a crash course:
03.04.2006   There is no exercise session on 4 April. The lecture starts at 14:15 in IFW D42.
 
23.03.2006   Register for the course: Please send an email
To: concur-course (at) se.inf.ethz.ch
Subject: Concurrency Course Participant
Content:
  • Your name.
  • Preferred email address.
  • Status: Diploma/Master student (what semester), PhD student, other.
  • Taking the course for credit or not. 

Description

Title and Code

Concurrent Object-Oriented Programming
Course code: 251-0268-00

Scope

Object technology has interesting potential applications to concurrency, distribution, real-time and Web Services. In practice, a number of obstacles have prevented O-O techniques from repeating in the concurrent world the success they have now achieved in the sequential word. This course explores the connections between the object-oriented and concurrent programming paradigms, discussing the problems that arise in the process of attempting to merge them. It reviews the main existing approaches to concurrent O-O computation, including both widely used libraries for multi-threading in Java and .NET and more theoretical frameworks, with a particular emphasis on the SCOOP model. It also provides some of the formal background for discussing the correctness of concurrent O-O applicatons.

Topics

Overview

  • Concurrent and parallel programming
  • Distributed programming
  • Client-server programming
  • Specific issues of embedded and real-time concurrency

Approaches to concurrent programming

  • Notion of process, thread and application domain
  • Message passing versus variable sharing
  • Data consistency issues
  • Enforcing synchronization: semaphores, monitors, barriers, etc.
  • Java and .NET multithreading

Formal models of concurrency

  • Interesting properties of concurrent programs
  • Concurrent calculi: CSP, Pi-calculus, ...

Concurrency and Object-Orientation

  • Language issues
  • Processes versus objects
  • Synchronizing objects

The SCOOP model

  • Processors; handling an object
  • Synchronous and asynchronous feature calls
  • Design by Contract in a concurrent context
  • Separate objects and entities
  • Accessing separate objects; validity rules 
  • Synchronization: waiting, reserving, preconditions as wait conditions, Wait by Necessity
  • Deadlock avoidance
  • Interrupting a reservation: duels and priorities
  • Mapping the processors to physical resources
  • Examples and applications

Extensions and open problems

  • Real-time and embedded extensions
  • Timing contracts
  • Proofs of SCOOP programs

Prerequisites

The course assumes good knowledge of object-oriented principles and programming techniques. Experience with Eiffel and with concurrent programming is helpful but not required.

Objectives

The goal is to provide students with solid knowledge of:

  • State-of-the-art concurrent programming models, languages, and platforms.
  • Foundations for reasoning about concurrent and distributed programs.
  • Approaches blending object-orientation, distribution, and concurrency.
  • Designing applications with concurrent objects.
  • Some open issues, like applications to embedded and real-time systems.
  • Specific technology:  SCOOP.

Organisation

The course is split into two major parts:

  • COOP: a bottom-up, more historical, perspective on concurrent programming. Illustrations are thus made in various programming languages, though Java will be the main focus.
  • SCOOP: concurrent programming with SCOOP. This will part will take a more top-down approach by illustrating issues related to concurrency through the SCOOP model.

Schedule

Weekly schedule

  • Exercise: Tuesday 13.15 - 14.00, IFW D42
  • Lecture:  Tuesday 14.15 - 16.00, IFW D42 

Office hours: Tuesday 16.00 - 18.00, or by appointment, RZ J3

Lectures

Tuesday 4 April Course overview. COOP: foundations of concurrency - tasks, threads, preemption, scheduling, concurrency, parallelism, distribution.
Tuesday 11 April COOP: basic concurrency mechanisms - mutex, semaphore, monitor.
Tuesday 18 April SCOOP: overview (part 1).
Tuesday 25 April

SCOOP: overview (part 2).

Tuesday 2 May

COOP: concurrency and objects - conditional critical regions, rendez-vous, protected objects.

Tuesday 9 May COOP: concurrency and objects - actors, active objects, inheritance anomaly.
Tuesday 16 May SCOOP: computational model - processors, synchronous and asynchronous feature calls, synchronisation.
Tuesday 23 May SCOOP: traitors, validity rules, type system for SCOOP. 
Tuesday 30 May SCOOP: traitors, validity rules, type system for SCOOP. 
Tuesday 6 June Lecture starts at 15:15!
SCOOP: Real-time programming (by Volkan Arslan).
Tuesday 13 June

SCOOP: false traitors, lock passing.
SCOOP: advanced O-O techniques: inheritance, polymorphism, once functions, deferred classes.

Tuesday 20 June SCOOP: advanced O-O techniques: feature redefinition, precursor calls, genericity, agents
Tuesday 27 June

Exam

IMPORTANT: We will start at 13:15 (in the exercise session).

Tuesday 4 July No session this week.

Exercises

Tuesday 4 April No session this week.
Tuesday 11 April Eiffel and EiffelStudio crash course (session 1).
Tuesday 18 April

No session this week.

Tuesday 25 April Eiffel and EiffelStudio crash course (session 2).
Tuesday 2 May Synchronisation mechanisms in Java: threads, monitors. Download examples.
Tuesday 9 May Synchronisation mechanisms: rendez-vous. Download examples.
Tuesday 16 May Synchronisation mechanisms in Java: Santa Claus - students' solutions.
Tuesday 23 May SCOOP: tools. Download scoop2scoopli tool and SCOOPLI library. Final project - announcement.
Tuesday 30 May SCOOP: examples, debugging SCOOP applications.  
Tuesday 6 June

No session this week. Lecture starts at 15:15.

Tuesday 13 June SCOOP: semaphores, barriers. Download exercise sheet and examples.
Tuesday 20 June Final project - Q&A
Tuesday 27 June

Exam

Final project - Q&A (15:15 to 16:00) / project presentations

Tuesday 4 July Deadline for project submission.
No session this week.

Grading

Important : No Testat is delivered for the course. The only way to get a grade is to take the written exam and submit the project. This applies regardless of your department or status.

  • 65% Project: development of a concurrent application using SCOOP (project description ).
  • 35% Exam: all presented topics excluding SCOOP. The exam will be held during the lecture on 27 June.

Textbooks and articles

Gul Agha, Peter Wegner, Akinori Yonezawa (Editors): Research Directions in Concurrent Object-Oriented Programming. MIT Press, 1993.

Gregory R. Andrews: Foundations of Multithreaded, Parallel, and Distributed Programming. Pearson Addison Wesley, 1999.

Mordechai Ben-Ari: Principles of Concurrent and Distributed Programming. Prentice Hall, 1990.

Howard Bowman and John Derrick (Editors): Formal methods for distributed processing: a survey of object-oriented approaches. Cambridge University Press, 2001.

Bertrand Meyer: Object Oriented Software Construction, second edition, Chapter 30, Prentice Hall, 1997.

Piotr Nienaltowski, Volkan Arslan, Bertrand Meyer: Concurrent object-oriented programming on .NET, IEE Proceedings Software, Special Issue on ROTOR, vol. 150, no. 5, 308-314, October 2003.

Piotr Nienaltowski, Bertrand Meyer: Contracts for concurrency, CORDIE'06, July 2006, York, UK. 

Piotr Nienaltowski: Flexible locking in SCOOP, CORDIE'06, July 2006, York, UK. 

Volkan Arslan, Bertrand Meyer: Asynchronous Exceptions in Concurrent Object-Oriented Programming, CORDIE'06, July 2006, York, UK.
 

Contacts

  • Send all email relative to this course to concur-course (at) se.inf.ethz.ch. It will reach the professor and the assistants. Do not use their personal addresses.
  • Contact assistant for the course: Piotr Nienaltowski (http://se.inf.ethz.ch/people/nienaltowski, office RZ J3)

 

Last modified: 20.06.2006 by Piotr Nienaltowski