13. /0 Systems ●●● ●●●● ●●●●● ●●●● ●●●0● ● Objectives ●●●0 o Explore the structure of an operating system's lO subsystem o Discuss the principles of o hardware and its complexity o Provide details of the performance aspects of o hardware and software
2 13. I/O Systems ⚫ Objectives ⚫ Explore the structure of an operating system’s I/O subsystem ⚫ Discuss the principles of I/O hardware and its complexity ⚫ Provide details of the performance aspects of I/O hardware and software
●●● 13.0 Systems ●●●● ●●●●● ●●● 13.1 Overview ●●●0● ●●●0 13.2 0 Hardware 13 3 Application IO Interface 13 4 Kernel O Subsystem 13.5 Transforming lO Requests to Hardware Operations °136 STREAMS 13.7 Performance
3 13. I/O Systems ⚫ 13.1 Overview ⚫ 13.2 I/O Hardware ⚫ 13.3 Application I/O Interface ⚫ 13.4 Kernel I/O Subsystem ⚫ 13.5 Transforming I/O Requests to Hardware Operations ⚫ 13.6 STREAMS ⚫ 13.7 Performance
●●● 13.1 Overview ●●●● ●●●●● ●●●● ●●●0● ●| O System of os ●●●0 o The main job of a computer is l/O o The role of the os in lo is manage and control ● o devices lo devices vary so widely in their function and speed Hard disk vs. keyboard Varied methods are needed to manage and control them These methods form the l/o subsystem of the kernel ● lO operation
4 13.1 Overview ⚫ I/O System of OS ⚫ The main job of a computer is I/O ⚫ The role of the OS in I/O is manage and control ⚫ I/O devices ▪ I/O devices vary so widely in their function and speed ▪ Hard disk vs. keyboard ▪ Varied methods are needed to manage and control them ▪ These methods form the I/O subsystem of the kernel ⚫ I/O operation
●●● 13. /0 Systems ●●●● ●●●●● ●●● 13.oVerview ●●●0● ●●●0 13.2 0 Hardware 13 3 Application IO Interface 13 4 Kernel O Subsystem 13.5 Transforming lO Requests to Hardware Operations °136 STREAMS 13.7 Performance
5 13. I/O Systems ⚫ 13.1Overview ⚫ 13.2 I/O Hardware ⚫ 13.3 Application I/O Interface ⚫ 13.4 Kernel I/O Subsystem ⚫ 13.5 Transforming I/O Requests to Hardware Operations ⚫ 13.6 STREAMS ⚫ 13.7 Performance
13.20 Hardware ●●● ●●●● ●●●●● ●●●● ●●●0● ●●●0 ● lo Hardware ● Devices ● Connections o for devices communicating with a computer system(main memory)
6 13.2 I/O Hardware ⚫ I/O Hardware ⚫ Devices ⚫ Connections ⚫ for devices communicating with a computer system (main memory)
13.20 Hardware ●●● ●●●● ●●●●● ●●●● ●●●0● o General categories of l/o devices ●●●0 ● Storage devices ●Dsks, tapes Transmission devices o Network cards, modems Human-interface devices Screen, keyboard, mouse Specialized devices The steering of fighter, a space shuttle
7 13.2 I/O Hardware ⚫ General categories of I/O devices ⚫ Storage devices ⚫ Disks, tapes ⚫ Transmission devices ⚫ Network cards, modems ⚫ Human-interface devices ⚫ Screen, keyboard, mouse ⚫ Specialized devices ⚫ The steering of fighter, a space shuttle
13.20 Hardware ●●● ●●●● ●●●●● ●●●● Connections(Attachments) ●●●0● ●●●0 Port o A connection point serial port, a parallel port Bus(daisy chain or shared direct access) o a set of wires and a rigidly defined protocol e PCL SA, SCSI Device Controller o Is a collection of electronics that can operate a port, a bus or a device Serial port controller o scsi bus controller ●| DE controller
8 13.2 I/O Hardware ⚫ Connections (Attachments) ⚫ Port ⚫ A connection point ⚫ serial port, a parallel port ⚫ Bus (daisy chain or shared direct access) ⚫ A set of wires and a rigidly defined protocol ⚫ PCI, ISA, SCSI ⚫ Device Controller ⚫ Is a collection of electronics that can operate a port, a bus or a device ⚫ Serial port controller ⚫ SCSI bus controller ⚫ IDE controller
13.20 Hardware ●●● ●●●● ●●●●● ●●●● ●●●0● A typical PC bus structure ●●●0 monitor prc ocessor cache graphics bridge/memory controller controller memory SCSI controller PCI bus iDE disk controller expansion bus keyboard interface EXpansion busT disk parallel serial po ort
9 13.2 I/O Hardware A typical PC bus structure
●●● 13.2 /0 Hardware ●●●● ●●●●● ●●●● ●●●0● o 0 transfer Data transfer) ●●●0 Registers Typically o controller has 4 ty pes of registers Status registers Control registers Data-in registers Data-out registers o These device registers have addresses, that can be accessed by processor
10 13.2 I/O Hardware ⚫ I/O transfer (Data transfer) ⚫ Registers ⚫ Typically I/O controller has 4 types of registers ▪ Status registers ▪ Control registers ▪ Data-in registers ▪ Data-out registers ⚫ These device registers have addresses, that can be accessed by processor
●●● 13.2 /0 Hardware ●●●● ●●●●● ●●● ●●●0● o Reading and Writing of registers ●●●0 o Special l/o instructions(Direct O) Transfer a byte or a word to an l/o port address Trigger bus lines to select the proper device Move bits into or out of a device register Memory-mapped l/O Device registers are mapped into the memory address Use the standard data-transfer instructions to read and writer the registers o Direct l0 memory mapped o
11 13.2 I/O Hardware ⚫ Reading and Writing of registers ⚫ Special I/O instructions (Direct I/O) ▪ Transfer a byte or a word to an I/O port address ▪ Trigger bus lines to select the proper device ▪ Move bits into or out of a device register ⚫ Memory-mapped I/O ▪ Device registers are mapped into the memory address ▪ Use the standard data-transfer instructions to read and writer the registers ⚫ Direct I/O + memory mapped I/O