Docsity

Device Controllers-Advance Operating System-Lecture Slides, Slides of Advanced Operating Systems

Partial preview of the text

Download Device Controllers-Advance Operating System-Lecture Slides and more Slides Advanced Operating Systems in PDF only on Docsity!

Lecture No.

Overview of today’s lecture

 Goals of I/O software

 Layers of I/O software

 Direct Vs memory mapped I/O

 Interrupt driven I/O

 Polled I/O

 Direct Memory Access (DMA)

Device Controllers

 I/O devices have components:

 mechanical component  electronic component

 The electronic component is the device controller

 may be able to handle multiple devices

 Controller's tasks

 convert serial bit stream to block of bytes  perform error correction as necessary  make available to main memory

Layers of the I/O system and the main

functions of each layer

Programmed I/O

Writing a string to the printer using programmed I/O

Interrupt-Driven I/O

 Writing a string to the printer using interrupt-driven I/O

a. Code executed when print system call is made b. Interrupt service procedure

Reading a Disk Sector: Step 1

main memory

ALU

register file

CPU chip

disk controller

graphics adapter

USB

controller

mouse keyboard monitor disk

I/O bus

bus interface

CPU initiates a disk read by writing a
command, logical block number, and
destination memory address to a port
(address) associated with disk controller.

Reading a Disk Sector: Step 2

main memory

ALU

register file

CPU chip

disk controller

graphics adapter

USB

controller

mouse keyboard monitor disk

I/O bus

bus interface

Disk controller reads the sector and
performs a direct memory access (DMA)
transfer into main memory.

Direct Memory Access (DMA)

Operation of a DMA transfer

I/O Using DMA

 Printing a string using DMA

a. code executed when the print system call is made

b. interrupt service procedure