Friday 13 April 2012

Storage and Retrieval of Data

Associated with the central processing unit is the storage unit, or memory, where results or other data are stored for periods of time ranging from a small fraction of a second to days or weeks before being retrieved for further processing. Once made up of vacuum tubes and later of small doughnut-shaped ferromagnetic cores strung on a wire matrix, main storage now consists of integrated circuits, each of which contains thousands of semiconductor devices. Where each vacuum tube or core represented one bit and the total memory of the computer was measured in thousands of bytes (or kilobytes, KB), each semiconductor device now represents millions of bytes (or megabytes, MB) and the total memory of mainframe computers is measured in billions of bytes (or gigabytes, GB). Random-access memory (RAM), which both can be read from and written to, is lost each time the computer is turned off. Read-only memory (ROM), which cannot be written to, maintains its content at all times and is used to store the computer's control information.
Programs and data that are not currently being used in main storage can be saved on auxiliary storage, or external storage. Although punched paper tape and punched cards once served this purpose, the major materials used today are magnetic tape and magnetic disks, which can be read from and written to, and two types of optical disks, the compact disc (CD) and its successor the digital versatile disc (DVD). DVD is an improved optical storage technology capable of storing vastly greater amounts of data than the CD technology. CD-Read-Only Memory (CD-ROM) and DVD-Read-Only Memory (DVD-ROM) disks can only be read-the disks are impressed with data at the factory but once written cannot be erased and rewritten with new data. The latter part of the 1990s saw the introduction of new optical storage technologies: CD-Recordable (CD-R) and DVD-Recordable (DVD-R), optical disks that can be written to by the computer to create a CD-ROM or DVD-ROM, but can be written to only once; and CD-ReWritable (CD-RW), DVD-ReWritable (DVD-RW and DVD+RW), and DVD-Random Access Memory (DVD-RAM), disks that can be written to multiple times.
When compared to semiconductor memory, magnetic and optical storage is less expensive, is not volatile (i.e., data is not lost when the power to the computer is shut off), and provides a convenient way to transfer data from one computer to another. Thus operating instructions or data output from one computer can be stored away from the computer and then retrieved either by the same computer or another. In a system using magnetic tape the information is stored by a specially designed tape recorder somewhat similar to one used for recording sound. In magnetic and optical disk systems the principle is the same except that the magnetic or optical medium lies in a path, or track, on the surface of a disk. The disk drive also contains a motor to spin the disk and a magnetic or optical head or heads to read and write the data to the disk. Drives take several forms, the most significant difference being whether the disk can be removed from the drive assembly.
Removable magnetic disks are most commonly made of mylar enclosed in a paper or plastic holder. These floppy disks have varying capacities, with very high density disks holding 250 MB-more than enough to contain a dozen books the size of Tolstoy's Anna Karenina. Compact discs can hold many hundreds of megabytes, and are used, for example, to store the information contained in an entire multivolume encyclopedia or set of reference works, and DVD disks can hold ten times as much as that. Nonremovable disks are made of metal and arranged in spaced layers. They can hold more data and can read and write data much faster than floppies.
Data are entered into the computer and the processed data made available via input/output devices. All auxiliary storage devices are used as input/output devices. For many years, the most popular input/output medium was the punched card. Although this is still used, the most popular input device is now the computer terminal and the most popular output device is the high-speed printer. Human beings can directly communicate with the computer through computer terminals, entering instructions and data by means of keyboards much like the ones on typewriters, by using a pointing device such as a mouse, trackball, or touchpad, or by speaking into a microphone that is connected to computer running voice-recognition software. Responses may be displayed on a cathode-ray tube, liquid-crystal display, or printer. The CPU, main storage, auxiliary storage, and input/output devices collectively make up a system.
Sharing the Computer's Resources
Generally, the slowest operations that a computer must perform are those of transferring data, particularly when data is received from or delivered to a human being. The computer's central processor is idle for much of this period, and so two similar techniques are used to use its power more fully.
Time sharing, used on large computers, allows several users at different terminals to use a single computer at the same time. The computer performs part of a task for one user, then suspends that task to do part of another for another user, and so on. Each user only has the computer's use for a fraction of the time, but the task switching is so rapid that most users are not aware of it. Most of the tens of millions of computers in the world are stand-alone, single-user devices known variously as personal computers or workstations. For them, multitasking involves the same type of switching, but for a single user. This permits a user, for example, to have one file printed and another sorted while editing a third in a word-processing session. Such personal computers can also be linked together in a network, where each computer is connected to others, usually by wires or coaxial cables, permitting all to share resources such as printers, modems, and hard-disk storage devices.
Computer Programs and Programming Languages
Before a computer can be used to solve a given problem, it must first be programmed, that is, prepared for solving the problem by being given a set of instructions, or program. The various programs by which a computer controls aspects of its operations, such as those for translating data from one form to another, are known as software, as contrasted with hardware, which is the physical equipment comprising the installation. In most computers the moment-to-moment control of the machine resides in a special software program called an operating system, or supervisor. Other forms of software include assemblers and compilers for programming languages and applications for business and home use (see computer program). Software is of great importance; the usefulness of a highly sophisticated array of hardware can be severely compromised by the lack of adequate software.
Each instruction in the program may be a simple, single step, telling the computer to perform some arithmetic operation, to read the data from some given location in the memory, to compare two numbers, or to take some other action. The program is entered into the computer's memory exactly as if it were data, and on activation, the machine is directed to treat this material in the memory as instructions. Other data may then be read in and the computer can carry out the program to solve the particular problem.
Since computers are designed to operate with binary numbers, all data and instructions must be represented in this form; the machine language, in which the computer operates internally, consists of the various binary codes that define instructions together with the formats in which the instructions are written. Since it is time-consuming and tedious for a programmer to work in actual machine language, a programming language, or high-level language, designed for the programmer's convenience, is used for the writing of most programs. The computer is programmed to translate this high-level language into machine language and then solve the original problem for which the program was written. Certain high-level programming languages are universal, varying little from machine to machine.

No comments:

Post a Comment