16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I/O Subsystem<br />

10. I/O SUBSYSTEM<br />

- device driver - disk and terminal<br />

- software devices e.g. memory<br />

- implementation via - streams<br />

DEVICE INTERFACES<br />

- block device<br />

- character "raw" device<br />

Device configuration data<br />

- hard code into files that are compiled into kernel, or<br />

- supply configuration information while system running, or<br />

- self-identifying devices permit kernel<br />

to recognize what is installed.<br />

Figure 27. Driver Entry Points<br />

mknod /dev/device_name c/b_special major_no minor_no<br />

block device switch table<br />

entry open close strategy<br />

0 gdopen gdclose gdstrategy<br />

1 gtopen gtclose gtstrategy<br />

character device switch table<br />

entry open close read write ioctl<br />

0 conopen conclose conread conwrite conioctl<br />

1 dzbopen dzbclose dzbread dzbwrite dzbioctl<br />

2 syopen nulldev syread sywrite syioctl<br />

3 nulldev nulldev mmread mmwrite nodey<br />

4 gdopen gdclose gdread gdwrite nodev<br />

Figure 28. Block and Character Device Switch Tables<br />

143

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!