Be sure to look at the Canvas Module for this week for various hand-in mechanisms!

Released 9/22/2019.


C19: Counter Rollover

This is a group programming assignment that should be completed in class.

Assume that you are building a system that has a real time counter installed. For reasons that are lost to history, the designers made the decision to implement that counter as a 32-bit signed value that counts in milliseconds (i.e., that counter increments once every 1 msec.) The last time someone did this they built a system an aircraft had to be rebooted every three weeks to avoid a counter overflow bug. Two possible ways to avoid the overflow bug are proposed:

If your group is an EVEN group number, do option #1. If your group is an ODD group number do option #2.
(if you get done early, we suggest you talk through the solution strategy for the other option within your group.)

Create C language functions for your option and a unit test strategy. DO NOT fix any bugs after the hand-off to unit test. The point is to get an idea of what aspects of these functions are tricky to implement. You can use any development, build, run, and unit test environment you prefer.

Sequence of steps:

  1. Write code to avoid the overflow bug according to the assigned option
  2. Potentially in parallel, write unit tests that will exercise the counter function (perhaps have some team members write code and others define unit tests)
  3. Make hand-in slides
  4. To the extent you have time, compile, run, and unit test the code. Update slides as you have time.

Hand-in format:


C20 & C21 In Class Exercise: Quality Metrics & Version Proliferation

This is a discussion group exercise. Discuss the following questions within your group and come to the best concensus answers you can.


Homework #18: Review for Exam #1

The goal of this homework is to give you time and some guidance in studying for the mid-term exam.

18-1: (10 points). If you had ONE thing out of the entire first half of the course that you want the professor to explain or explain again in class, what would it be? Ask a clear and concise question on a specific point if at all possible. Paste in a screen grab of the relevant slide from the web version of the lectures (or other soruce) on the slide following your answer so it is right there to talk about. We'll cover as many as possible of these in class, so make your question count!

18-2. (6 points per lecture) For each lecture in Exam #1, produce a summary of the following points. For this question, your hand-in should have one slide per lecture (even if that leaves empty space on some slides). Each slide should have both the lecture number and title (e.g., "7. Requirements") at the top of the slide, and then contain the bullets listed below on the rest of the slide:

Note: Only material from numbered lectures, in-class exercises, and project is eligible to be on the test, and the test will heavily emphasize numbered lectures. Also, you can skip optional material without a lecture number, such as in-class presentations from industry that did not get a lecture number on the course scheduling grid and supplemental material not discussed in class that appears in HW assignments. A number of topics in the Toyota UA lecture are not testable if they are covered in the second half of our course (e.g., SIL, MISRA Guidelines, Faults, FCRs, concurrency, use of redundant processors, single points of failure).


Homework #19: Time Bugs

19-1. For the topic assigned below, find an example of a failure or potential failure involving time or counter overflows, or other topics as described. Some categories are finding a good example of a particular failure mode (e.g., leap second), while other are finding a good example of any time-related failure in a particular domain. Many of these will be discussed in class, so if you see multiple examples on searches please try to look past the first hit and pick one that you think is the most interesting to talk about in class. Please make sure that your slides will be easily readable when displayed in class, and be ready to give a 2 or 3 minute discussion of your topic in class. Topics are assigned based on your sign-in number as below.

Topic assignments for this question are as below. Select topic based on your sign-in number, wrapping around if you have a number greater than the highest topic number. If you have a strong preference not to do a particular topic such as a personal experience with a failure of this type, just let the instructor know and do either the topic before or the topic after.

  1. Apple iOS DST alarm/reminder bug (pick your favorite; there are several to choose from)
  2. Leap second Linux crash
  3. Daylight savings time cell phone glitch (pick your favorite; there are several to choose from)
  4. NASA Deep Impact NASA timer overflow
  5. Windows mobile 2010 bug
  6. 512K day (8/12/2014)
  7. GPS week rollover
  8. Windows 95 timer rollover
  9. Excel 1900 bug
  10. Leap year Azure cloud
  11. Dec. 2, 2017 iOS bug (version 11.1.2)
  12. Mar. 7, 2017 European clocks lose time due to electricity grid disruption
  13. Jan. 2016 GPS timing melt-down
  14. Nov. 2018 Hospital record keeping and DST
  15. Oct. 2018 Hong Kong metro signalling crash
  16. Apr. 2019 NYCWiN and GPS rollover
  17. Apr. 2019 Honeywell aircraft GPS rollover
  18. Jun. 2019 Collins GPS leap second
  19. Jul. 2019 Airbus A350 reboots

19-2: (3 points total) Watch the Computerphile video on time and time zones.https://youtu.be/-5wpm-gesOY (about 10 minutes long). List the three most interesting facts you learned from watching this video, some of which might overlap items discussed in our course lecture (1 point each). (NOTE: This is one of the best technical rants ever!)

19-3: (3 points total) Watch the Computerphile video on internationalization.https://youtu.be/0j74jcxSunY (about 8 minutes long). List the three most interesting facts you learned from watching this video (1 point each).

Supplemental Materials