1. Trang chủ
  2. » Công Nghệ Thông Tin

Advanced Operating Systems: Lecture 35 - Mr. Farhan Zaidi

15 3 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 15
Dung lượng 620,4 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Advanced Operating Systems - Lecture 35: Principles of I/O software. This lecture will cover the following: 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);...

Trang 1

CS703 ­ Advanced  Operating Systems

By Mr Farhan Zaidi

Trang 2

35

Trang 3

 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)

Trang 4

Goals of I/O Software

Device independence

 programs can access any I/O device without specifying

device in advance (floppy, hard drive, or CD-ROM)

Uniform naming

 name of a file or device a string or an integer not depending

on which machine

Error handling

 handle as close to the hardware as possible

Synchronous vs asynchronous transfers

 blocked transfers vs interrupt-driven

Buffering

 data coming off a device cannot be stored in final destination immediately

Trang 5

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

Trang 6

Layers of the I/O system and the main  functions of each layer

Trang 7

 Memory mapped I/O

 Device controller’s registers and internal memory are directly mapped into the processor’s address space

 Direct I/O

 Device controller’s registers and internal memory

is accessible via special instructions in the

assembly language instruction set The

arguments to these instructions are usually called ports.

Trang 8

Writing a string to the printer using programmed I/O

Trang 9

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

a Code executed when print system call is made

b Interrupt service procedure

Trang 10

main memory

I/O bridge bus interface

ALU register file

CPU chip

system bus memory bus

disk controller

graphics adapter

USB controller

mouse keyboard monitor

disk

I/O bus Expansion slots for

other devices such

as network adapters.

Trang 11

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.

Trang 12

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.

Trang 13

main memory

ALU register file

CPU chip

disk controller

graphics adapter

USB controller

mouse keyboard monitor

disk

I/O bus bus interface

When the DMA transfer completes, the disk controller notifies the CPU with an

interrupt (i.e., asserts a special “interrupt”

pin on the CPU)

Trang 14

Operation of a DMA transfer

Trang 15

 Printing a string using DMA

a code executed when the print system call is made

b interrupt service procedure

Ngày đăng: 05/07/2022, 12:35