
1 computer systems This book is about writing well-designed software. To understand software, we must first have a fundamental understanding of its role in a computer system. Hardware and software cooperate in a chapter computer system to accomplish objectives complex tasks. The nature of ◗ Describe the relationship between that cooperation and the purpose hardware and software. of various hardware components ◗ Define various types of software are important prerequisites to and how they are used. the study of software develop- ◗ Identify the core hardware compo- ment. Furthermore, computer nents of a computer and explain their purposes. networks have revolutionized the manner in which computers are ◗ Explain how the hardware compo- nents interact to execute programs used, and they now play a key and manage data. role in even basic software ◗ Describe how computers are con- development. This chapter nected together into networks to share information. explores a broad range of com- puting issues, laying the founda- ◗ Explain the impact and significance of the Internet and the World Wide tion for the study of software Web. development. ◗ Introduce the Java programming language. ◗ Describe the steps involved in pro- gram compilation and execution. ◗ Introduce graphics and their repre- sentations. 2 CHAPTER 1 computer systems 1.0 introduction We begin our exploration of computer systems with an overview of computer processing, defining some fundamental terminology and showing how the key pieces of a computer system interact. basic computer processing A computer system is made up of hardware and software. The hardware compo- nents of a computer system are the physical, tangible pieces that support the com- puting effort. They include chips, boxes, wires, keyboards, speakers, disks, cables, plugs, printers, mice, monitors, and so on. If you can physically A computer system consists of touch it and it can be considered part of a computer system, then it is hardware and software that key computer hardware. concept work in concert to help us solve problems. The hardware components of a computer are essentially useless without instructions to tell them what to do. A program is a series of instructions that the hardware executes one after another. Software consists of programs and the data those programs use. Software is the intangible counterpart to the physical hardware components. Together they form a tool that we can use to solve problems. The key hardware components in a computer system are: ◗ central processing unit (CPU) ◗ input/output (I/O) devices ◗ main memory ◗ secondary memory devices Each of these hardware components is described in detail in the next section. For now, let’s simply examine their basic roles. The central processing unit (CPU) is the device that executes the individual commands of a program. Input/output (I/O) devices, such as the keyboard, mouse, and monitor, allow a human being to interact with the computer. Programs and data are held in storage devices called memory, which fall into two categories: main memory and secondary memory. Main memory is the stor- age device that holds the software while it is being processed by the CPU. Secondary memory devices store software in a relatively permanent manner. The most important secondary memory device of a typical computer system is the hard disk that resides inside the main computer box. A floppy disk is similar to a hard disk, but it cannot store nearly as much information as a hard disk. Floppy 1.0 introduction 3 disks have the advantage of portability; they can be removed temporarily or moved from computer to computer as needed. Other portable secondary memory devices include zip disks and compact discs (CDs). Figure 1.1 shows how information moves among the basic hardware compo- nents of a computer. Suppose you have an executable program you wish to run. The program is stored on some secondary memory device, such as a hard disk.When you instruct the computer to execute your program, a copy of the program is brought in from secondary memory and stored in concept To execute a program, the key main memory. The CPU reads the individual program instructions computer first copies the pro- from main memory. The CPU then executes the instructions one at a gram from secondary memory time until the program ends. The data that the instructions use, such to main memory. The CPU then reads the program as two numbers that will be added together, are also stored in main instructions from main mem- memory. They are either brought in from secondary memory or read ory, executing them one at a from an input device such as the keyboard. During execution, the pro- time until the program ends. gram may display information to an output device such as a monitor. The process of executing a program is fundamental to the operation of a com- puter. All computer systems basically work in the same way. software categories Software can be classified into many categories using various criteria. At this point we will simply differentiate between system programs and application programs. The operating system is the core software of a computer. It performs two important functions. First, it provides a user interface that allows the user to Hard disk Keyboard Main CPU memory Floppy disk Monitor figure 1.1 A simplified view of a computer system 4 CHAPTER 1 computer systems interact with the machine. Second, the operating system manages The operating system provides a user interface and manages computer resources such as the CPU and main memory. It determines key concept computer resources. when programs are allowed to run, where they are loaded into mem- ory, and how hardware devices communicate. It is the operating sys- tem’s job to make the computer easy to use and to ensure that it runs efficiently. Several popular operating systems are in use today. Windows 98, Windows NT, Windows 2000, and Windows XP are several versions of the operating sys- tem developed by Microsoft for personal computers. Various versions of the Unix operating system are also quite popular, especially in larger computer systems. A version of Unix called Linux was developed as an open source project, which means that many people contributed to its development and its code is freely available. Because of that, Linux has become a particular favorite among some users. Mac OS is the operating system used for computing systems developed by Apple Computers. An application is a generic term for just about any software other than the operating system. Word processors, missile control systems, database managers, Web browsers, and games can all be considered application programs. Each application program has its own user interface that allows the user to interact with that particular program. The user interface for most modern operating systems and applications is a graphical user interface (GUI), which, as the name implies, make use of graphical screen elements. These elements include: ◗ windows, which are used to separate the screen into distinct work areas ◗ icons, which are small images that represent computer resources, such as a file ◗ pull-down menus, which provide the user with lists of options ◗ scroll bars, which allow the user to move up and down in a particular window ◗ buttons, which can be “pushed” with a mouse click to indicate a user selection The mouse is the primary input device used with GUIs; thus, GUIs are some- times called point-and-click interfaces. The screen shot in Fig. 1.2 shows an example of a GUI. The interface to an application or operating system is an important part of the software because it is the only part of the program with which the user directly interacts. To the user, the interface is the program. Chapter 9 discusses the cre- ation of graphical user interfaces. 1.0 introduction 5 figure 1.2 An example of a graphical user interface (GUI) (Palm Desktop™ courtesy of 3COM Corporation) concept The focus of this book is the development of high-quality applica- As far as the user is con- key tion programs. We explore how to design and write software that will cerned, the interface is the perform calculations, make decisions, and control graphics. We use the program. Java programming language throughout the text to demonstrate vari- ous computing concepts. digital computers Two fundamental techniques are used to store and manage information: analog and digital. Analog information is continuous, in direct proportion to the source of the information. For example, a mercury thermometer is an analog device for measuring temperature. The mercury rises in a tube in direct proportion to the temperature outside the tube. Another example of analog information is an elec- tronic signal used to represent the vibrations of a sound wave. The signal’s volt- age varies in direct proportion to the original sound wave. A stereo amplifier sends this kind of electronic signal to its speakers, which vibrate to reproduce the sound. We use the term analog because the signal is directly analogous to the information it represents. Figure 1.3 graphically depicts a sound wave captured by a microphone and represented as an electronic signal. 6 CHAPTER 1 computer systems Sound wave Analog signal of the sound wave figure 1.3 A sound wave and an electronic analog signal that represents the wave Digital technology breaks information into discrete pieces and represents those pieces as numbers. The music on a compact disc is stored digitally, as a series of numbers. Each number represents the voltage level of one specific instance of the recording. Many of these measurements are taken in a short period of time, per- haps 40,000 measurements every second. The number of measurements per sec- ond is called the sampling rate. If samples are taken often enough, the discrete voltage measurements can be used to generate a continuous analog signal that is “close enough” to the original.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages904 Page
-
File Size-