Unit 2a – I/O Devices, Interrupts and DMA

Beyond CPU and Memory

I/O Controller Communication

PIO Limitations

Polling

 
 

Polling Drawbacks

Autonomous Controller Operation

Implementing Interrupts to Simple CPU

Fetch-Execute with Interrupt

 
 

Interrupt Control Flow

I/O Operations: Disk Access

Disk Read Timeinline

The Power of the Sequence

Data Read Sequence Example

 

Making Code Asyncronous

Writing Asynchronous Code in C

Asynchronous Data Read Example

 

Implementing Disk Read (Simplified)

 

Problems with Asyncrony

Improving Isolation, but not Readibility

 

Asynchrony makes code harder to write

Possible Solutions