Operating system

Operating system - I/O MANAGEMENT I/O Hardware I/O devices...

Info icon This preview shows pages 1–2. Sign up to view the full content.

I/O MANAGEMENT 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 via ports , e.g. a serial or parallel port. A common set of wires connecting multiple devices is termed a bus. Buses include rigid protocols for the types of messages that can be sent across the bus and the procedures for resolving contention issues. Figure 13.1 below illustrates three of the four bus types commonly found in a modern PC: 1. The PCI 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. The SCSI 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: 1. The data-in register is read by the host to get input from the device. 2. The data-out register is written by the host to send output. 3. The status register has bits read by the host to ascertain the status of the device, such as idle, ready for input, busy, error, transaction complete, etc. 4. The control register has bits written by the host to issue commands or to change settings of the device such as parity checking, word length, or full- versus half-duplex operation. Another technique for communicating with devices is memory-mapped I/O. 1. 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. 2. Memory-mapped I/O is suitable for devices which must move large quantities of data quickly, such as graphics cards. 3. 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 information such as setting the video mode. 4. 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. 13.2.1 Polling One simple means of device handshaking involves polling: 1. The host repeatedly checks the busy bit on the device until it becomes clear. 2. The host writes a byte of data into the data-out register, and sets the write bit in the command register ( in either order. ) 3. The host sets the command ready bit in the command register to notify the device of the pending command.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '10
  • Woods
  • Clo, Clock Software, Principles Of I/O Software, Central processing unit, Input/output, device

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern