Back to Topic 1.3 — Operating and control systems
1.3.4Computer Science SL5 flashcards

Polling and interrupts

Practice Flashcards

Flip to reveal answers
Card 1 of 51.3.4
1.3.4
Question

What is the difference between polling and interrupts?

Click to reveal answer

Track your progress — Sign up free to save your progress and get smart review reminders based on spaced repetition.

All 5 Flashcards — Polling and interrupts

Sign up free to track progress and get spaced-repetition review schedules.

Card 1comparison

Question

What is the difference between polling and interrupts?

Answer

With polling the CPU repeatedly asks the device whether it is ready. With interrupts the device signals the CPU when it is ready, so the CPU can work uninterrupted until then.

Card 2process

Question

What happens when an interrupt occurs?

Answer

The CPU finishes its current instruction, saves where it was, runs a short routine that deals with the device, then restores the saved state and carries on. That saving and restoring is the overhead.

Card 3concept

Question

When is polling the better choice?

Answer

When the device is almost always ready, so nearly every check succeeds and you avoid saving state thousands of times a second; and when a guaranteed response time is needed, since the delay is bounded by the checking interval.

Card 4concept

Question

Why do battery-powered devices use interrupts?

Answer

Because the CPU can sleep between events, which uses very little power. Polling forces it awake to run checks that mostly find nothing, shortening battery life for no benefit.

Card 5concept

Question

What is the security concern with interrupt handling?

Answer

Interrupts are raised by devices, so a faulty or malicious device can raise them constantly and leave the CPU no time for other work. Polling cannot be flooded, because the CPU decides when to look.

Track your progress with spaced repetition

Sign up free — Aimnova tells you exactly which cards to review and when, so you remember everything before your IB exam.

Start Free
IB Computer Science Polling and interrupts Flashcards | 1.3.4 | Aimnova