Unit 2. Hardware Systems This unit covers computer hardware the components that make up a computer system and how they work together. learn about –how the computer processes information and how memory works. –how data can be moved among components inside and outside the system unit. –familiar with different media for storing data. By the end of this unit, you should –understand how a computer works. –also help you become an informed consumer of computer equipment.
contents 2.1 Processor and Memory 2.2 Peripherals 2.3 Storage devices 2.4 Putting Together the Hardware Components 2.5 Improving Computer performance Assessments: –Exercise 2
Overview of Hardware Components Microprocessor (executes instructions) Chipset (controls data flow) Main Memory (temporarily stores data and program instructions while the computer is running) Peripherals (input/output) Data Path Components Legend Storage Devices (permanently store data and application programs)
Hardware Components 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, floppy disk drives, hard disk,U-disk –store data permanently even when the computer is turned off.
Hardware Components Peripherals( ) enable data input and output. –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.
How a File is Displayed 1. The microprocessor sends instructions to the storage devices (via the chipset) requesting the specified file to be loaded into main memory. 2. The storage devices send the file through the chipset to main memory. Microprocessor (executes instructions) Storage Devices (permanently store data and application programs) Main Memory (temporarily stores data and program instructions while the computer is running) Peripherals (input/output) Data Path Components Legend Chipset 3.The microprocessor fetches the file contents from main memory. 4.The microprocessor sends the display data to the monitor via the chipset.
Components inside the System Unit B. Power supply E. Expansion card C. Microprocessor (underneath a cooling fan) D. Expansion slot G. IDE cable F. Chipset H. Disk drives A. Motherboard
Components inside a computer 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.
Components inside a computer 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 may be any drives such as floppy disk drive, the CD- ROM/CD-RW, DVD-ROM/DVD+/-RW drive, and the hard disk drive.
2.1 Processor and Memory Processor Basics Types of Memory Lab: Benchmarking (Optional) Assessments: –Multiple-Choice Quiz 4
overview The processor and memory are essential components that enable a computer to process commands. –The processor carries out instructions given to the computer. –These instructions are stored in the computer's memory.
2.1.1 Processor Basics Processor Instruction Execution with the CPU Performance: Factors and Measures Types of Processors
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 (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 micron( ), or meter. –0.045 micron is about 1/2400 of the width of a human hair.
Central Processing Unit (CPU). 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 computers memory, RAM (random access memory ) There are two main components of the CPU. –control unit, which accesses instructions stored in RAM, interprets what they mean, and then dispatches them. –Arithmetic/Logic Unit (ALU) that performs arithmetic (addition, subtraction, multiplication, division) and logic (greater than, less than, equal to) operations needed to process the instructions.
Fetch-Execute Cycle( ) 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.
Fetch-Execute Cycle Memory Result R Number 2 (Y) Number 1 (X) Let R = X + Y ALU Register 1 (contains Number 1) Register 2 (contains Number 2) Accumulator (Result of Number 1 + Number 2) Step 1. Control unit fetches instruction Step 2. Control unit interprets the instruction and sends the 2 numbers to be added into the appropriate registers in the ALU. Control Unit Step 4. Result is stored back in memory. Step 3. Control unit executes the instruction by directing the ALU to add the 2 numbers in the registers 1 and 2 then store the result in the accumulator.
cache Cache Cache –a special high-speed memory that stores most recently used data in order to speed up the process of instruction execution. A cache can speed up data retrieval because –recently used data is likely to be used again by the computer. –recently used data is likely to be used again by the computer.
Level 1/2 cache memory Level 1 (L1) cache memory or primary cache –is located on the CPU to provide the CPU with the fastest access to data. Level 2 (L2) cache memory or secondary cache –is a slower cache, –located between the RAM and the CPU (sometimes on the CPU). If data cannot be found on either cache, it will be retrieved from RAM. Relative to the physical distance between the CPU and storage areas for data and instructions, data is retrieved more quickly –from the L1 cache, –then the L2 cache, and –then the RAM.
The Microprocessor Chipset (controls data flow) Main Memory (temporarily stores data and program instructions while the computer is running) Peripherals (input/output) Data Path Components Legend Storage Devices (permanently store data and application programs) CPU (ALU, Registers, Control unit) L1 cache L2 cache (usually on CPU) Microprocessor
Processor Performance Rate at which the instructions are processed (clock rate) –Measured in Hertz –1 Hertz - one cycle per second –Processor clock rate measured in MHz Machines are compared based on their –clock speed or –number of instructions per second (IPS). This measure depends on –both the number of cycles per second –and the mix of instructions executed. Measure of processor performance is benchmarking.( ) –ZDNet is organization which has a set of useful benchmarks( )
Bandwidth( ) the volume of data that can be transmitted within a fixed amount of time between components in a computer system –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)
2.1.2 Types of Memory RAMROM CMOS Memory Summary
Types of Memory( ) Chipset (controls data flow) Microprocessor (executes instructions) Storage Devices (permanently store data and application programs) Peripherals (input/output) Data Path Components Legend RAM (instructions to be executed after computer is booted) ROM (instructions needed to boot the computer) CMOS (Configuration information used in the boot process) Main Memory Boot Memory Memory
Types of Memory (continued) RAM (Random Access Memory, ) is a temporary holding area for both data and instructions. It is also referred to as main memory. Data in RAM is lost when the computer is turned off.
Types of Memory (continued) Measured by its memory capacity and latency. –Capacity –Capacity is the maximum number of bits or bytes that can be stored. The capacity of RAM is typically measured in megabytes (MB). Many computers have RAM capacity of 128MB or more. –Latency ( ) is the delay between the time when the memory device receives an address and the time when the first bit of data is available from the memory device. This delay is also referred to as access time. Latency is typically measured in nanoseconds (ns), billionth of a second (10 -9 sec). Latency measures the speed of RAM.
DRAM (Dynamic RAM, RAM) a common type of RAM. –Made of an integrated circuit (IC, ), composed of millions of transistors( ) and capacitors( ). A capacitor can hold electrons. An empty capacitor represents a 0, and a non- empty capacitor represents a 1. Each capacitor can register either a 0 or a 1 for a memory cell, storing one bit of data. 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.
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. CPU must wait
DRAM (continued) SDRAM (Synchronous Dynamic RAM) –Used in many personal computers –Fast and relatively inexpensive –Synchronized to the clock so that data can be sent to the CPU at each tick of the clock, increasing the number of instructions the processor can execute within a given time
DRAM (continued) DDR SDRAM (Double Data Rate SDRAM) –Transfers twice the amount of data per clock cycle compared to SDRAM –Capacity is up to 2 GB –DDR3 2G 1333 –DDR3 2G 1333 –PC GB/S –PC GB/S
CPU CPU CPU ×N ×64 /8 P4 133MHz 533MHz 133MHz ×4 CPU 4.2GB/s 533MHz×8 CPU 266MHz FSB 2.1GB/s 333MHz FSB 2.7GB/s 400MHz FSB 3.2GB/s 533MHz FSB 4.2GB/s 800MHz FSB 6.4GB/s DDR MHz /8× × DDR266 64/8×2×133= GB/s DDR266 PC MB DDR MHz 2.7GB/s PC2700 DDR MHz 3.2GB/s PC3200 CPU CPU CPU ×N ×64 /8 P4 133MHz 533MHz 133MHz ×4 CPU 4.2GB/s 533MHz×8 CPU 266MHz FSB 2.1GB/s 333MHz FSB 2.7GB/s 400MHz FSB 3.2GB/s 533MHz FSB 4.2GB/s 800MHz FSB 6.4GB/s DDR MHz /8× × DDR266 64/8×2×133= GB/s DDR266 PC MB DDR MHz 2.7GB/s PC2700 DDR MHz 3.2GB/s PC3200
DRAM (continued) RDRAM (Rambus Dynamic RAM) –Higher bandwidth than SDRAM 1.6GB/s –Higher bandwidth than SDRAM 1.6GB/s –More expensive compared to SDRAM –Enhances the performance of applications that access large amounts of data through memory, i.e. real-time video and video editing
SRAM (Static RAM) 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. Because SRAM does not use capacitors, reading data from SRAM does not require recharging the capacitors. Therefore, it is faster than DRAM. Holds fewer bits and costs more compared to DRAM of the same size Used in the cache because it is fast and cache does not require a large memory capacity
RAM Comparisions Type of RAM CapacityPrice DDR SDRAM
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, which means they are not lost when power is turned off.
Why is ROM needed Why is ROM needed 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. –Therefore, ROM contains a set of instructions that is needed to start the computer. These instructions tell the computer how to access the hard disk, find the operating system, and load it into RAM. Then RAM stores all subsequent instructions to be executed by the CPU.
Type of ROM Typically, ROM is hardwired with start-up instructions for the computer. At one time, changing the boot instructions (to integrate a new video card and disable the old one) on a ROM required replacing the entire ROM chip. 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. –This could slow down the update process. 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. –The battery maintains the data on the CMOS when the computer is turned off.
Summary Which Memory Device to Use? Start Need to maintain data when power is off? Need to update information? Need to store configura- tion information? yes no yes no yes ROM EEPROM / Flash RAMCMOS
Comparing memory devices MemoryCostCapacityLatencyLocation Register$$$$8-128 bits almost instantaneous On CPU close to the ALU L1 Cache$$$1-100 KB~1 nsOn the CPU L2 Cache$$ KB~1 ns Between the L1 cache and the RAM DRAM$ MB~10 ns Outside the CPU on the motherboard
Processor and Memory Storage Devices (permanently store data and application programs) Peripherals (input/output) Data Path Components Legend Memory Chipset (controls data flow) CPU (ALU, Registers, Control unit) L1 cache L2 cache (usually on CPU) Microprocessor RAM (instructions to be executed when the computer is running) ROM (instructions needed to boot the computer) CMOS (Configuration information used during the boot process) Main Memory Boot Memory
2.2 Peripherals Connecting Peripherals Buses Input/Output Devices Assessments: –Multiple-Choice Quiz 5
2.2.1 Connecting Peripherals Expansion Slots and Cards Ports USB and FireWire Comparing Different Ports
Peripherals( ) Peripherals( ) Digital cameraCamcorder Parallel Mouse PS-2 video card AGP Slot Monitor Speaker sound card PCI Slots FireWire USB modem Modem Scanner Printer Peripherals Component Legend Port Expansion Card Expansion Slot Peripheral Device Bus Disk drive Memory Chipset Storage Devices (permanently store data and application programs) Main Memory (temporarily stores data and program instructions while the computer is running) Microprocessor (executes instructions)
Expansion Slot, Card, and Port 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. –Used to extend the capability of a computer –sound / video card –Also provides port(s), which are connector(s) between the expansion card and the peripheral device.
Expansion Slots The two most common types of expansion slots are Peripheral Component Interconnect (PCI) and Accelerated Graphics Port (AGP). PCI (Peripheral Component Interconnect, ) slot –Can hold a variety of expansion cards such as a sound card or an Ethernet card AGP (Accelerated Graphics Port, ) slot –Primarily used for graphics cards PCMCIA (personal computer memory card international association, ) slot –Used for laptops in place of PCI slots on desktop computers –Relatively smaller than a PCI slot
Expansion Cards Small circuit boards that control the peripheral devices –Graphics Cards Takes signals from the processor and displays the graphics, images in the monitor –Sound Cards Converts analog sound signals to digital and vice versa –Modem Transmits data over phone or cable lines –Ethernet card Serves as the interface to a Local Area Network (LAN), a common network technology allowing users access to network resources such as the Internet, , shared printers, etc. Transfers data at a rate of 10 Mb/s Newer versions of Ethernet called "Fast Ethernet" and "Gigabit Ethernet" support data rates of 100 Mb/s and 1 Gb/s (1000 Mb/s).
Ethernet cards for PCMCIA slot and PCI slot, respectively
Expansion Ports Ports are connectors that enable signals to be passed in and out of a computer or peripheral device. Cables from peripheral devices connect to ports of a computer system.
Different Types of Ports PS/2 port, also known as serial port –Transfers data one bit at a time –Uses a 6-pin, mini-DIN configuration, which look like a small, round port –Used to be the standard for keyboard and mouse connections, however, they are gradually being replaced by USB ports. DB-9 port –Also becoming obsolete ( ) –Used to connect PDA devices before the advent of USB ports –Connects external modem, barcode scanner, and other older electronic devices DB-25F, also known as Parallel port –Transfers data one byte at a time –Requires a 25-pin male connector (DB-25M) on the cable –Can be used for printers or external drives
USB and FireWire USB (Universal Serial Bus, ) port –Appears on desktop systems and laptops –Can connect up to 127 devices via a USB hub, which provides multiple USB ports (e.g. mouse, keyboard, scanner, printer, digital camera, and hard disk drive) –Supports "hot connectivity," which allows peripherals to be connected to the system, configured, and used without restarting the machine –Replacing serial and parallel ports FireWire –Faster data transfer rate and more expensive compared to USB (50MBps versus 1.5MBps) –Supports up to 63 devices –Intended for data-intensive devices such as DVD players and digital camcorders –Peripheral devices can be connected via chaining. –Supports hot connectivity
USB v.s. FireWire In response to FireWire's fast data transfer rate, USB-2 is developed with a data transfer rate of 60 MBps. To compete with USB, FireWire 2 is developed with a data transfer rate of 100 MBps.
Comparing Different Ports PortUsageStatus 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 ports ParallelPrinter Becoming obsolete SerialModem PS/2 Keyboard, mouse Becoming obsolete
2.2.2 Buses several ways to transfer information –To / from the CPU. While some information transfers are –completely internal to the CPU –between the CPU and RAM –between the CPU and peripheral devices Go through some type of bus. Go through some type of bus.
Buses ( ) Buses ( ) Digital cameraCamcorder Parallel PS-2 video card AGP Slot Monitor sound card PCI Slots FireWire USB modem Scanner Printer PCI Peripherals Component Legend Port Expansion Card Expansion Slot Peripheral Device Bus PCIPCI AGPAGP USBUSB FireWireFireWire FrontFront Disk drive Memory sideside Chipset Storage Devices (permanently store data and application programs) Main Memory (temporarily stores data and program instructions while the computer is running) Microprocessor (executes instructions) Mouse, keyboardSpeaker, microphone Phone line
Bus A bus is a pathway through which data is transferred from one part of a computer to another. Consists of the data bus and the address bus. –The data bus transfers the data itself, –while the address bus transfers information about where the data is to go. Has a width, a speed, and a transfer rate. –The width, also called the word size, of a bus is measured in bits. –The speed of a bus is measured in hertz (Hz), or cycles per second. –Transfer rate is the measure of how much data may be moved from one device to another in a second bps, bit per second. Transfer rate can be increased by transferring data multiple times during a cycle or increasing the number of channels used to transfer data.
Different Types of Buses Front Side bus –Bus on the motherboard that transfers data between the CPU and the chipset Memory Buses: RAM bus and DRAM bus –Usually transfers data multiple times during a clock cycle or uses multiple channels to transmit data to increase data transfer rate to match that of the CPU. ISA (Industry Standard Architecture) –Becoming obsolete –Word size or width of the data path is 16 bits, running at a mere 8 MHz
Different Types of Buses PCI (Peripheral Component Interconnect) –Predominant bus for newer systems –32 bits (standard), running at 33 MHzgiving PCI up to 133MBps of bandwidth AGP (Accelerated Graphics Port) –Bus architecture similar to that of PCI –Provides video cards with rapid access to the system memory –To date, only used for graphics cards, especially those that perform texture-mapping onto three- dimensional renderings –Very fast, running at 66 MHz with a 32-bit word size, and transferring 266 MBps IDE bus –Transfers data between storage devices and the chipset
Different Types of Buses (conti.) USB (Universal Serial Bus) / FireWire (IEEE 1394) –Transfer data one bit at a time at a variable pace –Not rated with a MHz speed; rated by peak transfer rate( ). –USB Faster than standard serial connections, with a peak transfer rate of 1.5 MBps. Considered a low-speed bus and is designed to handle low to medium-speed peripherals An extension to USB-1 is USB-2, which supports data rates up to 60 MBps versus the 1.5 MBps in USB-1; USB-2 is fully compatible with USB-1. –FireWire High transfer rate designed for high-speed external peripherals such as DVD-ROM and hard disk drives FireWire 2 (IEEE 1394b) emerged with data rates up to 100 MBps, double that of FireWire 1 (IEEE 1394).
2.2.3 Input/Output Devices Input Devices –Cameras –Digital Camcorders –Scanners Output Devices: Monitors and Projectors –CRT Monitors –LCD Monitors –Projectors Output Devices: Printers –Ink Printers –Dye-Sublimation Printers –Laser Printers –Comparing Printers
Input Devices Cameras –Digital Camera Enables photos taken to be stored in digital form, which can uploaded onto a computer. –Web Camera (webcam) Captures live video and sends the compressed image stream to the computer or to other computers via the Internet Digital Camcorders –Record video in digital form, which can be uploaded onto a computer without further loss in image quality –Recorded video can be edited using movie-editing software –Images are more clear than those captured by a webcam, but requires more bandwidth –Uses fireWire jack/interface to enable host computers to provide enough bandwidth for the camcorder Scanners –Convert a 2-D physical image (a photograph or a paper copy of an image) into a digital image that can be viewed and edited on your computer
Output Devices: Monitors and Projectors CRT (cathode ray tube) monitors –Used to be the most common type of computer monitors until LCD monitors began to gain popularity –Use three electron beams to create colors, red, green, and blue. To generate the color white, all three beams are fired simultaneously. To create the color black, all three beams are turned off. Other colors are created using different mixtures of these three color beams. –Inexpensive and dependable for displaying images on screen. –Also found in conventional TV sets. LCD (liquid crystal display) monitors –Produce images by manipulating light within a layer of liquid crystal cells –Also known as flat-panel screens –Also known as flat-panel screens –Compact, lightweight, easy-to-read, and emit less radiation compared to CRT monitors –Used in notebook computers and desktop computers
Projectors Projectors Enable images on the computer screen to be magnified and projected onto a bigger screen Use two types of technologies –LCD (liquid crystal display) system Images are projected as light shines through a layer of liquid crystal cells –DLP (digital light processing) system Uses tiny mirrors that reside on a special microchip called the Digital Micromirror Device (DMD) Images are smoother and have better contrast than those created using LCD
Printers Printers Ink Printers –Works by spraying and dyeing the page with color –Rated according to their resolution and color depth Color depth is the range of colors that any given drop may represent Resolution is measured in dpi, the number of dots per inch (horizontally or vertically) that a printer can place on a page. Sometimes the dpi is the same both horizontally and vertically, such as 1200 dpi. Other times, the horizontal and vertical dpi differas in1440x720 dpi. –Use a four-color process, CMYK (cyan, magenta, yellow, and black), to produce various colors. Sometimes the color black is excluded because it can be produced by mixing the other three colors. –Multiple drops of colors can also be placed on a single dot to produce more colors.
Printers (continued) Dye-Sublimation Printers ( ) –Used to print high-quality images like those at a photo lab –Use solid dyes consisting of the four colors, cyan, magenta, yellow, and black. –Varying mixtures of CMYK color dyes can be used to represent different colors, achieving photo-like quality –The print head heats and vaporizes the dyes to allow them to permeate the glossy surface of the printing paper before they solidify –The print head heats and vaporizes the dyes to allow them to permeate the glossy surface of the printing paper before they solidify Laser Printers –Use toner cartridges that contain toner, a colored powder –Uses laser beams to charge the image of the page onto a photoelectric drum –When the paper runs through the printer in between the drum and the toner cartridge, the electro-magnetic charge of the drum picks up the toner and then transfers it to the paper. A heat and pressure system then fuses the powder to the page.
dot matrix printer
Comparing Printers Printer Technology Price of Machine Price of Supplies (for example, ink and paper) Quality of Text Printouts Quality of Image Printout s SpeedTypical Usage Ink (black/white)$##***mediumHome Ink (color)$###*** slowHome Dye-Sublimation$$$$$####****** slow- medium Photo labs Laser (black/white)$$-$$$$#***** fast- very fast Small Office/ Home Office Laser (color) $$$- $$$$$ ##*** ** - *** medium- fast Office (for example, marketing department)
How to select a printer In general, you should select a printer based on your usage. For a home office, a laser printer will offer the lowest cost per page (cpp) of all printers, making them economical in the long run, but with a large up front cost for the equipment. But, if you will not be printing many pages at home, you might want to consider getting an ink- jet printer.
2.3 Storage Devices Disk Controller Interfaces Mass Storage Assessments: –Multiple-Choice Quiz 6
Whys? Why does a computer need to store files on a hard disk drive? Why not keep everything in RAM memory? There are two reasons. –RAM memory is volatile: the data is represented by electric charges and is lost when the power is turned off. A hard disk drive stores information as magnetized patches on the disk surface, so the data persists even when power is removed. –have a much larger capacity than RAM. A typical personal computer today will have at least 1024 megabytes of RAM memory and 300 gigabytes of disk storage. That disk capacity is more than 300 times what can fit in RAM! So, even though hard disk drives are slow as compared to RAM, they are an important component of your computer system.
2.3.1 Disk Controller Interfaces IDE Interface EIDE Master/Slave
common interfaces There are many common interfaces to connect a storage device to a computer. –Universal Serial Bus (USB) –FireWire. Another common interface is Integrated Drive Electronics (IDE ). –An IDE is the interface that enables data to transfer between storage devices and the chipset. –IDE is designed specifically as disk interface USB and FireWire can interface with other devices besides storage devices such as digital cameras and printers.
Disk Controller Interfaces Microprocessor (executes instructions) Main Memory (temporarily stores data and program instructions while the computer is running) Peripherals (input/output) Data Path Components Legend Storage Devices PCI DVD-ROM IDEIDE Hard drive CD-ROM Chipset (controls data flow) Bus Disk Controller
IDE Interface Provides a standard way for storage devices to connect to a computer The controller for the IDE is –usually integrated into the disk or CD-ROM drive, and –the controller directs how the hard drive stores and accesses data. IDE was created as a way to standardize( ) the use of hard drives in computers by combining the controller and the hard drive IDE was created as a way to standardize( ) the use of hard drives in computers by combining the controller and the hard drive –because having separate controllers and hard drives resulted in poor signal quality and performance.
IDE Interface In 1984, IBM introduced the AT computer with a hard drive had a combined drive and controller. –A ribbon cable from the drive/controller combination is used to connect to the system unit, creating the AT Attachment (ATA) interface. Soon, other vendors( ) started offering IDE drives based on the ATA standard developed by IBM. Thus, IDE became the term that covered the entire range of integrated drive/controller devices. Because almost all IDE drives are ATA-based, the two terms are used interchangeably.
Primary Slave Device Primary Master Device EIDE EIDE is Enhanced IDE. Provides a set of two IDE (Integrated Device Electronics) ports. Provides a set of two IDE (Integrated Device Electronics) ports. –Primary port and secondary port –Each port attaches to a cable containing two plugs, and each plug can connect to a device. –Total of four devices can be accommodated: two on the primary, and two on the secondary. Primary IDE Port Secondary Slave Device Secondary Master Device Secondary IDE Port
2.3.2 Mass Storage Mass Storage How Mass Storage Devices Differ from RAM Disk Drive Reliability Optical Media: CDs versus DVDs Magnetic Media Optical v.s. Magnetic Solid State Comparing Storages
How Mass Storage Devices Differ from RAM Slowest access times Low transfer rates Located farther from processor –Magnetic disks (Hard discs, floppy discs) –Optical disks (CD-ROM) –Magnetic tapes Advantages of Mass storage devices: –Non-volatile (data remains even after power is turned off) –High storage capacity (billions or trillions of bytes) –Cost per bit is lower than RAM –Use removable media in some cases
Disk Drive Reliability In order to achieve high data transfer rates – a hard disk drive has to spin very fast: from 4,000 to 15,000 rpm (revolutions per minute). –Also, magnetic patches( ) that store data bits on the hard disk tend to be small and packed closely together. Therefore, in order to read these tiny little bits spinning at such high speed accurately, –the read/write head has to be very, very close to the disk surface.
Disk Drive Reliability The head rides on a cushion of air( ), and the distance between it and the disk surface is –far less than the width of a human hair –far less than the width of a human hair –less than the size of a single dust particle. In fact, 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. It is important to –back up all data onto tape or another disk regularly.
MTBF (Mean Time between Failures) Reliability of the computer component is expressed as MTBF Reliability of the computer component is expressed as MTBF –Calculated by dividing the number of failures by the total hours of observation. MTBF is somewhat misleading to most consumers. MTBF MTBF is somewhat misleading to most consumers. MTBF –Effect of Hardware depends on the component fails. –If RAM, monitor or microprocessor fails they can be replaced. –Hard Disc drive failure is serious as all the data are lost.
Optical Media( ): CDs and DVDs Advantages of optical technologies: –Reliability: they are less prone to environmental damages. Usually used as a medium for multimedia presentations that combine sound with graphics, such as movies A DVD is an enhanced form of a CD. –The two types of disks are physically the same size –but they differ in format.
CDs Two recordable formats, CD-R and CD-RW Less expensive and have less capacity than a DVD Most expensive of the CD drives, are priced about the same as a read-only DVD drive. The more capable DVD-RW drives can be four times the cost of a standard DVD drive. Many computers (desktops and laptops) today are equipped with CD-RWs and read-only DVD combo drives.
DVDs Greater capacity Narrower tracks –Use blue laser, which has a shorter wavelength than the red laser used by CDs, allowing it to focus on the tinier tracks of the DVD. Use multiple layers of tracks –Blue laser beams can penetrate( ) the plastic and focus at different depths –Some are dual-layered- two sets of tracks on one side of the disk, one beneath the other. –This doubles the capacity of one side of a DVD disk. A double layer double side (DLDS) DVD drive uses double layers and can read double-sided disks, giving it four times the capacity of a single layer single side (SLSS) drive.
Magnetic Media( ): Zip Disks Magnetic media range from some of the smallest capacity storage devices, floppy disks, to the largest capacity devices, hard disk drives. Zip disks –Removable storage drives produced by Iomega, allow users to store much larger amounts of data than a floppy disk can hold –Capacity ranges from 100, 250 to 750 MB –Better option for graphics and large files. –Were once very popular, and many machines can still be purchased today with a Zip drive as standard equipment. But, their use declined with the wide availability of CD-RW drives and the reduced cost of blank CD-R disks.
Optical v.s. Magnetic Media Optical Media –more durable( ): not ruined by dust or moisture, nor are they vulnerable to electrical damage but can be damaged by physical damages such as scratches( )). –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. –Less expensive per MB than magnetic disks
Optical v.s. Magnetic Media Magnetic Media –Can be written and read faster than optical disks (except for floppy disks) –Most hard disk drives offer greater capacity than any currently available optical device
Solid State( ) Solid-state memory, or flash memory, uses no moving parts inside the chip. Records data using electronic charges Rewrites data by applying electric fields using in-circuit wiring to erase predetermined sections of the chip so those areas can be rewritten CompactFlash and SmartMedia cards. –CompactFlash card Uses a controller chip, which can increase performance on devices with slow processors and flash-memory chips. Storage capacity is between 4MB and 4GB –SmartMedia card Smaller and thinner than a matchbox Storage capacity is between 2MB and 256MB ???
Comparing Storages There are many ways to store data. The chart below lists the most common types of storage available today. –Magnetic storage media can be read and written many times, –optical media some are read-only, and some are write-once (but they can be read many times).
NameTypeCapacityWritability High-density floppy diskMagnetic1.44 MBUnlimited SecureDigital cardSolid state4 MB - 2 GBMany CompactFlash cardSolid state4 MB - 4 GBMany Super floppyMagnetic120 or 240 MBUnlimited USB storage device (thumb drive) Solid state 64, 128, 256 MB, or more Many CompactFlash form factor Microdrive Magnetic 340 MB, 1 GB, 4 GB Unlimited
NameTypeCapacityWritability Iomega Zip diskMagnetic100, 250, or 750 MBUnlimited CD-ROMOptical650 or 700 MBRead only CD-ROptical650 or 700 MBWrite once CD-RWOptical650 or 700 MBMany Iomega Jaz diskMagnetic1 or 2 GBUnlimited DVD+/-ROptical4.7 GBWrite once
NameTypeCapacityWritability DVD+/-RWOptical4.7 GBMany DVD+R DL (dual layer)Optical8.5 GBWrite once DVD-ROM (SLSS)Optical4.7 GBRead only DVD-ROM (DLSS or SLDS) Optical8.5 GBRead only DVD-ROM (DLDS)Optical18.8 GBRead only Internal hard disk driveMagnetic20 GB or moreUnlimited External hard disk driveMagnetic20 GB or moreUnlimited
RAM CPU Regusters cache ROM VRAM Hard Drive Tape Magnetic Storage CD DVD Optical Storage USB network Storage Review
2.4 Putting Together the Hardware Components How Components Work Together Lab: Researching a Computer System Lab: Online Configuration
2.4.1 How Components Work Together
Working Together Digital cameraCamcorder Parallel Mouse, keyboard PS-2 video card AGP Slot Monitor Speaker, microphone sound card PCI Slots FireWire USB modem Phone line Scanner Printer Peripherals Component Legend Port Expansion Card Expansion Slot Peripheral Device Bus PCIPCI AGPAGP USBUSB FireWireFireWire FrontFront Disk drive Memory Storage Devices sideside PCI Disk Controller Storage Devices DVD-ROM IDEIDE Hard drive CD-ROM Chipset RAM (instructions to be executed when the computer is running) ROM (instructions needed to boot the computer) CMOS (Configuration information used during the boot process) Main Memory Boot Memory Memory CPU (ALU, Registers, Control unit) L1 cache L2 cache (usually on CPU) Microprocessor
Major Hardware Components and Their Functionality CPU executes instructions stored in memory devices. During the boot process, 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.
Major Hardware Components and Their Functionality Data from storage devices ( CD-ROM drive, 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 (the keyboard, mouse, joystick, printer, speakers, and microphone) are connected to the computer via ports typically in the back of a system unit. Expansion cards can be plugged into the expansion slots of the computer to extend the functionality of a computer.
How Components Work Together 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. –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 using and store it in RAM. The graphics card would then access the image data and display the image as pixels on the computer monitor.
Lab: Researching a Computer System Researches done through product reviews Price comparisons Price and comparisons can be found at: some web site – – –
Lab: Online Configuration Computer hardware vendors have their own web sites Sites specify system configurations of various products Priced by components
2.5 Improving Computer Performance Moore's Law Bottlenecks Throughput and Latency Assessments: –Multiple-Choice Quiz 7
2.5.1 Moore's Law Law can be stated as: Number of transistors on a microchip doubles every 18 months. Denser the chip Higher the capacity Limitations: Chips must be thick enough for the electrons to pass through. Predictions based on Moores Law –Processing power (speed) doubles every 18 months. –Storage capacity of RAM increases exponentially. Other observations: –Storage capacity of hard disk drives is also increasing exponentially( ). –Cost for consumers to purchase computer parts is decreasing over time.
Moore s Law (continued)
Parkinson s Law of Data Parkinson's Law of Data: Data expands to fill the space available. –As more memory or disk space becomes available, the demand for more memory or disk space increases accordingly. –As Parkinson's Law predicts today's operating systems are much more elaborate and require more memory for their own use. –As disk drive capacity increases people begin using them in new ways (e.g. storing musical recordings, short video clips, and movies).
2.5.2 Bottlenecks Bottlenecks Slowing a Process Typical Bottlenecks Eliminating Bottlenecks
BottlenecksSlowing a Process Bottleneck is a step within a series of steps that takes the longest time to complete. Time required to perform a task consisting of several steps may be delayed by the bottleneck step. Process time cannot be shortened without speeding up the bottleneck. Process time cannot be shortened without speeding up the bottleneck.
Typical Bottlenecks Typical bottlenecks: –Cache –RAM –I/O –Video card (particularly for 3-D gaming)
Eliminating Bottlenecks To speed up performance of a system: –Use profiling tools( ) to measure each sections time taken to complete to determine the bottleneck steps –Improve upon the bottleneck steps
2.5.3 Throughput and Latency Throughput and Latency are two key terms used in discussing computer performance. –Throughput(, ) refers to the rate at which data flows through the system. E.g., a computer might execute 500 million instructions per second. –Latency ( ) refers to the time required to complete an individual operation. E.g., it might take 5 seconds to launch an application, or 2 minutes to reboot the entire system.
These measures are clearly related Suppose you want your Web server to display a large graphic on a user's computer when they press a button. –Latency is how much time passes from the button press until the image is displayed. If the image is a 1 MB file, then with a throughput of 10 megabits per second, the latency to display the image will be at least 0.8 seconds.
Whether latency or throughput is most appropriate to report depends on the setting. If you are selecting a provider for your Web server's network connection, –you will be more concerned with having enough throughput, or bandwidth, to serve your needs. If you are a user of the same web server –you will certainly be concerned with the latency for your request. –you does not matter to how many other requests the server processes per second (i.e., throughput). –You are mainly concerned with your request.
Whether latency or throughput is most appropriate to report depends on the setting. As a server administrator –you might hear complaints from people whose latency was exceedingly high, even though your throughput was acceptable. your server handles two different kinds of requests: –a request for a small file that can be sent quickly and –a request for a large file that takes a long time to send. If the vast majority of requests are for small files –throughput and latency for small files may be fine –while the latency for large files may be unacceptable.
A simple way to think about latency is to model the time it takes to do a task as being equal to –some constant startup time, + –a time that scales with the size of the task.
END of Unit 2