Monitoring Deadline Misses in Periodic Real-time Threads Prepared By: Ebtesam Saleh-220060051 Prepared For: Eng. Tasneem Darwesh University of Palestine.

Slides:



Advertisements
Similar presentations
13/04/2015Client-server Programming1 Block 6: Threads 1 Jin Sa.
Advertisements

Chapter 8. Operator Overloading Operator overloading gives the opportunity to redefine C++ Operator overloading refers to redefine C++ operators such.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
CSE 522 Real-Time Scheduling (4)
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 2.
Scheduling Theory ITV Real-Time Systems Anders P. Ravn Aalborg University March 2007.
Software Engineering Lecture 5 Multiprogramming and Scheduling ASPI8-4 Anders P. Ravn March 2004.
Programming R-T Abstractions TSW November 2009 Anders P. Ravn Aalborg University.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
5.6 Semaphores Semaphores –Software construct that can be used to enforce mutual exclusion –Contains a protected variable Can be accessed only via wait.
Slides prepared by Rose Williams, Binghamton University Chapter 20 Java Threads Part II.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
Scheduling Theory ITV Multiprogramming and Real-Time Programs Anders P. Ravn Aalborg University May 2009.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
5.6.2 Thread Synchronization with Semaphores Semaphores can be used to notify other threads that events have occurred –Producer-consumer relationship Producer.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
© Andy Wellings, 2003 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
Ceng Operating Systems Chapter 2.1 : Processes Process concept Process scheduling Interprocess communication Deadlocks Threads.
The Implementation of Dynamic Priority Assignment on CVM Threading System Insik Shin Real-time Systems Group University of Pennsylvania.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
The Real-Time Java Profile ITV Real-Time Systems Anders P. Ravn Aalborg University February 2006.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
50.003: Elements of Software Construction Week 5 Basics of Threads.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
University of Sunderland Java Threading, Mutex and Synchronisation Lecture 02 COMM86 Concurrent and Distributed Software Systems.
MultiThreaded Applications. What is Multithreaded Programming? Having your software appear to perform multiple tasks in parallel –Individual paths of.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
1 Chapter 2.1 : Processes Process concept Process concept Process scheduling Process scheduling Interprocess communication Interprocess communication Threads.
Semaphores, Locks and Monitors By Samah Ibrahim And Dena Missak.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
11 G53SRP: Deadline misses and cost over-runs in RTSJ Chris Greenhalgh School of Computer Science.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 More on Thread API.
Chapter11 Concurrent. 集美大学 计算机工程学院 Java 程序设计 年 第二版 Concurrent ●Computer users take it for granted that their systems can do more than one thing.
Thread Scheduling and Dispatching Maung Aung Han Marc E. Loy Jihua Zhong CIS 642: Seminar in Real-time Systems Instructor: Professor Insup Lee.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
11 G53SRP: Feasibility analysis Chris Greenhalgh School of Computer Science.
L6: Threads “the future is parallel” COMP206, Geoff Holmes and Bernhard Pfahringer.
Software Design 13.1 From controller to threads l Threads are lightweight processes (what’s a process?)  Threads are part of a single program, share state.
Concurrent Programming in Java Based on Notes by J. Johns (based on Java in a Nutshell, Learning Java) Also Java Tutorial, Concurrent Programming in Java.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Mutual Exclusion Mutexes, Semaphores.
1 Introduction to Threads Race Conditions. 2 Process Address Space Revisited Code Data OS Stack (a)Process with Single Thread (b) Process with Two Threads.
Real-Time Threads Time dependent, usually wrt deadline –Periodic –Aperiodic –Sporadic Priority scheduled Fault tolerant.
& Urban Planning Civil Engineering Department
REAL-TIME OPERATING SYSTEMS
COEN346 Tutorial Monitor Objects.
Engineering Project Management
G53SRP: Real Time Threads in RTSJ (part I)
Real Time Operating System
Real-time Software Design
Multithreaded Programming in Java
Concurrency: Mutual Exclusion and Synchronization
Swi Scheduling Hwi Swi Tsk Idle
Midterm review: closed book multiple choice chapters 1 to 9
Multithreading.
Multithreaded Programming
NET 424: REAL-TIME SYSTEMS (Practical Part)
Threads CSE 2431: Introduction to Operating Systems
Threads and concurrency / Safety
Presentation transcript:

Monitoring Deadline Misses in Periodic Real-time Threads Prepared By: Ebtesam Saleh Prepared For: Eng. Tasneem Darwesh University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and Real Time programming 04/01/14371ebtesam saleh - chapter 12 - section 4

In many soft real-time systems applications will want to monitor any deadline misses, but take no action unless a certain threshold is reached. 04/01/14372ebtesam saleh - chapter 12 - section 4 Monitoring Deadline Misses : interface

04/01/1437ebtesam saleh - chapter 12 - section 43 Example health monitor objec

import javax.realtime.*; public class HealthMonitor { public void persistentDeadlineMiss(Schedulable s); } Monitoring Deadline Misses : interface 04/01/14374ebtesam saleh - chapter 12 - section 4

import javax.realtime.*; class DeadlineMissHandler extends AsyncEventHandler { public DeadlineMissHandler(HealthMonitor mon, int threshold) { super(new PriorityParameters( PriorityScheduler.MAX_PRIORITY), null, null, null, null, null); myHealthMonitor = mon; myThreshold = threshold; } public void setThread(RealtimeThread rt) { myrt = rt; } 04/01/14375ebtesam saleh - chapter 12 - section 4

public void handleAsyncEvent() { if(++missDeadlineCount < myThreshold) myrt.schedulePeriodic(); else myHealthMonitor.persistentDeadlineMiss (myrt); } private RealtimeThread myrt; private int missDeadlineCount = 0; private HealthMonitor myHealthMonitor; private int myThreshold; } 04/01/14376ebtesam saleh - chapter 12 - section 4

When the handler is executed, it increments the miss count and reschedules the thread. When the count reaches the threshold, it informs the health monitor and does not reschedule the thread. Monitoring Deadline Misses 04/01/14377ebtesam saleh - chapter 12 - section 4

it is not possible to pass the real-time thread as a parameter to the constructor of the handler, as the handler itself is needed before the real-time thread can be constructed. Monitoring Deadline Misses 04/01/14378ebtesam saleh - chapter 12 - section 4

setting up the real-time periodic thread 04/01/14379ebtesam saleh - chapter 12 - section 4

setting up the real-time periodic thread 04/01/143710ebtesam saleh - chapter 12 - section 4

Deadline miss handlers are schedulable objects. Consequently, they will compete for processor time with their associated schedulable objects according to their priorities. Hence, for the handler to have an impact on the (in this case) errant real-time thread, it must have a priority higher than the real-time thread. If the priority is lower, it will not run until the errant thread blocks. Monitoring Deadline Misses 04/01/143711ebtesam saleh - chapter 12 - section 4

04/01/143712ebtesam saleh - chapter 12 - section 4 Questions??