Homework 3 - Measuring time
Due 10/01/21 at 11am
Instructions
Submit these in slide format (ppt, pptx, or pdf) with each section on a different slide. Please do not put your name on the PDF, so that we can anonymize grading in Canvas. Number the questions/question parts. Questions in blue are optional/questions for you to think about to yourself.
You are graded on good-faith effort, not correctness. This means that you should attempt to answer every question, and if you did not reach an answer, you should describe your process and where you got stuck.
Program execution time
Read Lee/Seshia 16.3.
If you have any questions about the reading, post them on Ed
(6 pts) Chapter 16, Exercise 1
Watchdog timers
Read Murphy and Barr 2001, Watchdog Timers (Canvas login required. If this link doesn’t work, you can find this file on the Canvas site under “Files.” (Note: in class, I will use the terminology of “petting” the watchdog rather than “kicking.”)
- (6 pts) The reading discusses the problem of petting the watchdog too frequently, and one solution that microchip designers use to prevent this. Consider an alternate solution, where both an upper and a lower bound on the time to pet the watchdog is enforced (the SAMD 21 chips do this!). How would you, as an embedded programmer, make sure you are using this sort of watchdog correctly? What are the pros and cons of this approach vs. the approach discussed by Murphy and Barr?
Time and date nightmares
(adapted from an exercise by Philip Koopman).
This formula will compute which prompt you answer, based on your name. For example, I get “3”, so I would research the third tale below (Android/iOS alarm bug). Replace my name with your full name, no spaces, to get your answer.
Research and present the cautionary tale corresponding to the formula answer you computed above. Include:
(2 pts) Citations of any sources used (author name, date, article title, publication source, URL)
(1 pt) A representative image (cited, if different source from above)
(5 pts) A 3-5 sentence/bullet summary of what the bug was, why it happened, and what the impact was
Think about your recommendation of what could have been done to prevent the problem, but do not write it down on the slide.
Cautionary tales:
- Airbus A350 reboot
- NASA Deep Impact timer overflow
- Android/iOS alarm bug (take your pick from the ones you find)
- Bank of Queensland EFTPOS terminals
- Parkeon parking meters 2020
- GPS rollover 2019
- SMS BCD encoding
- Zune Y2K
- Patriot Missile
- Tiwai Point Aluminum Smelter
- European clocks electricity grid
You may be asked to present your story in class, which will be the participation grade of the homework (5 pts).