11
Digital UNIX Internals II I/O Framework I/O Framework Chapter 12

Digital UNIX Internals III/O Framework Chapter 12

Embed Size (px)

Citation preview

Page 1: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

I/O Framework

Chapter 12

Page 2: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

Topics

• Physical Hardware Components• Software Structures for Hardware Components• Software IO Layers and Subsystems

Page 3: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

I/O Components Diagram

I/O System

I/OController

I/ODevice

LocalI/O Widget

CPU

Console

Memory

LocalI/O Adapter

RemoteI/O Widget

RemoteI/O Widget

I/OController

I/ODevice

I/ODevice

Loosely-coupledI/O interconnect

RemoteI/O Adapter

Tightly-coupledI/O Interconnect 3

Tightly-coupledI/O Interconnect 2

Tightly-coupledI/O Interconnect 1

I/ODevice

I/ODevice

PMI

Page 4: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

I/O Component Description

• Although the CPU is always an Alpha, the underlying bus architecture varies greatly. Supported buses include PCI, TC (TURBOchannel), EISA, and ISA.

• The kernel, therefore, creates an internally linked list known as the bus structure that represents the varying topologies. This structure carries information common to all buses and hides bus-specific information in a handle structure.

• There is one doubly linked list to all of the other buses in the system.

• For each bus, there are links to one or more controller structures (that represent each controller on the bus). And, similarly, the controller structures point to zero or more device structures.

Page 5: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

I/O Data Structures

bus_hd (0)bus_hd (0)

nxt_bus(0)nxt_bus(0)

ctir_listctir_list

bus_listbus_list

struct bustc0_struct

struct bustc0_struct

bus_hd

nxt_bus (0)

ctir_list

bus_list (0)

struct busvba1_struct

bus_hd bus_hd

nxt_busnxt_bus

ctir_listctir_list

bus_list (0)bus_list (0)

struct busvba0_struct

struct busvba0_struct

bus_hd

nxt_ctir

dev_list (0)

struct controllerfb0_struct

bus_hd

nxt_ctir (0)

dev_list

struct controlleripi0_struct

bus_hd

nxt_ctir (0)

dev_list (0)

struct controllersk0_struct

bus_hd

nxt_ctir (0)

dev_list (0)

struct controllercb0_struct

next_dev

ctir_hd

struct deviceip1_struct

next_dev (0)

ctir_hd

struct deviceip2_struct

bus_list[]

controller_list[]

device_list[]

Page 6: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

EISA BUS

• Extended Industry Standard Architecture.

• Superset of the 8- and 16-bit Industry Standard Architecture (ISA)– IBM Compatible PC, XT, and AT personal computers.

• The EISA bus has the following characteristics:– 32-bit bus size– 64-kilobyte I/O address, made up of 16 4-KB slots– 4-gigabyte memory address space– The Digital implementation of EISA is little endian, like Intel

implementation– ISA devices are supported on an EISA bus or an ISA bus

Page 7: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

PCI BUS

• Peripheral Component Interconnect • A physical interconnect mechanism for use between

highly integrated peripheral controller components and processor/memory systems.

• Supports 8-bit, 16 bit, 24-bit, 32-bit, and 64-bit data sizes

• Uses little endian byte-ordering, the same as the Alpha architecture

• Can access device registers in either I/O space or memory space

Page 8: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

SCSI Bus

• Small Computer System Interface• ANSI standard• Flexible - allows for device independence through

standard bus protocol and host bus adapters• 8 Devices on a 8 bit scsi bus, expandable to 16

devices on a 16 bit bus• High transfer rates• logical addressing

Page 9: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

I/O Software Support

Page 10: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

Benefits of I/O Software Support

Component Description

System Call interfaceUser-accessible interface that allows access to devices via the operating system

System routines Routines that interface with the device drivers; they help standardize the transfer of data to and from devices

Buffer caching system Improves data transmission and retrieval performance

"Type of" protocol layer Adapts raw data into a form suitable for the intended device; may entail anything from special buffering to encapsulating the data within identification headers and trailers

Device drivers Software to enable the use of specific hardware devices such as adapters, controllers, disks, tapes and Ethernet

Interrupt handlers System and device-specific software that handles communication with the kernel to process asynchronous system and device events.

Page 11: Digital UNIX Internals III/O Framework Chapter 12

Digital UNIX Internals II I/O Framework

I/O Software Support Structure

hardware

user mode processsystem call interface

character device interface

cdevsw

buffereddeviceinterface(cooked,disk)

vfs interface

nfs

buffer caches

rpc

protocols

sock

etin

terf

ace

mbufs

bdevsw

Characterorienteddriver

(uio)

networkdevice driver

blockdevice driver

tty driver(pts, ptc)

linesw8 line disciplines

characteroriented

raw mode

raw queue (clists/cblocks)

lineoriented

cbreak mode

lineorientedcanonicalqueuecooked mode

pio or dmaadapter

controller

tape, diskline printer,drim, memkmem

RS-232, lat, pseudo ttysdisk, cdromln lo ne fza

advfs

stre

ams

lsm