Class Notes (1,000,000)
US (440,000)
UI (5,000)
ECE (100)
ECE 391 (10)
Lecture 6

ECE 391 Lecture 6: Interrupt Handling


Department
Electrical and Computer Engineering
Course Code
ECE 391
Professor
Kalbarczyk Zbigniew
Lecture
6

This preview shows pages 1-2. to view the full 6 pages of the document.
uses one table for invocation of interrupts, Exceptions, System Calls
called the interrupt descriptor table (IDT)
x86 ISA
Lower the number, the higher the priority
This is how you connect physical devices to your system
Summary of the basic characteristics of the summary of three fundamental OS services
Lecture 6 - Interrupt Handling
Thursday, February 2, 2017
ECE 391 - Lect Page 1

Only pages 1-2 are available for preview. Some parts have been intentionally blurred.

Type
Generated by
Asynchronous
Unexpected
Examples
Interrupts
External Devices
yes
yes
Exceptions
invalid op-Code or operand
no
yes
sys. calls
deliberately via int instruction
no
no
Thought problem on shared resources
What resources are shared between them?
How might interactions cause problems?
What can we do to fix those problems
interrupt handlers and programs share resources
The question:
solution? save them to the stack
registers
solution? privatize
will still need to share some things; discussed later
memory
Obvious things
solution? again save them to the stack
condition codes
shared data
Less Obvious
external state (e.g., on devices)
compiler optimization (e.g., volatility)
e.g., application waits for interrupt, then observes values written by OS to stack
solution? use separate stack for kernel
security leaks
More subtle
This will be important when we work on MP3 (synchronization)
THIS IS BAD…. If you didn't have the problem of Interrupts
step 1: old_head = head
step 2: head = new element;
oops! an interrupt!
ECE 391 - Lect Page 2
You're Reading a Preview

Unlock to view full version