1 / 23

SE-3910 Real-time Systems

SE-3910 Real-time Systems. Week 5, Class 1 Quick-Quiz (Ungraded) Lab 4 turn-in up - due Tuesday, Week 5 Select when to use Polling or Interrupts Describe the interrupt handling process Use conditional compilation to remove code from compiling.

howellb
Télécharger la présentation

SE-3910 Real-time Systems

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. SE-3910Real-time Systems • Week 5, Class 1 • Quick-Quiz (Ungraded) • Lab 4 turn-in up - due Tuesday, Week 5 • Select when to use Polling or Interrupts • Describe the interrupt handling process • Use conditional compilation to remove code from compiling SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling, Some from Dr. Hornick, etc.

  2. Quick Quiz! What is the rise-time of this signal? 5V 0 16ms 10ms 13ms SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling

  3. Quick Quiz! Which of the following is correct? void foo(struct bar2* b); … struct bar* b; And then…. • foo((struct bar2*) b*) • foo((bar2*) *b) • foo((bar2*) b&) • foo((struct bar2*) &b) SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling

  4. When to Poll vs. Interrupt? • Polling • Advantages • Lower latency (if 100% CPU) • Disadvantages • High CPU • Low Punctuality • Interrupts • Disadvantages • Context switch cost • Advantages • Low CPU • Higher Punctuality SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling

  5. Potential Problems • What happens if an unexpected interrupt occurs and we have random garbage in the interrupt table? • What happens if an interrupt handler doesn’t return? SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling

  6. The Clementine In 1994, a deep space probe, the Clementine, was launched to make observations of the moon and a large asteroid (1620 Geographos). After months of operation, a software exception caused a control thruster to fire for 11 minutes, which depleted most of the remaining fuel and caused the probe to rotate at 80 RPM. Control was eventually regained, but it was too late to successfully complete the mission. Watchdog Timers

  7. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  8. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  9. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  10. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  11. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  12. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  13. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  14. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  15. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  16. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  17. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  18. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  19. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  20. Why use a watchdog timer? • Embedded systems must be able to cope with both hardware and software anomalies to be truly robust. • In many cases, embedded devices operate in total isolation and are not accessible to an operator. • Manually resetting a device in this scenario when its software “hangs” is not possible. • In extreme cases, this can result in damaged hardware or loss of life and incur significant cost impact. Watchdog Timers

  21. Watchdog Timer Structure SE3910 Real Time Systems

  22. Watchdog On the Beaglebone • http://beaglebone.cameon.net/home/watchdog-timer • Open the file /dev/watchdog • Do not close the file • Write something (e.g. "\n") to the file at least every 59 seconds to keep the system running SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling

  23. Conditional Compilation • #define DEBUG • #ifdef DEBUG • #endif • #define LEVEL 5 • #if LEVEL > 0 • #endif SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling

More Related