W10 - I-O and Device Drivers

Class: CSCE-410-02159


Notes:

I/O Devices

image-36.png291

I/O Device Classification

Device Controllers

CPU/Controller Communication Principles

Addressing I/O Registers

Memory-mapped I/O

Disadvantages of Memory-mapped I/O

image-37.png382

Direct Memory Access (DMA)

image-38.png438x201

More about DMA

DMA: Any Disadvantages?

Interrupts

image-39.png362

Precise and Imprecise Interrupts

image-40.png358

I/O Software: Programmed I/O

copy_from_user(buffer, p, count);          /* p is the kernel buffer */
for (i = 0; i < count; i++) {              /* loop on every character */
    while (*printer_status_reg != READY) ; /* loop until ready */
    *printer_data_register = p[i];         /* output one character */
}
return_to_user();

2026-11-28_18-50-47.png364

I/O Software: Interrupt-Driven I/O

I/O Software: I/O Using DMA

I/O Software Levels

Device Drivers

image-41.png345

Device-Independent I/O Software

User-Space I/O Software

Summary of I/O Software

image-42.png467

Clocks

Programmable Clock

image-43.png448

Clock Software: Measuring Real Time

image-44.png454

Clocks: Modes of Operation

Clock Software: Timeouts and Alarms

image-45.png319

Clock Software: Watchdog Timer

Clock Drift

Empirical Clock Drift:
image-46.png419