Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 2: Introduction.

Slides:



Advertisements
Similar presentations
Part 3: Safety and liveness
Advertisements

Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 1: Eiffel Introduction.
Silberschatz, Galvin and Gagne ©2007 Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Chapter 6 (a): Synchronization.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 4: Mutual Exclusion.
May 2, 2015©2006 Craig Zilles1 (Easily) Exposing Thread-level Parallelism  Previously, we introduced Multi-Core Processors —and the (atomic) instructions.
Critical Section chapter3.
Chair of Software Engineering PPoPP 2003, , San Diego SCOOP it up! Piotr Nienaltowski Chair of Software Engineering, ETH Zurich, Switzerland.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 11: An introduction to CSP.
Tele Design of Reactive Systems Summer 2001 Prof. Dr. Stefan Leue Institute for Computer Science Albert-Ludwigs-Universität Freiburg
Concurrency.
Example (1) Two computer systems have been tested using three benchmarks. Using the normalized ratio formula and the following tables below, find which.
Race Conditions Critical Sections Deker’s Algorithm.
CPSC 668Set 9: Fault Tolerant Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
5.6 Semaphores Semaphores –Software construct that can be used to enforce mutual exclusion –Contains a protected variable Can be accessed only via wait.
Race Conditions Critical Sections Dekker’s Algorithm.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Chair of Software Engineering 1 Concurrent Object-Oriented Programming Arnaud Bailly, Bertrand Meyer and Volkan Arslan.
Avishai Wool lecture Priority Scheduling Idea: Jobs are assigned priorities. Always, the job with the highest priority runs. Note: All scheduling.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 3: Introduction.
Chair of Software Engineering 1 Introduction to Programming Bertrand Meyer Exercise Session 1 22 September 2009.
Chair of Software Engineering 1 Introduction to Programming Bertrand Meyer Exercise Session 6 7 October 2008.
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 Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 11: An introduction to CSP.
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 Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 9.
Topic ? Course Overview. Guidelines Questions are rated by stars –One Star Question  Easy. Small definition, examples or generic formulas –Two Stars.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
1 Testing Concurrent Programs Why Test?  Eliminate bugs?  Software Engineering vs Computer Science perspectives What properties are we testing for? 
1 Thread Synchronization: Too Much Milk. 2 Implementing Critical Sections in Software Hard The following example will demonstrate the difficulty of providing.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
Multi-core Programming Introduction Topics. Topics General Ideas Moore’s Law Amdahl's Law Processes and Threads Concurrency vs. Parallelism.
Lecture 5 : JAVA Thread Programming Courtesy : MIT Prof. Amarasinghe and Dr. Rabbah’s course note.
Amdahl's Law Validity of the single processor approach to achieving large scale computing capabilities Presented By: Mohinderpartap Salooja.
Yang Liu, Jun Sun and Jin Song Dong School of Computing National University of Singapore.
COMP 111 Threads and concurrency Sept 28, Tufts University Computer Science2 Who is this guy? I am not Prof. Couch Obvious? Sam Guyer New assistant.
Internet Software Development Controlling Threads Paul J Krause.
Chapter 1 Performance & Technology Trends Read Sections 1.5, 1.6, and 1.8.
11/18/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
Program correctness The State-transition model A global states S  s 0 x s 1 x … x s m {s k = set of local states of process k} S0  S1  S2  Each state.
Advanced Computer Networks Lecture 1 - Parallelization 1.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles Synchronization Emery Berger and Mark Corner University.
1 MSR/Cambridge Formal Verification Overview Byron Cook Microsoft Research, Cambridge.
Comunication&Synchronization threads 1 Programación Concurrente Benemérita Universidad Autónoma de Puebla Facultad de Ciencias de la Computación Comunicación.
CIS 720 Lecture 5. Techniques to avoid interference Disjoint variables –If the write set of each process is disjoint from the read and write set of other.
1 Lecture #24 Shared Objects and Concurrent Programming This material is not available in the textbook. The online powerpoint presentations contain the.
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
Agenda  Quick Review  Finish Introduction  Java Threads.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Tools Fest: MS Project.
Introduction to Parallel Computing: MPI, OpenMP and Hybrid Programming
What I Teach (Do what I say, not what I do)
Literature Review Dongdong Chen Peng Huang
Race Conditions Critical Sections Dekker’s Algorithm
Multiprocessor Synchronization Algorithms ( )
Chapter 26 Concurrency and Thread
Midterm review: closed book multiple choice chapters 1 to 9
Quiz Questions Parallel Programming Parallel Computing Potential
Group Mutual Exclusion & Hadzilacos Algorithm
2P13 Week 3.
CIS 720 Lecture 5.
Foundations and Definitions
Quiz Questions Parallel Programming Parallel Computing Potential
Quiz Questions Parallel Programming Parallel Computing Potential
Quiz Questions Parallel Programming Parallel Computing Potential
CE 3500 Transportation Engineering Introduction to Roadway Safety
Process Management -Compiled for CSIT
CIS 720 Lecture 5.
Don Porter Portions courtesy Emmett Witchel
Presentation transcript:

Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 2: Introduction

2 Overview Prisoners: Synchronization Safety vs. Liveness Amdahl’s Law

3 Prisoners: Synchronization I will do nothing. toggle the light switch. announce that all prisoners have been interrogated.

4 Prisoners: Synchronization Each prisoner will be interrogated arbitrarily often. More precisely, for any n, eventually each of the prisoners will be interrogated at least n times. If the announcement is true then all of the prisoners will be set free. Otherwise all of them will be executed. What is a winning strategy?

5 Safety vs. Liveness safety: Nothing bad happens ever. liveness: Something good happens eventually. example  If two or more processes are waiting to enter their critical sections, at least one succeeds.  Is this a safety or a liveness property?  What is the good / bad thing?

6 Amdahl’s Law parallel fraction sequential fraction number of processors