Chapter 9. Input and Output of Text

Complete computer systems include components dedicated to the input and output of data. Devices for I/O connect to the central processor and memory through bus structures, as pictured in Figure 2-1. Straying momentarily, but usefully, from our core topic and the instruction set, we include in this chapter a treatment of input and output from a high-level programmer's perspective. We shall leave consideration of the physical devices (including bus protocols and timing) to books on computer organization, detailed explanation of file systems (including directories and security) to books on operating systems, and description of internal file organization (e.g., sequential or indexed) to books on data structures and database technology.

The number and nature of commands required to control the operation of each type of physical device vary considerably, whether for nonstorage devices like displays and printers or for storage devices such as disk drives.

Data stored on a disk are usually organized along concentric circles or spiral pathways at the physical level, with an appreciable fraction of total storage capacity devoted to error correction codes. RAID (redundant arrays of independent devices) technology allows data to be stored across several distinct hardware elements. The storage device is designed to hide the details of its operation, especially the detection and correction of errors. It presents to the operating system only an abstraction of an ideal storage space upon which a reliable file system may be based.

In turn, the file system and other aspects of a programming environment establish higher levels of abstraction (Figure 9-1) where a program can create or access a data file without concern about how and where it is physically stored. Most operating systems manage their file systems in ways that permit large files to be broken up into segments that are not necessarily contiguous.

Figure 9-1. Schematic relationships between logical and physical file storage

graphics/09fig01.gif

In this chapter, we present enough detail about some of the standard C input/output functions to make possible complete programs in Itanium assembly language that interact with the user and text files.



ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ItaniumR Architecture for Programmers. Understanding 64-Bit Processors and EPIC Principles
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net