Embedded Systems & Firmware

What is the difference between polling and interrupts as ways to learn a peripheral's status?

  1. AWith polling the CPU checks the status repeatedly; with interrupts the peripheral notifies the CPU when the status changes
  2. BPolling and interrupts are the same thing
  3. CInterrupts are the method where the CPU repeatedly checks the status
Show answer and explanation

Answer: A. With polling the CPU checks the status repeatedly; with interrupts the peripheral notifies the CPU when the status changes

Polling is simple and predictable because checks happen at fixed intervals, but the CPU keeps checking even when nothing happens, wasting time and power. With interrupts the CPU responds only when something changes, so it can do other work or sleep while waiting. If interrupts are extremely frequent, though, their overhead becomes large, so the choice matters.

  • A. Correct. Interrupts let the CPU do other work while waiting.
  • B. They work differently.
  • C. That describes polling.
Practice this topic Back to topic

More Embedded Systems & Firmware questions

  1. Which describes the "super loop" structure often seen in microcontroller programs without an OS?
  2. What is the main purpose of using an RTOS (real-time operating system) in embedded devices?
  3. In a preemptive RTOS, while a low-priority task is running, a high-priority task receives the data it was waiting for and becomes ready. What generally happens?
  4. Which describes priority inversion in an RTOS?
  5. Which describes priority inheritance, used to prevent priority inversion?