UNIX SCSI Drivers Overview - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

UNIX SCSI Drivers Overview

Description:

'Blocky' Devices 'Letter-y' Devices. Application. File System. Block Driver. Character Driver ... Type: block or character (cooked or raw) Device Number: ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 15
Provided by: aldenw
Category:

less

Transcript and Presenter's Notes

Title: UNIX SCSI Drivers Overview


1
UNIX SCSI DriversOverview
February 2002
2
Computer Essentials
Software
Hardware
3
Operating System
Applications
Utilities
User Space
Kernel Space
Process Control
Device Managers
Hardware
4
Device Drivers
Application
User Space
Kernel Space
Driver
Driver
Hardware
Device
Device
5
Decoupling Drivers
major number
minor number
Application access driver (1), device (2)
Switch Table
Driver(1)
Driver(4)
Hardware
Device(0)
Device(2)
Device
Device(1)
6
Block vs. Character Devices
Application
Application
File System
Raw I/O
Cooked I/O
Switch Table
Block Driver
Character Driver
Hardware
Blocky Devices
Letter-y Devices
7
Switch Table Entry Points
Common
Block
Character
strategy
read write ioctl
open close
8
Device Nodes
Stored under /dev Special Files Type block
or character (cooked or raw) Device
Number Major Number Selects Driver from Switch
Table Minor Number Driver-Specific. device
instance device partitioning (a.k.a.
slice) device options (e.g. rewind tape)
9
Driver Arguments (1)
open (dev_t dev, int flag, int open_type, cred_t
cred_p) close (dev_t dev, int flag, int
open_type, cred_t cred_p)
dev major and minor number from the device
node flag read, write, exclusive, no delays,
etc. open_type block, character, layered,
etc. cred_p pointer to users credentials
10
Driver Arguments (2)
strategy (struct buf bp)
bp pointer to buffer header. kernel maintains
buffer pool. file system buffers application
I/O in memory cache. buffer processing is
asynchronous. application can do something
else while waiting on I/O
11
Driver Arguments (3)
read (dev_t dev, uio_t uiop, cred_t
cred_p) write (dev_t dev, uio_t uiop, cred_t
cred_p)
dev major and minor number uio_p pointer to
user I/O structure, describes I/O cred_p pointer
to users credentials
12
Driver Arguments (4)
ioctl (dev_t dev, int cmd, long arg, int
mode, cred_t cred_p, int rval_p)
dev major and minor number cmd interpreted by
driver arg (usually) pointer to cmd
arguments mode direction of transfer out or
in cred_p pointer to users credentials ral_p
pointer for returning ioctl status
13
Target vs. HBA Drivers
target driver (disk)
target driver (tape)
HBA driver
Driver software
Host Adapter
Hardware
SCSI BUS
14
Layered Drivers
Application
Switch Table
layered open
RDAC Driver
Driver
path table
Software
Hardware
Multi-Path Device
Write a Comment
User Comments (0)
About PowerShow.com