overview of input and output systems

Upload: shakthi-raghuveer

Post on 14-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 overview of input and output systems

    1/10

    Assignment on

    Advanced System Software

    Submitted

    By,

    Overview I/O Systems

    Management of I/O devices is a very important part of the operating system - so importantand so varied that entire I/O subsystems are devoted to its operation. ( Consider the range of

    devices on a modern computer, from mice, keyboards, disk drives, display adapters, USB devices,

    network connections, audio I/O, printers, special devices for the handicapped, and many special-

    purpose peripherals. )

    I/O Subsystems must contend with two ( conflicting? ) trends: (1) The gravitation towards

    standard interfaces for a wide range of devices, making it easier to add newly developed devices

    to existing systems, and (2) the development of entirely new types of devices, for which the

    existing standard interfaces are not always easy to apply.

  • 7/27/2019 overview of input and output systems

    2/10

    Device driversare modules that can be plugged into an OS to handle a particular device or

    category of similar devices.

    I/O Hardware

    I/O devices can be roughly categorized as storage, communications, user-interface, and other

    Devices communicate with the computer via signals sent over wires or through the air.

    Devices connect with the computer viaports, e.g. a serial or parallel port.

    A common set of wires connecting multiple devices is termed a bus.

    o Buses include rigid protocols for the types of messages that can be sent across the

    bus and the procedures for resolving contention issues.

    o Figure 13.1 below illustrates three of the four bus types commonly found in a modern

    PC:

    1 ThePCI bus connects high-speed high-bandwidth devices to the memory

    subsystem ( and the CPU. )

    2 The expansion bus connects slower low-bandwidth devices, which typically

    deliver data one character at a time ( with buffering. )

    3 TheSCSI bus connects a number of SCSI devices to a common SCSI

    controller.

    4 A daisy-chain bus, ( not shown) is when a string of devices is connected to

    each other like beads on a chain, and only one of the devices is directly

    connected to the host.

    One way of communicating with devices is through registers associated with each port.

    Registers may be one to four bytes in size, and may typically include ( a subset of ) the following

    four:

    2 The data-in registeris read by the host to get input from the device.

    3 The data-out registeris written by the host to send output.

    4 The status registerhas bits read by the host to ascertain the status of the device, such

    as idle, ready for input, busy, error, transaction complete, etc.

    5The control registerhas bits written by the host to issue commands or to changesettings of the device such as parity checking, word length, or full- versus half-duplex

    operation.

  • 7/27/2019 overview of input and output systems

    3/10

    Another technique for communicating with devices is memory-mapped I/O.

    o In this case a certain portion of the processor's address space is mapped to the device,

    and communications occur by reading and writing directly to/from those memory areas.

    o Memory-mapped I/O is suitable for devices which must move large quantities of data

    quickly, such as graphics cards.

    o Memory-mapped I/O can be used either instead of or more often in combination with

    traditional registers. For example, graphics cards still use registers for control informationsuch as setting the video mode.

    o A potential problem exists with memory-mapped I/O, if a process is allowed to write

    directly to the address space used by a memory-mapped I/O device.

    o ( Note: Memory-mapped I/O is not the same thing as direct memory access, DMA.

    See section 13.2.3 below. )

    Polling

    One simple means of device handshakinginvolves polling:

    6 The host repeatedly checks the busy biton the device until it becomes clear.

    7 The host writes a byte of data into the data-out register, and sets the write bitin the

    command register ( in either order. )8 The host sets the command ready bitin the command register to notify the device of

    the pending command.

    9 When the device controller sees the command-ready bit set, it first sets the busy bit.

    10 Then the device controller reads the command register, sees the write bit set, reads

    the byte of data from the data-out register, and outputs the byte of data.

    11 The device controller then clears the error bitin the status register, the command-

    ready bit, and finally clears the busy bit, signaling the completion of the operation.

  • 7/27/2019 overview of input and output systems

    4/10

    Polling can be very fast and efficient, if both the device and the controller are fast and if there

    is significant data to transfer. It becomes inefficient, however, if the host must wait a long time in

    the busy loop waiting for the device, or if frequent checks need to be made for data that is

    infrequently there.

    Interrupts

    Interrupts allow devices to notify the CPU when they have data to transfer or when an

    operation is complete, allowing the CPU to perform other duties when no I/O transfers need its

    immediate attention.

    The CPU has an interrupt-request line that is sensed after every instruction.

    o A device's controllerraises an interrupt by asserting a signal on the interrupt request

    line.

    o The CPU then performs a state save, and transfers control to the interrupt handler

    routine at a fixed address in memory. ( The CPU catches the interrupt and dispatches the

    interrupt handler. )

    o The interrupt handler determines the cause of the interrupt, performs the necessary

    processing, performs a state restore, and executes a return from interruptinstruction to

    return control to the CPU. ( The interrupt handlerclears the interrupt by servicing thedevice. )

    ( Note that the state restored does not need to be the same state as the one

    that was saved when the interrupt went off. See below for an example involving

    time-slicing. )

    The above description is adequate for simple interrupt-driven I/O, but there are three needs in

    modern computing which complicate the picture:

    12 The need to defer interrupt handling during critical processing,

    13 The need to determine which interrupt handler to invoke, without having to poll all

    devices to see which one needs attention, and

    14 The need for multi-level interrupts, so the system can differentiate between high- and

    low-priority interrupts for proper response.

    These issues are handled in modern computer architectures with interrupt-controller

    hardware.

    o Most CPUs now have two interrupt-request lines: One that is non-maskable for

    critical error conditions and one that is maskable, that the CPU can temporarily ignore

    during critical processing.

    o The interrupt mechanism accepts an address,which is usually one of a small set of

    numbers for an offset into a table called the interrupt vector. This table ( usually located

    at physical address zero ? ) holds the addresses of routines prepared to process specific

    interrupts.

    o The number of possible interrupt handlers still exceeds the range of defined interrupt

    numbers, so multiple handlers can be interrupt chained. Effectively the addresses held in

    the interrupt vectors are the head pointers for linked-lists of interrupt handlers.

  • 7/27/2019 overview of input and output systems

    5/10

    o Figure 13.4 shows the Intel Pentium interrupt vector. Interrupts 0 to 31 are non-maskable and reserved for serious hardware and other errors. Maskable interrupts,

    including normal device I/O interrupts begin at interrupt 32.

    o Modern interrupt hardware also supports interrupt priority levels, allowing systems

    to mask off only lower-priority interrupts while servicing a high-priority interrupt, or

    conversely to allow a high-priority signal to interrupt the processing of a low-priority

    one.

    Device Driver

    In computing, a device driver is a computer program that operates or controls a particular

    type of device that is attached to a computer. [1]A driver typically communicates with thedevice through the computer busor communications subsystem to which the hardware

    connects. When a calling program invokes a routine in the driver, the driver issues

    commands to the device. Once the device sends data back to the driver, the driver mayinvoke routines in the original calling program. Drivers are hardware-dependent andoperating-system-specific. They usually provide the interrupt handling required for any

    necessary asynchronous time-dependent hardware interface.[2]

    A device driver simplifies programming by acting as translator between a hardwaredevice and the applications oroperating systemsthat use it.[1] Programmers can write the

    higher-level application code independently of whatever specific hardware the end-user is

    using. Physical layers communicate with specific device instances. For example, a serial

    http://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Device_driver#cite_note-dev1-1http://en.wikipedia.org/wiki/Device_driver#cite_note-dev1-1http://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/Computer_bushttp://en.wikipedia.org/wiki/Computer_bushttp://en.wikipedia.org/wiki/Subroutinehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Device_driver#cite_note-2http://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Device_driver#cite_note-dev1-1http://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Device_driver#cite_note-dev1-1http://en.wikipedia.org/wiki/Peripheralhttp://en.wikipedia.org/wiki/Computer_bushttp://en.wikipedia.org/wiki/Subroutinehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Device_driver#cite_note-2http://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Device_driver#cite_note-dev1-1http://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Computer_program
  • 7/27/2019 overview of input and output systems

    6/10

    port needs to handle standard communication protocols such as XON/XOFF that are

    common for all serial port hardware. This would be managed by a serial port logical

    layer. However, the physical layer needs to communicate with a particular serial portchip. 16550 UART hardware differs from PL-011. The physical layer addresses these

    chip-specific variations. Conventionally, OS requests go to the logical layer first. In turn,

    the logical layer calls upon the physical layer to implement OS requests in termsunderstandable by the hardware. Conversely, when a hardware device needs to respond to

    the OS, it uses the physical layer to speak to the logical layer. In Linux environments,

    programmers can build device drivers either as parts of the kernel or separately asloadable modules. Makedev includes a list of the devices in Linux: ttyS (terminal), lp

    (parallel port), hd (disk), loop (loopback disk device), sound (these include mixer,

    sequencer, dsp, and audio)...[3]

    TheMicrosoft Windows.sys files and Linux .ko modules contain loadable device drivers.The advantage of loadable device drivers is that they can be loaded only when necessary

    and then unloaded, thus saving kernel memory.

    Development

    Writing a device driver requires an in-depth understanding of how the hardware and thesoftware of a givenplatform function. Drivers operate in a highlyprivilegedenvironment

    and can cause disaster if they get things wrong. In contrast, most user-level software on

    modern operating systemscan be stopped without greatly affecting the rest of the system.Even drivers executing in user mode can crash a system if the device is erroneously

    programmed. These factors make it more difficult and dangerous to diagnose problems.[4]

    The task of writing drivers thus usually falls to software engineers orcomputer engineerswho work for hardware-development companies. This is because they have better

    information than most outsiders about the design of their hardware. Moreover, it was

    traditionally considered in the hardware manufacturer's interest to guarantee that their

    clients can use their hardware in an optimum way. Typically, the logical device driver(LDD) is written by the operating system vendor, while the physical device driver(PDD)

    is implemented by the device vendor. But in recent years non-vendors have written

    numerous device drivers, mainly for use with free and open sourceoperating systems. Insuch cases, it is important that the hardware manufacturer provides information on how

    the device communicates. Although this information can instead be learned by reverse

    engineering, this is much more difficult with hardware than it is with software.Microsofthas attempted to reduce system instability due to poorly written device drivers

    by creating a new framework for driver development, called Windows Driver Foundation

    (WDF). This includes User-Mode Driver Framework (UMDF) that encouragesdevelopment of certain types of driversprimarily those that implement a message-based

    protocol for communicating with their devicesas user-mode drivers. If such driversmalfunction, they do not cause system instability. The Kernel-Mode Driver Framework

    (KMDF) model continues to allow development of kernel-mode device drivers, butattempts to provide standard implementations of functions that are known to cause

    problems, including cancellation of I/O operations, power management, and plug and

    play device support.

    Kernel mode vs. user mode

    http://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/XONhttp://en.wikipedia.org/wiki/16550_UARThttp://en.wikipedia.org/wiki/16550_UARThttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Loadable_kernel_modulehttp://en.wikipedia.org/wiki/Makedevhttp://en.wikipedia.org/wiki/Makedevhttp://en.wikipedia.org/wiki/Parallel_porthttp://en.wikipedia.org/wiki/Loopback_disk_devicehttp://en.wikipedia.org/wiki/Sound_card_mixerhttp://en.wikipedia.org/wiki/Music_sequencerhttp://en.wikipedia.org/wiki/Digital_signal_processorhttp://en.wikipedia.org/wiki/Device_driver#cite_note-3http://en.wikipedia.org/wiki/Device_driver#cite_note-3http://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/.syshttp://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/Computing_platformhttp://en.wikipedia.org/wiki/Privilege_(computing)http://en.wikipedia.org/wiki/Privilege_(computing)http://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/User_modehttp://en.wikipedia.org/wiki/Device_driver#cite_note-4http://en.wikipedia.org/wiki/Software_engineerhttp://en.wikipedia.org/wiki/Computer_engineerhttp://en.wikipedia.org/wiki/Computer_engineerhttp://en.wikipedia.org/wiki/Manufacturerhttp://en.wikipedia.org/wiki/Manufacturerhttp://en.wikipedia.org/wiki/Manufacturerhttp://en.wikipedia.org/wiki/Free_and_open_source_softwarehttp://en.wikipedia.org/wiki/Free_and_open_source_softwarehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Reverse_engineeringhttp://en.wikipedia.org/wiki/Reverse_engineeringhttp://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/Windows_Driver_Foundationhttp://en.wikipedia.org/wiki/User-Mode_Driver_Frameworkhttp://en.wikipedia.org/wiki/User-Mode_Driver_Frameworkhttp://en.wikipedia.org/wiki/Message-based_protocolhttp://en.wikipedia.org/wiki/Message-based_protocolhttp://en.wikipedia.org/wiki/Kernel-Mode_Driver_Frameworkhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/XONhttp://en.wikipedia.org/wiki/16550_UARThttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Loadable_kernel_modulehttp://en.wikipedia.org/wiki/Makedevhttp://en.wikipedia.org/wiki/Parallel_porthttp://en.wikipedia.org/wiki/Loopback_disk_devicehttp://en.wikipedia.org/wiki/Sound_card_mixerhttp://en.wikipedia.org/wiki/Music_sequencerhttp://en.wikipedia.org/wiki/Digital_signal_processorhttp://en.wikipedia.org/wiki/Device_driver#cite_note-3http://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/.syshttp://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/Computing_platformhttp://en.wikipedia.org/wiki/Privilege_(computing)http://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/User_modehttp://en.wikipedia.org/wiki/Device_driver#cite_note-4http://en.wikipedia.org/wiki/Software_engineerhttp://en.wikipedia.org/wiki/Computer_engineerhttp://en.wikipedia.org/wiki/Manufacturerhttp://en.wikipedia.org/wiki/Free_and_open_source_softwarehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Reverse_engineeringhttp://en.wikipedia.org/wiki/Reverse_engineeringhttp://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/Windows_Driver_Foundationhttp://en.wikipedia.org/wiki/User-Mode_Driver_Frameworkhttp://en.wikipedia.org/wiki/Message-based_protocolhttp://en.wikipedia.org/wiki/Message-based_protocolhttp://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework
  • 7/27/2019 overview of input and output systems

    7/10

    Device drivers, particularly on modern Microsoft Windows platforms, can run in kernel-

    mode (Ring 0 on x86 CPUs) or in user-mode (Ring 3 on x86 CPUs).[5] The primary

    benefit of running a driver in user mode is improved stability, since a poorly written usermode device driver cannot crash the system by overwriting kernel memory. [6] On the

    other hand, user/kernel-mode transitions usually impose a considerable performance

    overhead, thereby prohibiting user-mode drivers for low latency and high throughputrequirements.

    Kernel space can be accessed by user module only through the use of system calls. End

    user programs like the UNIX shell or other GUI-based applications are part of the userspace. These applications interact with hardware through kernel supported functions.

    Applications

    Because of the diversity of modern hardware and operating systems, drivers operate in

    many different environments.[7] Drivers may interface with:

    printers

    video adapters

    Network cards Sound cards

    Localbuses of various sortsin particular, forbus mastering on modern systems

    Low-bandwidth I/O buses of various sorts (forpointing devices such as mice,

    keyboards,USB, etc.)

    Computer storagedevices such as hard disk, CD-ROM, and floppy disk buses

    (ATA,SATA,SCSI)

    Implementing support for different file systems

    Image scanners

    Digital cameras

    Common levels of abstraction for device drivers include:

    For hardware:o Interfacing directly

    o Writing to or reading from a device control register

    o Using some higher-level interface (e.g. Video BIOS)

    o Using another lower-level device driver (e.g. file system drivers using disk

    drivers)

    o Simulating work with hardware, while doing something entirely

    different[citation needed]

    For software:

    o Allowing the operating system direct access to hardware resources

    o Implementing onlyprimitives

    o Implementing an interface for non-driver software (e.g., TWAIN)

    o Implementing a language, sometimes quite high-level (e.g., PostScript)

    Choosing and installing the correct device drivers for given hardware is often a keycomponent of computer system configuration.[citation needed]

    Virtual device drivers

    http://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/CPU_modeshttp://en.wikipedia.org/wiki/CPU_modeshttp://en.wikipedia.org/wiki/Ring_(computer_security)http://en.wikipedia.org/wiki/User_spacehttp://en.wikipedia.org/wiki/User_spacehttp://en.wikipedia.org/wiki/Device_driver#cite_note-5http://en.wikipedia.org/wiki/Device_driver#cite_note-5http://en.wikipedia.org/wiki/Device_driver#cite_note-6http://en.wikipedia.org/wiki/Device_driver#cite_note-7http://en.wikipedia.org/wiki/Interface_(computer_science)http://en.wikipedia.org/wiki/Computer_printerhttp://en.wikipedia.org/wiki/Video_cardhttp://en.wikipedia.org/wiki/Network_interface_controllerhttp://en.wikipedia.org/wiki/Sound_cardhttp://en.wikipedia.org/wiki/Computer_bushttp://en.wikipedia.org/wiki/Bus_masteringhttp://en.wikipedia.org/wiki/Bus_masteringhttp://en.wikipedia.org/wiki/Bandwidth_(computing)http://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Pointing_devicehttp://en.wikipedia.org/wiki/Computer_mousehttp://en.wikipedia.org/wiki/Computer_mousehttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/Universal_Serial_Bushttp://en.wikipedia.org/wiki/Computer_storagehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/CD-ROMhttp://en.wikipedia.org/wiki/Floppy_diskhttp://en.wikipedia.org/wiki/Advanced_Technology_Attachmenthttp://en.wikipedia.org/wiki/Advanced_Technology_Attachmenthttp://en.wikipedia.org/wiki/Serial_ATAhttp://en.wikipedia.org/wiki/Serial_ATAhttp://en.wikipedia.org/wiki/SCSIhttp://en.wikipedia.org/wiki/File_systemhttp://en.wikipedia.org/wiki/Image_scannerhttp://en.wikipedia.org/wiki/Digital_camerahttp://en.wikipedia.org/wiki/Device_control_registerhttp://en.wikipedia.org/wiki/Video_BIOShttp://en.wikipedia.org/wiki/Wikipedia:Citation_neededhttp://en.wikipedia.org/wiki/Wikipedia:Citation_neededhttp://en.wikipedia.org/wiki/Primitive_(computer_science)http://en.wikipedia.org/wiki/Primitive_(computer_science)http://en.wikipedia.org/wiki/TWAINhttp://en.wikipedia.org/wiki/PostScripthttp://en.wikipedia.org/wiki/Wikipedia:Citation_neededhttp://en.wikipedia.org/wiki/Wikipedia:Citation_neededhttp://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/CPU_modeshttp://en.wikipedia.org/wiki/CPU_modeshttp://en.wikipedia.org/wiki/Ring_(computer_security)http://en.wikipedia.org/wiki/User_spacehttp://en.wikipedia.org/wiki/Device_driver#cite_note-5http://en.wikipedia.org/wiki/Device_driver#cite_note-6http://en.wikipedia.org/wiki/Device_driver#cite_note-7http://en.wikipedia.org/wiki/Interface_(computer_science)http://en.wikipedia.org/wiki/Computer_printerhttp://en.wikipedia.org/wiki/Video_cardhttp://en.wikipedia.org/wiki/Network_interface_controllerhttp://en.wikipedia.org/wiki/Sound_cardhttp://en.wikipedia.org/wiki/Computer_bushttp://en.wikipedia.org/wiki/Bus_masteringhttp://en.wikipedia.org/wiki/Bandwidth_(computing)http://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Pointing_devicehttp://en.wikipedia.org/wiki/Computer_mousehttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/Universal_Serial_Bushttp://en.wikipedia.org/wiki/Computer_storagehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/CD-ROMhttp://en.wikipedia.org/wiki/Floppy_diskhttp://en.wikipedia.org/wiki/Advanced_Technology_Attachmenthttp://en.wikipedia.org/wiki/Serial_ATAhttp://en.wikipedia.org/wiki/SCSIhttp://en.wikipedia.org/wiki/File_systemhttp://en.wikipedia.org/wiki/Image_scannerhttp://en.wikipedia.org/wiki/Digital_camerahttp://en.wikipedia.org/wiki/Device_control_registerhttp://en.wikipedia.org/wiki/Video_BIOShttp://en.wikipedia.org/wiki/Wikipedia:Citation_neededhttp://en.wikipedia.org/wiki/Primitive_(computer_science)http://en.wikipedia.org/wiki/TWAINhttp://en.wikipedia.org/wiki/PostScripthttp://en.wikipedia.org/wiki/Wikipedia:Citation_needed
  • 7/27/2019 overview of input and output systems

    8/10

    Virtual device drivers represent a particular variant of device drivers. They are used to

    emulate a hardware device, particularly in virtualizationenvironments, for example when

    a DOSprogram is run on a Microsoft Windows computer or when a guest operatingsystemis run on, for example, a Xenhost. Instead of enabling the guest operating system

    to dialog with hardware, virtual device drivers take the opposite role and emulate a piece

    of hardware, so that the guest operating system and its drivers running inside a virtualmachine can have the illusion of accessing real hardware. Attempts by the guest operating

    system to access the hardware are routed to the virtual device driver in the host operating

    system as e.g.,function calls. The virtual device driver can also send simulated processor-level events likeinterrupts into the virtual machine.Virtual devices may also operate in a

    non-virtualized environment. For example a virtual network adapteris used with a virtual

    private network, while a virtual disk device is used with iSCSI. The best example for

    virtual device drivers can be "Daemon Tools".

    System BootIn computing, booting (also known as booting up) is the initial set of operations that a

    computer system performs when electrical power to the CPU is switched on. The process

    begins when a computer is turned on for the first time or is re-energized after beingturned off, and ends when the computer is ready to perform its normal operations. On

    modern general purpose computers, this can take tens of seconds and typically involvesperforming a power-on self-test, locating and initializing peripheral devices, and then

    finding, loading and starting an operating system. Many computer systems also allow

    these operations to be initiated by a software command without cycling power, in what isknown as a soft reboot, though some of the initial operations might be skipped on a soft

    reboot. A boot loader is a computer program that loads the main operating system or

    runtime environment for the computer after completion of the self-tests.The computer term bootis short forbootstrap[1] [2] orbootstrap loadand derives from the

    phrase to pull oneself up by one's bootstraps.[3] The usage calls attention to the

    requirement that, if most software is loaded onto a computer by other software alreadyrunning on the computer, some mechanism must exist to load initial software onto thecomputer.[4] Early computers used a variety of ad-hoc methods to get a small program

    into memory to solve this problem. The invention ofintegrated circuitread-only memory

    (ROM) of various types solved this paradox by allowing computers to be shipped with astart up program that could not be erased. Growth in the capacity of ROM has allowed

    ever more elaborate start up procedures to be implemented.

    On general purpose computers, the boot process begins with the execution of an initialprogram stored in boot ROMs or read in another fashion. In some older computers, the

    initial program might have been the application to run, if no operating system was used,

    or the operating system. In other computers, the initial program is a boot loader that may

    then load into random-access memory (RAM), from nonvolatilesecondary storage (suchas a hard disk drive) or, in some older computers, from a medium such as punched cards,

    punched tape, or magnetic tape in older computers, the binary code of an operating

    system or runtime environment and then execute it. If the boot loader is limited in its sizeand capabilities, it may, instead, load a larger and more capable secondary boot loader,

    which would then load the operating system or runtime environment. Some embedded

    systems do not require a noticeable boot sequence to begin functioning and when turnedon may simply run operational programs that are stored in ROM.

    http://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/DOShttp://en.wikipedia.org/wiki/DOShttp://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Xenhttp://en.wikipedia.org/wiki/Xenhttp://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/Function_callhttp://en.wikipedia.org/wiki/Function_callhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Network_interface_controllerhttp://en.wikipedia.org/wiki/Virtual_private_networkhttp://en.wikipedia.org/wiki/Virtual_private_networkhttp://en.wikipedia.org/wiki/Virtual_private_networkhttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/ISCSIhttp://en.wikipedia.org/wiki/Computinghttp://en.wikipedia.org/wiki/Computer_systemhttp://en.wikipedia.org/wiki/Power-on_self-testhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Reboot_(computing)#Soft_reboothttp://en.wikipedia.org/wiki/Reboot_(computing)#Soft_reboothttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Runtime_environmenthttp://en.wikipedia.org/wiki/Bootstrappinghttp://en.wikipedia.org/wiki/Booting#cite_note-1http://en.wikipedia.org/wiki/Booting#cite_note-1http://en.wikipedia.org/wiki/Booting#cite_note-2http://en.wikipedia.org/wiki/Booting#cite_note-2http://en.wikipedia.org/wiki/Bootstrapping#Etymologyhttp://en.wikipedia.org/wiki/Bootstrapping#Etymologyhttp://en.wikipedia.org/wiki/Booting#cite_note-3http://en.wikipedia.org/wiki/Booting#cite_note-3http://en.wikipedia.org/wiki/Booting#cite_note-4http://en.wikipedia.org/wiki/Booting#cite_note-4http://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Random-access_memoryhttp://en.wikipedia.org/wiki/Non-volatile_memoryhttp://en.wikipedia.org/wiki/Secondary_storagehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/Punched_cardshttp://en.wikipedia.org/wiki/Punched_tapehttp://en.wikipedia.org/wiki/Magnetic_tapehttp://en.wikipedia.org/wiki/Binary_codehttp://en.wikipedia.org/wiki/Embedded_systemshttp://en.wikipedia.org/wiki/Embedded_systemshttp://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/DOShttp://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Xenhttp://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/Function_callhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Network_interface_controllerhttp://en.wikipedia.org/wiki/Virtual_private_networkhttp://en.wikipedia.org/wiki/Virtual_private_networkhttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/ISCSIhttp://en.wikipedia.org/wiki/Computinghttp://en.wikipedia.org/wiki/Computer_systemhttp://en.wikipedia.org/wiki/Power-on_self-testhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Reboot_(computing)#Soft_reboothttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Runtime_environmenthttp://en.wikipedia.org/wiki/Bootstrappinghttp://en.wikipedia.org/wiki/Booting#cite_note-1http://en.wikipedia.org/wiki/Booting#cite_note-2http://en.wikipedia.org/wiki/Bootstrapping#Etymologyhttp://en.wikipedia.org/wiki/Booting#cite_note-3http://en.wikipedia.org/wiki/Booting#cite_note-4http://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Random-access_memoryhttp://en.wikipedia.org/wiki/Non-volatile_memoryhttp://en.wikipedia.org/wiki/Secondary_storagehttp://en.wikipedia.org/wiki/Hard_disk_drivehttp://en.wikipedia.org/wiki/Punched_cardshttp://en.wikipedia.org/wiki/Punched_tapehttp://en.wikipedia.org/wiki/Magnetic_tapehttp://en.wikipedia.org/wiki/Binary_codehttp://en.wikipedia.org/wiki/Embedded_systemshttp://en.wikipedia.org/wiki/Embedded_systems
  • 7/27/2019 overview of input and output systems

    9/10

    Modern boot loaders

    When a modern computer is turned off, software, including operating systems,application code, and data, is stored on nonvolatile data storage devices such as hard

    drives, CDs, DVDs, flash memory cards (like SD cards), USB flash drives, and floppydisks. When the computer is powered on, it typically does not have an operating system

    in random access memory (RAM). The computer first executes a relatively smallprogram stored inread-only memory (ROM) along with a small amount of needed data,

    to access the nonvolatile device or devices from which the operating system programs

    and data can be loaded into RAM.The small program that starts this sequence is known as a bootstrap loader, bootstrap or

    boot loader. This small program's only job is to load other data and programs which are

    then executed from RAM. Often, multiple-stage boot loaders are used, during whichseveral programs of increasing complexity load one after the other in a process of chain

    loading.

    Some computer systems, upon receiving a boot signal from a human operator or aperipheral device, may load a very small number of fixed instructions into memory at aspecific location, initialize at least one CPU, and then point the CPU to the instructions

    and start their execution. These instructions typically start an input operation from some

    peripheral device (which may be switch-selectable by the operator). Other systems maysend hardware commands directly to peripheral devices or I/O controllers that cause an

    extremely simple input operation (such as "read sector zero of the system device into

    memory starting at location 1000") to be carried out, effectively loading a small numberof boot loader instructions into memory; a completion signal from the I/O device may

    then be used to start execution of the instructions by the CPU.

    Smaller computers often use less flexible but more automatic boot loader

    mechanisms to ensure that the computer starts quickly and with a predetermined softwareconfiguration. In many desktop computers, for example, the bootstrapping process begins

    with the CPU executing software contained in ROM (for example, the BIOS of anIBM

    PC) at a predefined address (some CPUs, including the Intel x86 series are designed toexecute this software after reset without outside help). This software contains

    rudimentary functionality to search for devices eligible to participate in booting, and load

    a small program from a special section (most commonly the boot sector) of the mostpromising device.

    Boot loaders may face peculiar constraints, especially in size; for instance, on the

    IBM PC and compatibles, a boot sector should typically work in only 32 KB[16] (laterrelaxed to 64 KB[17]) of system memory and not use instructions not supported by the

    original 8088/8086processors. The first stage of boot loaders located on fixed disks andremovable drives must fit into the first 446 bytes of the Master Boot Record in order to

    leave room for the default 64-bytepartition table with four partition entries and the two-byte boot signature, which the BIOS requires for a proper boot loader or even less,

    when additional features like more than four partition entries (up to 16 with 16 bytes

    each), a disk signature (6 bytes), a disk timestamp (6 bytes), an Advanced ActivePartition (18 bytes) or special multi-boot loaders have to be supported as well in some

    environments. In floppy and superfloppy Volume Boot Records, up to 59 bytes are

    http://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/CDhttp://en.wikipedia.org/wiki/CDhttp://en.wikipedia.org/wiki/DVDhttp://en.wikipedia.org/wiki/Memory_cardhttp://en.wikipedia.org/wiki/SD_cardhttp://en.wikipedia.org/wiki/USB_flash_drivehttp://en.wikipedia.org/wiki/Floppy_diskhttp://en.wikipedia.org/wiki/Floppy_diskhttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Chain_loadinghttp://en.wikipedia.org/wiki/Chain_loadinghttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/Intel_8086http://en.wikipedia.org/wiki/Boot_sectorhttp://en.wikipedia.org/wiki/Booting#cite_note-msakamoto-mbr-17http://en.wikipedia.org/wiki/Booting#cite_note-msakamoto-mbr-17http://en.wikipedia.org/wiki/Booting#cite_note-BBS_101-18http://en.wikipedia.org/wiki/8088http://en.wikipedia.org/wiki/8086http://en.wikipedia.org/wiki/8086http://en.wikipedia.org/wiki/Fixed_diskhttp://en.wikipedia.org/wiki/Removable_drivehttp://en.wikipedia.org/wiki/Byteshttp://en.wikipedia.org/wiki/Master_Boot_Recordhttp://en.wikipedia.org/wiki/Partition_tablehttp://en.wikipedia.org/wiki/MBR_boot_signaturehttp://en.wikipedia.org/wiki/MBR_disk_signaturehttp://en.wikipedia.org/wiki/MBR_disk_signaturehttp://en.wikipedia.org/wiki/MBR_disk_timestamphttp://en.wikipedia.org/wiki/Advanced_Active_Partitionhttp://en.wikipedia.org/wiki/Advanced_Active_Partitionhttp://en.wikipedia.org/wiki/Advanced_Active_Partitionhttp://en.wikipedia.org/wiki/Floppyhttp://en.wikipedia.org/wiki/Superfloppyhttp://en.wikipedia.org/wiki/Volume_Boot_Recordhttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/CDhttp://en.wikipedia.org/wiki/DVDhttp://en.wikipedia.org/wiki/Memory_cardhttp://en.wikipedia.org/wiki/SD_cardhttp://en.wikipedia.org/wiki/USB_flash_drivehttp://en.wikipedia.org/wiki/Floppy_diskhttp://en.wikipedia.org/wiki/Floppy_diskhttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Chain_loadinghttp://en.wikipedia.org/wiki/Chain_loadinghttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/Intel_8086http://en.wikipedia.org/wiki/Boot_sectorhttp://en.wikipedia.org/wiki/Booting#cite_note-msakamoto-mbr-17http://en.wikipedia.org/wiki/Booting#cite_note-BBS_101-18http://en.wikipedia.org/wiki/8088http://en.wikipedia.org/wiki/8086http://en.wikipedia.org/wiki/Fixed_diskhttp://en.wikipedia.org/wiki/Removable_drivehttp://en.wikipedia.org/wiki/Byteshttp://en.wikipedia.org/wiki/Master_Boot_Recordhttp://en.wikipedia.org/wiki/Partition_tablehttp://en.wikipedia.org/wiki/MBR_boot_signaturehttp://en.wikipedia.org/wiki/MBR_disk_signaturehttp://en.wikipedia.org/wiki/MBR_disk_timestamphttp://en.wikipedia.org/wiki/Advanced_Active_Partitionhttp://en.wikipedia.org/wiki/Advanced_Active_Partitionhttp://en.wikipedia.org/wiki/Floppyhttp://en.wikipedia.org/wiki/Superfloppyhttp://en.wikipedia.org/wiki/Volume_Boot_Record
  • 7/27/2019 overview of input and output systems

    10/10

    occupied for the Extended BIOS Parameter Block onFAT12 and FAT16volumes since

    DOS 4.0, whereas the FAT32 EBPB introduced with DOS 7.1 requires even 71 bytes,

    leaving only 441 bytes for the boot loader when assuming a sector size of 512 bytes.Microsoft boot sectors therefore traditionally imposed certain restrictions on the boot

    process, for example, the boot file had to be located at a fixed position in the root

    directory of the file system and stored as consecutive sectors, conditions taken care of bythe SYS command and slightly relaxed in later versions of DOS. The boot loader was

    then able to load the first three sectors of the file into memory, which happened to contain

    another embedded boot loader able to load the remainder of the file into memory. Whenthey added LBA and FAT32 support, they even switched to a two-sector boot loader using

    386 instructions. At the same time other vendors managed to squeeze much more

    functionality into a single boot sector without relaxing the original constraints on the only

    minimal available memory and processor support. For example, DR-DOS boot sectorsare able to locate the boot file in the FAT12, FAT16 and FAT32 file system, and load it

    into memory as a whole via CHS or LBA, even if the file is not stored in a fixed location

    and in consecutive sectors.

    ************************

    http://en.wikipedia.org/wiki/Extended_BIOS_Parameter_Blockhttp://en.wikipedia.org/wiki/FAT12http://en.wikipedia.org/wiki/FAT12http://en.wikipedia.org/wiki/FAT16http://en.wikipedia.org/wiki/FAT16http://en.wikipedia.org/wiki/FAT32http://en.wikipedia.org/wiki/Extended_BIOS_Parameter_Blockhttp://en.wikipedia.org/wiki/FAT12http://en.wikipedia.org/wiki/FAT16http://en.wikipedia.org/wiki/FAT32