Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Unit 2 Hardware Systems Goals: 1. Learn about how the computer processes information and how memory works. 2. Learn about how data can be moved among components inside and outside the system unit. 3. Learn about the different media for storing data. 4. Understand how a computer works. The microprocessor, also called the processor, is the main component that executes instructions stored in the main memory. The microprocessor is sometimes referred to as the "brain" of the computer system, making decisions and sending commands to the other components to complete a set of instructions. The main memory stores instructions to be executed by the microprocessor. The data stored in main memory is lost when the computer is turned off. In contrast to main memory, storage devices such as CD-ROM drives and floppy disk drives store data permanently even when the computer is turned off. Peripherals enable data input and output. Examples of peripheral devices include the monitor, the printer, the keyboard, and the mouse. The peripherals also include mechanisms that allow data to be transferred in and out of a computer system. The chipset acts as the traffic cop controlling the flow of data and coordinating interactions among components in the system. Components pass data through the chipset, and the chipset monitors the data flow and passes data to other components. A. Motherboard: Provides sockets for microprocessor and memory chips, slots for circuit boards, and the circuitry that enable electrical signals to travel from component to component. Most of the hardware components inside the system unit are attached to the motherboard. B. Power supply: Provides electrical power to the computer system. C. Microprocessor: Processes instructions stored in main memory. Sometimes, the microprocessor is found underneath a cooling fan to prevent it from overheating. D. Expansion slot: Serves as a socket on the motherboard into which an expansion card maybe inserted. E. Expansion card: Enables a computer to control peripheral devices such as the monitor and the microphone. F. Chipset: Controls data flow among components. G. IDE (Integrated Drive Electronics) cable: Transfers data from storage devices to the motherboard. H. Disk drives: Stores data permanently (even after the computer is turned off). They include the floppy disk drive, the CD-ROM (compact disk read-only-memory) drive, and the hard disk drive. 2.1 Processor and Memory 2.1.1 Processor Basics Learning Goal: Obtain general knowledge of how a microprocessor works in a computer and become familiar with different types of microprocessors. Gain more knowledge about microprocessor performance and about tools called "benchmarks" that are used to compare the performance of different microprocessors. Processor A computer's processor is usually referred to as the microprocessor due to its size, which is about the size of your fingernail. A microprocessor processes all the instructions given to the computer (for example, add two numbers, execute program instructions, or print documents). Physically, the microprocessor is a single chip known as an integrated circuit (IC). Each chip is made out of silicon and it contains millions of transistors packed onto a chip. The Intel Pentium M Processor, introduced on March 12, 2003, has 77 million transistors, and the width of the smallest wire on the chip is 0.13 micron, or 0.00000013 meter. As a reference, 0.13 micron is about 1/800 of the width of a human hair. The microprocessor is referred to as the Central Processing Unit (CPU). The job of a microprocessor is to execute a series of machine instructions. These instructions are procedures to carry out a task written in a form that the computer can understand. Instruction Execution with the CPU Instructions are stored in the computer's memory, RAM (random access memory). There are two main components of the CPU. One is the control unit, which accesses instructions stored in RAM, interprets what they mean, and then dispatches them. The other is the Arithmetic/Logic Unit (ALU) that performs arithmetic (i.e. addition, subtraction, multiplication, division) and logic (i.e. greater than, less than, equal to) operations needed to process the instructions. There are four steps that the CPU performs when executing an instruction; they are called the fetch-execute cycle. The four steps are as follows: 1. Fetch- The control unit gets the instruction from memory. 2. Interpret- The control unit decodes what the instruction means and directs the necessary data to be moved from memory to the ALU. 3. Execute- The control unit directs the ALU to perform the necessary arithmetic or logic operations. 4. Store- The result of the computation is stored in memory. The diagram below illustrates the steps taken by the CPU to execute an instruction that adds two numbers. The instruction is: Let R = X + Y. Another component of the microprocessor is the cache, a special high-speed memory that stores most recently used data in order to speed up the process of instruction execution. Performance: Factors and Measures The rate at which instructions are processed is controlled by an internal clock, also known as the system clock. The internal clock sends pulses at a fixed rate to synchronize all computer operations. The unit of measure for cycles per second is the hertz (Hz). Computer clock cycles are closely related to the execution of instructions. So, a 3 GHz Pentium 4 machine can execute more instructions per second than a 2 GHz Pentium 4 machine. Instructions can differ a great deal. Some complex instructions require a lot of cycles and take a comparatively long time to execute. Other instructions may be very simple and execute in very little time. Sometimes machines are compared on the number of instructions per second (IPS) rather than on raw clock speed. Another measure of computer performance is its bandwidth, the volume of data that can be transmitted within a fixed amount of time between components in a computer system (such as the transfer speed from the disk to the motherboard) or through connections to other computers. Bandwidth is expressed in bits per second (bps), or sometimes bytes per second (Bps) (recall that 8 bits equals 1 byte). Different machines, however, should be compared by executing a standard suite of instructions with execution times carefully measured and recorded. This is a more careful way to measure machine performance, and it is known as benchmarking. Types of Processors Intel is a well-known microprocessor vendor. Microprocessors produced by Intel became popular with the highly successful IBM Personal Computer (PC), introduced in 1981. Companies such as Advanced Micro Devices (AMD) now market processor chips that are compatible with the Pentium family. Another widely-used processor architecture is the PowerPC used in the Macintosh family of computers. The PowerPC was based on IBM's architecture and then modified by Motorola and Apple. Database servers storing large amounts of data are sometimes built around the SPARC family of processors developed by Sun Microsystems. On the smaller side, there are many specialized processor chip families created for embedded applications, such as automobiles or cellular phones. 2.1.2 Post-Course Reading Parsons/Oja, Section 2B Learning Goal: Knowledge of the central processing unit (also "CPU" or just "processor") and different types of computer memory Parsons/Oja, Tech Talk: "How a Microprocessor Executes Instructions" in Chapter 2 Learning Goal: Knowledge of how microprocessors work. This reading introduces a simple microprocessor architecture with an accumulator, some registers (R1 and R2), and some RAM (memory locations M1 through M7). The memory is used to store both program instructions and the data the program will operate on. 2.1.3 Types of Memory Learning Goal: Knowledge of different types of memory used in a computer Memory components include the main memory, also known as RAM, and the memory components needed to boot or start a computer, ROM and CMOS. RAM RAM (random access memory) is a temporary holding area for both data and instructions. It is also referred to as main memory. RAM stores data and instructions needed to execute programs. The data in RAM is lost when the computer is turned off. In contrast to accessing data serially, searching sequentially for the data to be retrieved, data in RAM can be accessed directly via its address. Therefore, RAM stands for "random access memory." Random access is similar to accessing a song on a CD directly via its track number, as opposed to finding a song serially on tape. RAM is measured by its memory capacity and latency. Two major categories of RAM called DRAM and SRAM are discussed below. DRAM - Dynamic RAM is a common type of RAM. It is made of an integrated circuit (IC), composed of millions of transistors and capacitors. A capacitor can hold electrons, just as a cup can hold water. An empty capacitor represents a zero, and a non-empty capacitor represents a one. The transistor is like a switch that controls whether the capacitor's state (charged or not charged, 1 or 0) is to be read or changed. Changing the state of a capacitor is like writing new data to a memory cell. However, a capacitor is like a cup that leaks, in order to keep its charge, the memory control needs to be recharged or refreshed periodically. Therefore, it is called the dynamic RAM because its state is not constant. Refreshing capacitors also takes time and slows down memory. SRAM - Static RAM is a type of RAM that uses transistors to store data. Because SRAM does not use capacitors, reading data from SRAM does not require recharging the capacitors. Therefore, it is faster than DRAM. But, because it consists of more electronic parts, it holds fewer bits and costs more compared to DRAM of the same size. SRAM is appropriate for use in the cache because it is fast and cache does not require a large memory capacity. ROM Read-only memory (ROM) is programmed with data hard-wired when it is manufactured. Data and instructions on a ROM are permanent, or nonvolatile. Why is ROM needed when RAM enables all the memory operations necessary for a computer? Because data in RAM is lost when the computer is turned off, some instructions are needed for the CPU to start or boot the computer when the computer is first turned on. Currently, a type of ROM, electrically erasable programmable read-only memory (EEPROM), can be updated by applying an electrical field changing instructions stored on the chip one byte at a time. An alternative to EEPROM is flash memory. Flash memory is a type of EEPROM that rewrites data in chunks, usually 512 bytes in size, instead of 1 bit at a time. CMOS Memory Configuration settings of a computer such as storage capacity, memory capacity (RAM), and display configurations also need to be stored permanently. This information is stored in CMOS (complementary metal oxide semiconductor) memory. The CMOS chip requires very little electrical power to hold data. It can be powered by a small battery on the motherboard, or packaged with the chip. 2.2 Peripherals 2.2.1 Connecting Peripherals Learning Goal: Knowledge of how components such as expansion slots, expansion cards, and types of connectors and ports used to transfer data between peripherals and the computer system An expansion slot is a slit-like socket on the motherboard into which a circuit board can be inserted. The circuit board is called the expansion card; it is used to extend the capability of a computer. Examples of an expansion card include the sound card and the video card. An expansion card also provides port(s), which are connector(s) between the expansion card and the peripheral device. See the diagram below for how peripheral devices and their connectors attach to other components in a computer. Expansion Slots and Cards An expansion slot is a socket on the motherboard where expansion cards can be plugged into. An expansion card, also referred to as "expansion boards," "controller cards," or "adapters," is a small circuit board that enhances the functionality of a computer by enabling a computer to control storage devices, input devices, or output devices. Examples of expansion cards include graphics cards (or video cards) and sound cards. The image below shows an expansion card being inserted into an expansion slot. The two most common types of expansion slots are Peripheral Component Interconnect (PCI) and Accelerated Graphics Port (AGP). A PCI slot can hold a variety of expansion cards such as a sound card or an Ethernet card (discussed later in this section).An AGP slot is primarily used for graphics cards (see discussion on graphics cards below). In laptops, a PCMCIA (personal computer memory card international association) slot, which is relatively smaller than a PCI slot, fulfills the role of a PCI slot. Typically, a notebook computer is equipped with PCMCIA slots for expansion cards also called CardBus cards or PC cards. Some commonly used expansion cards are: Graphics card- transforms images into analog data that we perceive as light when displayed on the computer monitor. Sound card- allows a computer to play sounds such as music from CDs, sound files, games, or DVDs. It can also record sounds from a microphone, cassette player, or CD player. Modem- one type of modem is the dial-up modem, which enables a computer to exchange information with a remote computer through ordinary telephone lines. Ethernet card- serves as the interface to a Local Area Network (LAN) at a rate of 10 Mb/s, 100 Mb/s or 1 Gb/s (1000 Mb/s). Ports An expansion card usually includes ports, which are connectors that enable signals to be passed in and out of a computer or peripheral device to exploit the functionality of the expansion card. The image below shows the ports on the back of a computer. USB and FireWire Universal Serial Bus (USB) ports now appear on desktop systems and laptops. Up to 127 devices can be connected to the system unit via a USB hub, which provides multiple USB ports. These devices include mouse, keyboard, scanner, printer, digital camera, and hard disk drive. One of the most convenient features of a USB port is its support for "hot connectivity," which allows peripherals to be connected to the system, configured, and used without restarting the machine. Compared to USB, FireWire has a faster data transfer rate, and it supports up to 63 devices. It also supports "hot connectivity." However, it is relatively more expensive than USB. Comparing Different Ports Below is a chart listing the relative price, usage, and status of ports. The ports are listed from fastest to slowest data transfer rate. Port Usage Status FireWire Camcorder and external mass storage (e.g. CD-ROM, hard drive, etc.) Becoming the standard for digital video devices USB Most devices Becoming the standard for most peripheral devices Parallel Printer Becoming obsolete Serial Modem Becoming obsolete PS/2 Keyboard, mouse Becoming obsolete 2.2.2 Post-Course Reading Parsons/Oja, 5th and 6th editions: Subsection "Expansion Slots, Cards, and Ports" or 7th edition: Section 2D Learning Goal: More in-depth knowledge of expansion slots, cards, and ports in a computer system 2.2.3 Buses Learning Goal: Familiarity with types of bus standards used to transfer data within a computer Information transfers to and from the CPU go through some type of bus. The illustration below indicates how the physical bus lines are connected to components inside a system unit. A bus is a pathway through which data is transferred from one part of a computer to another. It consists of the data bus and the address bus. Every bus has a width, a speed, and a transfer rate. The tables below lists various buses named according to the device that the data passes through. Bus Type Front side RDRAM DRAM PCI AGP Width (in bits) 64 16 64 32-64 32 Speed (MHz) 66-200 533 66-200 33-66 66-528 X-pumped 1-4 2 1-2 N/A N/A Y-channeled N/A 1-2 N/A N/A Distance from chipset <0.1m <0.1m <1m <1m Peak transfer rate 528MBps6.4GBps 2.1-4.3 GBps 132-528 MBps 264MBps -2.1GBps 528MBps-6.4 GBps) Bus Type IDE USB FireWire Width (in bits) 8 1 1 Speed (MHz) 33-133 variable variable X-pumped N/A N/A N/A Y-channeled 1-2 N/A N/A Distance from chipset <1m <10m <10m Peak transfer rate (MBps) 33-266MBps 1.5-60 50-100 2.2.4 Input/Output Devices Learning Goal: Knowledge of various types of input and output devices Input Devices 1. Cameras 2. Digital Camcorders 3. Scanners Output Devices: Monitors and Projectors 1. CRT Monitors 2. LCD Monitors 3. Projectors Output Devices: Printers 1. Ink Printers 2. Dye-Sublimation Printers 3. Laser Printers 2.2.5 Post-Course Reading Parsons/Oja, Subsections "Installing Peripheral Devices," "Display Devices," and "Printers" in Section 2D Learning Goal: Knowledge of the different types of printers and monitors available Parsons/Oja, Sections 7A-D Learning Goal: Knowledge of how visual and audio digital equipments work Optional: 7th edition: Parsons/Oja, Computers in Context: "Astronomy" in Chapter 12 2.3 Storage Devices 2.3.1 Pre-Course Reading Parsons/Oja, Section 2C Learning Goal: Knowledge of the variety of storage media, magnetic and optical, used by modern computers 2.3.2 Disk Controller Interfaces Learning Goal: Knowledge of the IDE (Integrated Drive Electronics) interface used for connecting disks to PC-based computer systems (The disk controller is responsible for the physical operation of the drive mechanism and the transfer of bytes between the drive and main memory) We have discussed Universal Serial Bus (USB) and FireWire. An IDE (Integrated Drive Electronics) is the interface that enables data to transfer between storage devices and the chipset. IDE is designed specifically as disk interface whereas USB and FireWire can interface with other devices besides storage devices such as digital cameras and printers. Below is a diagram illustrating the disk controller, the IDE interface, and the storage devices with respect to other components in a computer system. Note that the functionality of the disk controller is often integrated into the chipset. 2.3.3 Mass Storage Learning Goal: Knowledge of numbering systems used to represent data in computing How Mass Storage Devices Differ from RAM Mass storage devices (magnetic disks, optical disks, and magnetic tape) have slow access times and low transfer rates. But, mass storage technologies also have several important advantages: 1. They are nonvolatile—meaning that information is not lost when power is turned off. 2. They have huge capacities, measured in billions or even trillions of bytes. 3. Their cost per bit stored is far lower than RAM. 4. In some cases, they use removable media that can be popped into a drive, used as needed, and then taken out of the drive, or mailed to a friend. Disk Drive Reliability The read/write head is very, very close to the disk surface. If a head encounters a dust particle sitting on the surface of a disk while the disk is spinning at several thousand rpm, the head will crash into the disk, damaging itself and the magnetic coating on the disk. A common specification for disk drive reliability is mean time between failures (MTBF). Typically, disk drives for PCs have MTBF ratings of about 500,000 hours, 57 years. However, MTBF is a theoretical estimate. The MTBF rating should be used in conjunction with service life. Service life is the amount of time before failures occur due to increased wear and tear of the component devices. Optical Media: CDs versus DVDs Data in an optical media is read and written using laser beams. Compact discs (CDs) and digital video discs (DVDs) are optical disks. A DVD is an enhanced form of a CD. The two types of disks are physically the same size, but they differ in format. DVDs offer much greater capacity, which they achieve in two ways. First, DVDs have narrower tracks, so they can squeeze more tracks onto the same size disk. The second way that DVDs achieve increased capacity over CDs is by using multiple layers of tracks. Magnetic Media Magnetic media range from some of the smallest capacity storage devices, floppy disks, to the largest capacity devices, hard disk drives. Smaller portable drives are being manufactured with larger capacities. For example, Iomega's Mini USB storage device offers 64MB, 128MB, or 256MB of storage capacity on a storage device the size of a car key. Another portable storage device offered by Iomega is the pocket-size HDD Desktop external hard drive. It is available in 40GB, 80GB, or 120GB of storage capacity. Both devices can be connected to a USB or FireWire port. Fixed (non-removable) hard disk drives are still the main storage medium for computers today. They can hold more data than any of the removable media types, optical or magnetic. On most personal machines, the operating system, application programs, and user data all reside on one hard drive. Hard drives run from 20 GB up to around 300 GB, with the limit continuing steadily upward each year. Another important characteristic when comparing hard disk drives is the speed at which a disk drive rotates. Slower drives spin at 4200 rpm (i.e. laptop computers); faster ones, at 15,000 rpm. Optical versus Magnetic Optical media are more durable. They are not ruined by dust or moisture, nor are they vulnerable to electrical damage (however, they can be damaged by physical damages such as scratches). Optical media's MTBF rating (average life expectancy) ranges between 30 and 300 years, while magnetic media utilize magnetic properties that have a MTBF of about 3–7 years. Optical media are also less expensive per MB than magnetic disks. On the other hand, magnetic disks, with the exception of floppy disks, can be written and read faster than optical disks. Finally, most hard disk drives offer greater capacity than any currently available optical device. Solid State A popular type of portable storage for small devices is flash memory. Examples of flash-memory storage devices are CompactFlash and SmartMedia cards. Comparing Storages Name Type Capacity Writability High-density floppy disk Magnetic 1.44 MB Unlimited SmartMedia card Solid state 2 - 256 MB Many CompactFlash card Solid state 4 MB - 4 GB Many Super floppy Magnetic 120 or 240 MB Unlimited USB storage device Solid state 64, 128, 256 MB, or more Many CompactFlash form factor—Microdrive Magnetic 340 MB, 1 GB, 4 GB Unlimited Iomega Zip disk Magnetic 100, 250, or 750 MB Unlimited CD-ROM Optical 650 or 700 MB Read only CD-R Optical 650 or 700 MB Write once CD-RW Optical 650 or 700 MB Many Iomega Jaz disk Magnetic 1 or 2 GB Unlimited DVD-R Optical 4.7 GB Write once DVD-RW Optical 4.7 GB Many DVD-ROM (SLSS) Optical 4.7 GB Read only DVD-ROM (DLSS or SLDS) Optical 9.4 GB Read only DVD-ROM (DLDS) Optical 18.8 GB Read only Hard disk drive Magnetic 20 GB and up Unlimited HDD Desktop external hard drive Magnetic 20, 30, 40 GB, or more Unlimited 2.4 Putting Together the Hardware Components 2.4.1 How Components Work Together Learning Goal: Knowledge of how components introduced in this unit work with one another to enable a computer to function The CPU executes instructions stored in memory devices. When the computer is being booted, the CPU fetches instructions from the permanent memory devices, ROM and CMOS. ROM is read-only memory that stores instructions needed to start up the computer. CMOS contains system configuration data. Once the computer is booted, RAM is used to load the rest of the instructions to be executed by the CPU. Data in RAM is temporary and will be lost when the computer is turned off. Data from storage devices such as the CD-ROM drive and the hard drive are passed through the disk controller. Data can also be stored on hard disk or CD. Data in the hardware system passes through buses. The buses are the communication channels among components in the system unit. Peripheral devices such as the keyboard, mouse, joystick, printer, speakers, microphone, etc. are connected to the computer via ports typically in the back of a system unit. Graphics cards or sound cards are also examples of expansion cards that can be plugged into the expansion slot of the computer to extend or enhance the functionality of a computer. When a computer processes requests from the user, the CPU directs the other components to carry out specific tasks, and data is passed among components through buses and the chipset. Use the diagram above as you follow through how data is transferred from component to component in the sample scenarios provided below: To save a file to hard disk, the CPU would pass the data to be saved through the front bus to the chipset. The chipset sends the file data via the PCI bus to the disk controller, which would then send the data to the hard disk storage device. To open and display an image file, the CPU would signal the disk controller to fetch the image file on the storage device and store it in RAM. The graphics card would then access the image data and display the image as pixels on the computer monitor. These are generalizations for how components interact. When trying to understand a hardware system, keep in mind the general concepts of how components work together, and investigate the specifications of components to gain more precise understanding of how a given hardware system works. The exact nature of how each component works and interacts with other components is beyond the scope of this course. 2.4.2 Lab: Researching a Computer System Learning Goal: Knowledge of how to use the Web to research a specific type of computer system by searching for product reviews 1. Go to the Ziff Davis Web site (www.zdnet.com), and click "Reviews." Then click "Notebooks" and select a notebook machine that looks interesting. Next, click the machine's link to call up the review overview. 2. Now click the "Review" tab to read a detailed discussion of the product. Click "Latest Prices" to see pricing and availability information. 3. Ziff-Davis also publishes the magazine Computer Shopper and its companion Web site www.zdnet.com/computershopper. 4. You can also find product reviews and pricing info at the CNET Web site www.cnet.com. 2.4.3 Lab: Online Configuration Learning Goal: Knowledge of how to use the Web to research and price the computer configurations you are considering purchasing 1. Visit the site of a computer vendor. Assume that you have a budget of $1,200 and put together the specification for a computer that is appropriate for a college student studying Computer Science. 2. Now assume you're buying a notebook computer for a businessperson who is a frequent airline traveler and is concerned about weight and battery life. What can you get for $2,500? 2.5 Improving Computer Performance 2.5.1 Moore's Law Learning Goal: Knowledge of the basis for the exponential growth in the computer's memory storage and computational abilities Gordon Moore, one of the founders of Intel, observed that in 1965, microchip capacity (the number of transistors contained within a silicon wafer) had doubled every year. This trend in computing has become known as Moore's Law. The law might be stated this way: the number of transistors that can be put on a microchip will double every 12-18 months, until physical limitations are reached. Below is a graph illustrating the exponential increase in the number of transistors on processors introduced over the years. Below is the log scaled graph to provide you with a different perspective of the exponential growth of transistors on a microchip. With the exponential growth of transistor density on microchips, many inferences can be made that allow analysts to predict other developments in the computer industry. Extending the scope of Moore's Law, the following predictions can be made: 1. Processing power (speed) doubles every 12-18 months. 2. Storage capacity of RAM doubles every 12-18 months. Other observations are that storage capacity of hard disk drives is also increasing exponentially, and the cost for consumers to purchase computer parts is decreasing over time. Despite the growth in processing speed and storage capacity, the cost per byte of data processed or stored decreases as lower-capacity memory chips become out-dated. 2.5.2 Bottlenecks Learning Goal: An understanding of performance bottlenecks and how to correct them Bottlenecks—Slowing a Process A bottleneck is a step that takes a long time to complete, and thus reduces overall performance. It does not pay to get a tremendously fast processor, if the memory is slow in letting information flow in and out. In just the same way, a slow disk will impede overall system performance. If other parts of your computer are too slow, buying a faster processor may not speed things up at all! Typical Bottlenecks The following are some areas of the hardware system that may contain a bottleneck: 1. Cache 2. RAM 3. I/O 4. Video card (particularly for 3-D gaming) Eliminating Bottlenecks Can we speed up a computer? Actually it isn't usually the computer that you want to speed up, but the tasks it performs. This is an important distinction. Speeding up the computer suggests buying a faster processor, installing faster memory, getting a faster bus, or installing faster disk drives and video controllers. Improving your hardware for the purpose of speeding up your system will work, if you keep the system uniformly balanced. The key to making effective improvements is to understand why certain tasks take so long. Often, you can do some simple experiments to see whether or not a certain item is the bottleneck. This idea is applied in a very straightforward way by software developers, who use profiling tools to measure how long various sections of their programs take. That way they can identify the bottlenecks and most time-consuming steps, and focus their attention on improving those portions of the code. 2.5.3 Post-Course Reading Parsons/Oja, Tech Talk: "Data Compression" in Chapter 7 Learning Goal: An understanding of how data compression can be used 1) to reduce the amount of space required to store files and 2) to improve throughput by reducing the number of bytes that must be transmitted