Presentation is loading. Please wait.

Presentation is loading. Please wait.

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 –

Similar presentations


Presentation on theme: "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 –"— Presentation transcript:

1 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 SE-3910 - Dr. Josiah Yoder Slide style: Dr. Hornick Much Material: Dr. Schilling, Some from Dr. Hornick, etc. 1

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

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 3

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

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 5

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. 6Watchdog 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 Timers7

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 Timers8

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 Timers9

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 Timers10

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 Timers11

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 Timers12

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 Timers13

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 Timers14

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 Timers15

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 Timers16

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 Timers17

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 Timers18

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 Timers19

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 Timers20

21 Watchdog Timer Structure SE3910 Real Time Systems

22 Watchdog On the Beaglebone http://beaglebone.cameon.net/home/watchd og-timer http://beaglebone.cameon.net/home/watchd og-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 22

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 23


Download ppt "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 –"

Similar presentations


Ads by Google