Lab 7: Check-in


During lab, we encourage you to check your understanding with a TA after completing a section or two, while the material is still fresh in your mind.

Each question below is a diagnostic question for each section of the lab. Try answering one after finishing each section to test your understanding.

  1. How is a function “attached” as an interrupt handler? If there are multiple interrupt handlers, how is decided which one handles a given interrupt?

  2. Name two disadvantages, and one advantage, that the spin-loop implementation of detecting button presses has or would have over an interrupt based implementation.

  3. What happens if the interrupt event is not cleared before returning from the handler?

  4. Why might you want to enqueue/dequeue and then return instead of just doing arbitrary logic (like drawing on the screen) in the interrupt handler?

  5. Show the TA that pressing the two buttons correctly track to each separate counter. Suggest a reason why the counts reported might not match up with the number of times you press each button.

Before leaving the lab, check in with a TA and discuss any challenges to answering the questions in the lab. If you do not feel confident about your responses, please ask us about it too!