1 / 12

Monitoring Deadline Misses in Periodic Real-time Threads

University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department. Concurrent and Real Time programming. Monitoring Deadline Misses in Periodic Real-time Threads. Prepared By: Ebtesam Saleh-220060051 Prepared For: Eng. Tasneem Darwesh.

kieve
Download Presentation

Monitoring Deadline Misses in Periodic Real-time Threads

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. University of PalestineFaculty of Applied Engineering and Urban PlanningSoftware Engineering Department Concurrent and Real Time programming Monitoring Deadline Misses in Periodic Real-time Threads Prepared By: Ebtesam Saleh-220060051 Prepared For: Eng. TasneemDarwesh ebtesam saleh - chapter 12 - section 4

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

  3. Examplehealth monitor objec ebtesam saleh - chapter 12 - section 4

  4. Monitoring Deadline Misses : interface import javax.realtime.*; public classHealthMonitor { public voidpersistentDeadlineMiss(Schedulable s); } ebtesam saleh - chapter 12 - section 4

  5. import javax.realtime.*; class DeadlineMissHandlerextends AsyncEventHandler { public DeadlineMissHandler(HealthMonitormon, intthreshold) { super(newPriorityParameters( PriorityScheduler.MAX_PRIORITY), null, null, null, null, null); myHealthMonitor = mon; myThreshold = threshold; } public void setThread(RealtimeThreadrt) { myrt = rt; } ebtesam saleh - chapter 12 - section 4

  6. public void handleAsyncEvent() { if(++missDeadlineCount < myThreshold) myrt.schedulePeriodic(); else myHealthMonitor.persistentDeadlineMiss(myrt); } private RealtimeThreadmyrt; private intmissDeadlineCount = 0; private HealthMonitormyHealthMonitor; private intmyThreshold; } ebtesam saleh - chapter 12 - section 4

  7. Monitoring Deadline Misses • 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. ebtesam saleh - chapter 12 - section 4

  8. Monitoring Deadline Misses 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. ebtesam saleh - chapter 12 - section 4

  9. setting up the real-time periodic thread ebtesam saleh - chapter 12 - section 4

  10. setting up the real-time periodic thread ebtesam saleh - chapter 12 - section 4

  11. Monitoring Deadline Misses 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. ebtesam saleh - chapter 12 - section 4

  12. Questions?? ebtesam saleh - chapter 12 - section 4

More Related