Download
scoop it up n.
Skip this Video
Loading SlideShow in 5 Seconds..
SCOOP it up! PowerPoint Presentation
Download Presentation
SCOOP it up!

SCOOP it up!

181 Views Download Presentation
Download Presentation

SCOOP it up!

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. SCOOP it up! Piotr Nienaltowski Chair of Software Engineering, ETH Zurich, Switzerland joint work with Volkan Arslan and Bertrand Meyer ETH Zurich PPoPP 2003, 13.06.2003, San Diego

  2. Motivation • Extend a pure, strongly typed, object-oriented language (Eiffel, …) with a simple, general and powerful concurrencymodel • Provide the IT industry with a simple and powerful model for parallel programming • Make programmers sleep better! • Let them forget about all the nightmares of parallel programming and make their lives easier PPoPP 2003, 13.06.2003, San Diego

  3. The SCOOP model • Simple Concurrent Object-Oriented Programming • High-level concurrency mechanism • Full use of inheritance and other object-oriented techniques • Applicable to many physical setups: multiprocessing, multithreading, distributed execution, etc. • Based on Design by Contract PPoPP 2003, 13.06.2003, San Diego

  4. Object-oriented computation To perform a computation is • to use certain processors • to apply certain actions • to certain objects. PPoPP 2003, 13.06.2003, San Diego

  5. What makes an application concurrent? Processor: autonomous thread of control supporting sequential execution of instructions on one or more objects Can be implemented as: • CPU • Process • Thread • AppDomain (.NET) … PPoPP 2003, 13.06.2003, San Diego

  6. Feature call (synchronous) • Fundamental scheme of O-O computation: feature call x.f (a) • x:CLASS_X PPoPP 2003, 13.06.2003, San Diego

  7. Separate feature call (asynchronous) • Fundamental scheme of O-O computation: feature call x.f (a) • x:separateCLASS_X PPoPP 2003, 13.06.2003, San Diego

  8. Access control policy • Target of a separate call must be a formal argument of the enclosing routine: store (buffer:separate BUFFER; value: INTEGER)is -- Store value into buffer. do buffer.put (value) end • To obtain exclusive access to a separate object, use it as argument of the call: store (my_buffer, 10) PPoPP 2003, 13.06.2003, San Diego

  9. From preconditions to wait-conditions Contracts in Eiffel store (buffer: BUFFER; value: INTEGER)is -- Store value into buffer. require not buffer.is_full value > 0 do buffer.put (value) ensure notbuffer.is_empty end ... store (my_buffer, 10) • If b is separate, precondition becomes wait condition (instead of correctness condition) PPoPP 2003, 13.06.2003, San Diego

  10. From preconditions to wait-conditions Contracts in Eiffel store (buffer:separate BUFFER; value: INTEGER)is -- Store value into buffer. require not buffer.is_full value > 0 do buffer.put (value) ensure notbuffer.is_empty end ... store (my_buffer, 10) • If buffer is separate, precondition becomes wait condition. PPoPP 2003, 13.06.2003, San Diego

  11. Synchronization • No special mechanism needed for client to resynchronize with supplier after separate call. • The client will wait only when it needs to: x.f x.g (a) y.f … value := x.some_query PPoPP 2003, 13.06.2003, San Diego

  12. Synchronization • No special mechanism needed for client to resynchronize with supplier after separate call. • The client will wait only when it needs to: x.f x.g (a) y.f … value := x.some_query • This mechanism is called wait by necessity. PPoPP 2003, 13.06.2003, San Diego

  13. SCOOP platform-independent .NET Compact Framework .NET POSIXThreads … Two-level architecture of SCOOP • SCOOP can be implemented in several environments • Microsoft .NET is our current platform PPoPP 2003, 13.06.2003, San Diego

  14. Future work • Extension of access control policy • multiple locking of separate objects based on the concept of pure functions • Instruction-level parallelism • Deadlock prevention • Extending SCOOP for real-time systems • duel mechanism with priorities • timing assertions PPoPP 2003, 13.06.2003, San Diego

  15. Conclusion SCOOP model is simple yet powerful • Full concurrency support • Full use of object-oriented techniques • Just one new keywordseparate • Based on Design by Contract • Several platforms and architectures PPoPP 2003, 13.06.2003, San Diego

  16. Scoop it up! PostDoc and RA/PhD positions available At the Chair of Software Engineering, ETH Zurich, lead by Bertrand Meyer • SCOOP project (PostDoc/RA) • Formal methods for O-O programming (RA) http://se.inf.ethz.ch PPoPP 2003, 13.06.2003, San Diego