Chapter 13 1 I O Systems Chapter 13 1 I O Systems Chapter 13 1 I O Hardware Chapter 13 2 Application I O Interface Kernel I O Subsystem Transforming I O Requests to Hardware Operations Streams Performance Operating System Concepts 13 2 Silberschatz Galvin and Gagne 2005 I O Systems One of the more difficult chapters This chapter pulls together many things we ve had but in significantly more detail It is divided into some key sections An overview I O Hardware Application I O Interface Kernel I O System Transforming I O Requests to Hardware Operations Streams Performance These will keep us busy I plan to cover almost all of these sections and will supplement from other sources as I feel the need arises Operating System Concepts 13 3 Silberschatz Galvin and Gagne 2005 I Introduction Important to realize just how much of a constraint I O operations place on a computing system Yet I O is of course essential as we know that the I O responsibilities include the management and control of I O operations and devices in an overall computing system where overall performance and efficiency are king The reality is that I O devices differ markedly in capability design interfacing and technologies along with the software and hardware that control these Authors approach I O operations in the context of an I O Subsystem part of the kernel but treated separately from the rest of the kernel I O Subsystem is very complicated ever emerging new technologies in the form of specialized I O devices Gives rise for significant standardization of interfacing and operations Have basic hardware interfacing elements ports buses and I O device controllers But great variability in how all these each define different ways to accommodate I O Hardware must facilitate data transfer with an operating system that craves performance and is software So how does the complexity of input output actually get accommodated such that high performance is maintained in accommodating the slowest yet perhaps the most essential activity in a computing system input output We will look at all this in detail Operating System Concepts 13 4 Silberschatz Galvin and Gagne 2005 2 I O Hardware Putting I O devices into boxes we typically have Storage devices disks tapes etc Transmission devices network cards modems Human interface devices screens keyboards mice joysticks Devices all communicate over cables or air with the machine using standard connections Ports Buses daisy chained or shared host adaptor and Device Controllers They are all different and I want to diverge and consider them in a bit more detail Operating System Concepts 13 5 Silberschatz Galvin and Gagne 2005 Ports The CPU and its supporting circuitry provide Memory mapped I O which involves a range of memory addresses simply set aside and are mapped to device registers Reads and writes to these memory addresses cause the data to be transferred to and from the device registers A computer using memory mapped I O accesses hardware by reading and writing to specific memory locations using the same assembler language instructions that the computer would normally use to access memory So to accommodate the I O devices areas of CPU s addressable space must be reserved for I O even temporarily rather than memory We will return later with more on memory mapped I O But the thinking of memory mapped I O can be applied to other devices such as the serial and parallel ports used to connect modems and printers to a computer Here the CPU transfers data through these devices by reading and writing a few device registers called an I O port Port mapped I O usually requires the use of special instructions which are specifically designed to perform I O operations such as the IN and OUT instructions found on Intel microprocessors Here I O devices have a separate address space from general memory either accomplished by an extra I O pin on the CPU s physical interface or an entire bus dedicated to I O I O ports are simply a few registers supporting data transfer from I O devices and main memory Very specific I O instructions are executed to allow this data transfer to take place between these registers and main memory So simply consider a port as a set of hardware addresses whose contents are accessed via specific low level instructions ahead If we access hardware through ports we are dealing with the hardware directly Mistakes may be disastrous however because there is no validation whether your input is correct or not in general I O ports only accept numbers byte 8 bits or word 16 or 32 bits This input depends on the hardware you want to deal with More interest A computer using memory mapped I O accesses hardware by reading and writing to specific memory locations using the same assembler language instructions that the computer would normally use to access memory Access not every port has both read and write access Some have read only some only write access Interestingly there may be a port register which you may view as an array of data inside the hardware Operating System Concepts 13 6 Silberschatz Galvin and Gagne 2005 Port Picture older device This picture shows an internal view of some of the I O ports on the right and a covered view on the left On the back of computers are several I O ports Above on the very top are two PS 2 ports normally used for mouse and keyboard connections Below those are two USB or Universal Serial Bus ports Below those are two serial ports beside a long parallel port that is often used to connect to a printer On the bottom right is a game port for joysticks or other game controllers On the bottom left is a microphone hook up a speaker hook up and an additional hook up for another sound input device like a musical keyboard Operating System Concepts 13 7 Silberschatz Galvin and Gagne 2005 More Modern Port View These are typical ports on a more modern computer Operating System Concepts 13 8 Silberschatz Galvin and Gagne 2005 Device I O Port Locations on PCs partial Here you can see some of the addresses set aside to support I O Operating System Concepts 13 9 Silberschatz Galvin and Gagne 2005 Buses In computer architecture a bus is a subsystem that transfers data between computer components inside a computer or between computers Unlike a point to point connection a bus can logically connect several peripherals over the same set of wires Each bus defines its set of connectors to physically plug devices cards or cables together Modern computer buses can use both parallel
View Full Document