Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.

Slides:



Advertisements
Similar presentations
© Alan Burns and Andy Wellings, 2001 Real-Time Systems and Programming Languages n Buy Real-Time Systems: Ada 95, Real-Time Java and Real-Time POSIX by.
Advertisements

Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
25 February 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department.
Concurrency: introduction1 ©Magee/Kramer 2 nd Edition Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer.
Chapter 6 Concurrency: Deadlock and Starvation
Chapter 6 Concurrency: Deadlock and Starvation
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
© Andy Wellings, 2004 Concurrent and Real-Time Programming in Java  Electronic copies of course foils available via 
The Banker’s Algorithm for A Single Resource
The ‘deadlock’ conditions Reviewing some key points concerning the potential for ‘deadlock’ in an operating system.
Concurrency CS 510: Programming Languages David Walker.
OS Spring 2004 Concurrency: Principles of Deadlock Operating Systems Spring 2004.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 2: Introduction.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
CPSC 4650 Operating Systems Chapter 6 Deadlock and Starvation
OS Fall’02 Concurrency: Principles of Deadlock Operating Systems Fall 2002.
Real-Time Systems and Programming Languages
EMBEDDED SOFTWARE Team victorious Team Victorious.
Java How to Program, 9/e CET 3640 Professor: Dr. Reyes Álamo © Copyright by Pearson Education, Inc. All Rights Reserved.
Chapter 1 Embedded And Real-Time System Department of Computer Science Hsu Hao Chen Professor Hsung-Pin Chang.
1 System and Realtime Programming (G53SRP) Chris Greenhalgh School of Computer Science.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
9/14/2015B.Ramamurthy1 Operating Systems : Overview Bina Ramamurthy CSE421/521.
Concurrency: introduction1 ©Magee/Kramer Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer.
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
EEL Software development for real-time engineering systems.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Introduction to Concurrency.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
Chapter 7 – Deadlock (Pgs 283 – 306). Overview  When a set of processes is prevented from completing because each is preventing the other from accessing.
1 Deadlocks 2 Resources Examples of computer resources –printers –tape drives –tables Processes need access to resources in reasonable order Suppose.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
1 Deadlocks Chapter 3. 2 Resources Examples of computer resources –printers –tape drives –tables Processes need access to resources in reasonable order.
Operating Systems 软件学院 高海昌 Operating Systems Gao Haichang, Software School, Xidian University 22 Contents  1. Introduction** 
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
03 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Conformance Test Experiments for Distributed Real-Time Systems Rachel Cardell-Oliver Complex Systems Group Department of Computer Science & Software Engineering.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings.
Comunication&Synchronization threads 1 Programación Concurrente Benemérita Universidad Autónoma de Puebla Facultad de Ciencias de la Computación Comunicación.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Agenda  Quick Review  Finish Introduction  Java Threads.
Introduction to operating systems What is an operating system? An operating system is a program that, from a programmer’s perspective, adds a variety of.
Embedded System Design and Development Introduction to Embedded System.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
Deadlock and Starvation
Process Management Deadlocks.
EEE 6494 Embedded Systems Design
Deadlock and Starvation
Operating Systems : Overview
Operating Systems.
Review: Readers-Writers Problem
Operating Systems : Overview
Operating Systems : Overview
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Introduction to Deadlocks
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
CS 491z / CS 791z Topics on Software Engineering
Presentation transcript:

Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and Real Time programming Introduction

Instructore: Tasneem Darwish2 Outlines  Concurrency  Real time systems

Instructore: Tasneem Darwish3 Concurrency  Concurrent programming is the name given to the notations that are used to express parallelism in an application program.  Concurrent programming also expresses the techniques for dealing with communication and synchronization between parallel entities.

Instructore: Tasneem Darwish4 Concurrency  why to use concurrency? To fully utilize the processor (the processor is so fast with respect to the I/O devices) To allow more than one processor to solve a problem ( A sequential program can only be executed by one processor. A concurrent program is able to exploit parallelism and obtain faster execution). To model parallelism in the real world (Real-time and embedded programs have to control and interface with real- world entities (robots, conveyor belts, etc.) that are inherently parallel).

Instructore: Tasneem Darwish5 Concurrency  Concurrency problems:  Concurrent activities need to coordinate their actions.  the coordination can involve intricate patterns of communication and synchronization.  Not managing communication and synchronization very well can result in new error arising.

Instructore: Tasneem Darwish6 Concurrency  Examples of problems in concurrent programs:  deadlock may occur where each concurrent activity is waiting for another to perform an operation  interference may occur when two or more concurrent activities attempt to update the same object; this can result in the object's data becoming corrupt;  starvation may happen where one or more concurrent activities are continually denied resources as a result of the actions of the others.

Instructore: Tasneem Darwish7 Concurrency  The desired concurrent program  The desired behaviour of a concurrent program is safety and aliveness.  The safety property expresses the requirement for "nothing bad to happen“ (the concurrent activities do not interfere with each other and cause data corruption).  The aliveness property expresses the requirement that "something good will happen". (concurrent activities are able to make progress and do not suffer from deadlocks or starvation).

Instructore: Tasneem Darwish8 Concurrency  How deadlocks happen?  There are four necessary conditions that must exist if deadlock is to occur. 1.Mutual exclusion (only one concurrent activity can use a resource at once) 2.Hold and Waite (there must exist concurrent activities that are holding resources while waiting for others resources to be acquired) 3.No pre-emption (resources acquired by a concurrent activity cannot be forcibly taken away from it by another activity.) 4.Circular wait (a circular chain of concurrent activities must exist)

Instructore: Tasneem Darwish9 Real Time systems  real-time systems are systems that have to respond to externally generated input within a finite and specified time interval.  They are inherently concurrent because they are often embedded in a larger engineering system and have to model the parallelism that exists in the real-world objects that they are monitoring and controlling.  The RTSJ extends the Java concurrency model to allow it to interact with external events.

Instructore: Tasneem Darwish10 Real Time systems  Some real-time systems characteristics: 1.Large and complex. 2.Extremely reliable and safe. 3.Interaction with hardware interfaces.

Instructore: Tasneem Darwish11 Real Time systems  Hard and soft real time systems: Hard real-time systems are those where it is absolutely important that responses occur within the specified deadline. Soft real-time systems are those where response times are important, but the system will still function correctly if deadlines are missed. In interactive systems there are no explicit deadlines.