Kĩ thuật lập trình - Hardware: The cpu & storage
Error Checking: Parity Bits
Used in modems & communications to verify correctness
One check bit is added to 7 bit byte
The check bit is defined as either odd or even
For odd parity, if the data sent is correct, the parity bit plus the first 7 data bits is an odd number
For even parity, if the data sent is correct, the parity bit plus the first 7 data bits is an even number
36 trang |
Chia sẻ: huyhoang44 | Lượt xem: 826 | Lượt tải: 0
Bạn đang xem trước 20 trang tài liệu Kĩ thuật lập trình - Hardware: The cpu & storage, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
1Hardware: The CPU & Storage4.1 Microchips, Miniaturization, & Mobility4.2 The System Unit: The Basics4.3 More on the System Unit4.4 Secondary Storage4.5 Future Developments in Processing & StorageChapter4McGraw-Hill/Irwin© 2007 The McGraw-Hill Companies, Inc. All rights reserved.Microchips, Miniaturization, & MobilityVacuum Tubes vs. TransistorsVacuum tubes were the original logic gates of computersThey looked like light bulbs, were hot, and burned out like them tooThe original transistors were 1/100th the size of vacuum tubes (less power, faster, more reliable too)Transistors vs. Integrated CircuitsCompare 1955’s 45 lb “portable” color TV to today’s 7 oz Casio 2.3 inch color TVOne integrated circuit contains thousands of transistors3Microchips, Miniaturization, & MobilitySemiconductorA material whose electrical properties are intermediate between a good conductor and a nonconductor of electricityPerfect substrate to overlay complex circuits onMicrochips are made from semiconductorsContain millions of microminiature integrated circuits4Microchips, Miniaturization, & MobilityMicroprocessorThe miniaturized circuitry of an entire computer processor on a single chipContains the CPU, which processes dataMicrocontroller or Embedded ComputerA microprocessor that was modified for use in a machine that isn’t a computer5The System Unit: The BasicsBinary System: the basic unit of computingUses just two numbers: 0 and 1All data and program instructions in the computer are represented as binaryBit: each 0 or 1 is a bitByte: a group of 8 bitsKilobyte: ~1,000 (1,024) bytesMegabyte: ~1 Million (1,048,576) bytesGigabyte: ~1 Billion (1,073,741,824) bytesTerabyte: ~ 1 Trillion (1,009,511,627,576) bytesPetabyte: ~ 1 quadrillion bytesExabyte: ~ 1 quintillion bytesAll the printed material in the world is ~ 5 exabytes6The System Unit: The BasicsBinary coding schemes assign a unique binary code to each letterEBCDICRequires 8 bits per characterUsed for IBM mainframesASCIIRequires 7 or 8 bits per character, depending on the version8 bit Extended ASCII provides 256 charactersUsed for PCs, Unix hosts, Macs UnicodeRequires 16 bits per characterHandles 65,536 characters7The System Unit: The BasicsError Checking: Parity BitsUsed in modems & communications to verify correctnessOne check bit is added to 7 bit byteThe check bit is defined as either odd or evenFor odd parity, if the data sent is correct, the parity bit plus the first 7 data bits is an odd numberFor even parity, if the data sent is correct, the parity bit plus the first 7 data bits is an even number Discussion Question: If the 7 data bits are 1101011, and the modem is sending odd parity, what should the parity bit be set to?Answer: Since the data bits add up to 5, an odd number, the parity bit will be 0.8The System Unit: The BasicsMachine LanguageA binary-type programming language built into the CPU that is run directly by the computerEach CPU type has its own machine languageLanguage TranslatorsSystem programs convert the programming instructions for you into machine language9The System Unit: The Basics10The System Unit: The BasicsComputer TermsNamesBayPower SupplySurge ProtectorVoltage RegulatorUPSMotherboardMicroprocessorChipsetDefinitionsShell or opening used for the installation of electrical equipment.This converts AC to DC to run the computer.Protects the computer from being damaged by power spikes. Plug your computer into one.Protects a computer against brownouts or low power conditions that happen a lot in summer.Uninterruptible Power Supply. Battery-operated device that provides power for a time when there is a blackout.The main system board of the computer.The miniaturized circuitry of a computer processor.Groups of interconnected chips on the motherboard that control information flow between the microprocessor and other system components connected to the motherboard.11The System Unit: The BasicsThe CPUOlder CPUs processing speeds are in MegaHertz1 MHz = 1 Million ticks per secondCurrent CPUs processing speeds are in GigaHertz1 GHz = 1 Billion ticks per secondThe faster a CPU runs, the more power it consumes, and the more heat it generates12The System Unit: The BasicsThe CPU ContinuedMainframe and minicomputer speed is measured in MIPSMIPS stands for millions of instructions per secondWorkstations perform at 100 MIPS or moreMainframes perform at 200 – 1,200 MIPSSupercomputer processing speed is measured in flopsFlops stands for floating point operations per secondIBM’s Blue Gene/L cranks out 70.72 teraflops (tera = trillion) per second13More on the System UnitParts of the CPU NameWord sizeControl unit Arithmetic Logic UnitRegistersBuses DefinitionThe number of bits the processor can process at any one timeThe part of the CPU that deciphers instructions and carries them outThe ALU performs mathematical and logical operations and controls the speed of themHigh-speed storage areas that temporarily store data during processingElectrical data roadways used to transmit bits within the CPU and between CPU and other motherboard components14More on the System UnitHow Memory Works Memory ChipRAMROMCMOSFlash ExplanationRandom Access Memory chips are volatile and hold: Software instructionsData before & after the CPU processes itRead only memoryCannot be written on or erased without special equipmentAre loaded at factory with fixed start-up instructionsComplementary Metal Oxide SemiconductorPowered by a batteryContains time, date, calendar, boot passwordNonvolatile memory that can be erased and reprogrammed more than onceDoesn’t require a batteryUsed in newer PCs for BIOS instructions15More on the System UnitTypes of RAM RAM TypesDRAMSDRAMSRAMDDR-SDRAMSIMMDIMM ExplanationDynamic RAM must be constantly refreshed by the CPU or it loses its contentsSynchronous Dynamic RAM is synchronized by the system clock and is much faster than DRAMStatic RAM is faster than DRAM and retains its contents without having to be refreshed by CPUDouble-data rate synchronous dynamic RAMSingle Inline Memory Module has RAM chips on only one side FPM is fast page mode typeEDO is extended data output; is faster than FPMDual Inline Memory Module has chips on both sides16More on the System UnitSpeeding up ProcessingThe CPU works much faster than RAMSo it could sit there waiting for informationCache temporarily stores instructions and data that the processor uses frequently to speed up processingLevel 1 cache is part of the microprocessorHolds 8 to 256 kbFaster than Level 2 cacheLevel 2 cache is SRAM external cacheHolds 64 kb to 2 MbLevel 3 cache is on the motherboardComes on very high-end computers 17More on the System UnitSpeeding up Processing MethodInterleavingBurstingPipeliningSuperscalar ArchitectureHyperthreading DescriptionCPU alternates communications between two or more memory banksCPU grabs a block of data from memory instead of retrieving one piece at a timeCPU doesn’t wait for one instruction to complete before fetching its next instructionThe computer can execute more than one instruction per clock cycleA technique used in superscalar architecture in which the OS treats the microprocessor as though it is two microprocessors18More on the System UnitPorts Port TypeSerial PortParallel PortSCSI PortUSB Port DescriptionUsed to transmit slow data over long distancesSends data sequentially, one bit at a timeUsed to connect keyboard, mouse, monitors, dial-up modemsFor transmitting fast data over short distancesTransmits 8 bytes simultaneouslyConnects printers, external disks, backupsSmall Computer System InterfaceConnects up to 7 devices in a daisy chainTransmits data 32 bits at a timeUniversal Serial Bus can theoretically connect up to 127 peripheral devices in a daisy chain19More on the System UnitUSBGoalsBe low-costBe able to connect lots of devicesBe hot swappablePeople hate rebooting because it takes timeHot swapping means a device can be connected/disconnected without rebootingPermit plug and playDevices are automatically configured when they are installed – no need to download new drivers20More on the System UnitUSB ContinuedStandardsUSB 1.1 – the original standardUSB 2.0 – the current standard for new PCsUSB On The Go (OTG) – currently under developmentConnectorsA – in USB Type 1.1 and 2.0B – in USB Type 1.1 and 2.0Mini B – in USB Type 2.0Mini A – in USB OTG used for smaller peripherals like cellphones21More on the System UnitSpecialized Expansion Ports Port TypeFireWireMIDIIrDABluetoothEthernet DescriptionIntended for devices working with lots of dataUsed for camcorders, DVD players, TVsHandles up to 400 megabits per secondMusical Instrument Digital InterfaceConnects musical instrumentsUsed in creating, recording, editing, performing musicInfrared Data Association: Infrared ports used to make a cableless connectionUses short-range radio waves that transmit up to 30 ftConnects computers to printers, keyboards, headsets, even refrigeratorsNamed after King Harald Bluetooth, son of Gorm, who united the Norway and Denmark. Ruled 910-940 A.D.The standard for linking all devices in a Local Area Network22More on the System UnitExpansion Cards23More on the System Unit Expansion Buses BusPCI busAGP Bus DescriptionPeripheral Component InterconnectFor high-speed connections32 or 64 bits wideTypically used for sound cards, modems, high-speed network cardsAccelerated Graphics PortTwice the speed of PCI busFor Video and 3-D graphics cards24Secondary Storage Storage TypesFloppy and Zip disksHard disksOptical disksMagnetic tapeSmart CardsFlash memoryOnline secondary storage DescriptionsRemovable disks.Floppies store 1.44 MBZip disks store 100, 250, or 750 MBMade from thin rigid metal covered with magnetizable substrate. Most disks have 2 or more plattersRemovable CDs and DVDs Thin plastic tape coated with magnetizable substanceLike a credit card, but contains a microprocessor and memory chipsNonvolatile memory – no moving partsLets you store data on an online vendor’s server25Secondary StorageFloppies and Zip DisksFloppiesFlat piece of mylar plastic inside a 3.5” plastic caseStore about 1.44 MBHave a write-protect notchData is recorded in tracks: concentric recording bandsFormatting breaks the tracks into small wedge-shaped sectorsRead/Write head transfers data between the computer and diskFloppies DO wear out! Zip DisksDisks with a high-quality magnetic coating Store 100, 250, or 750 MBRequire a Zip drive; won’t work on floppy drivesUsed to store larger files than floppies can holdZip disks wear out too!26Secondary StorageHard DisksThin, rigid metal, glass, or ceramic platters covered with a substance that allows data to be held in the form of magnetized spotsThe more platters there are, the higher the drive capacity Store data in tracks, sectors, and clustersFormatting creates a file allocation table that maps files to clusters or inodesTypical file systems are VFAT & NTFS for Windows, HFS and ext2 for UnixDrive heads ride on .000001” cushion of air, and can crash!Important data should always be backed up!27Secondary StorageHard DisksHard Disk Types: External Hard Disks – a freestanding disk driveRemovable Hard Disk – inserted into a cartridge drive on the PCHard Disk ControllersEIDE – Enhanced Integrated Drive ElectronicsSupports up to 4 disks at 137 GB per diskMarketed as SATA, Fast ATA, Ultra ATA, ATA-2, ATA/100SCSI – Faster than EIDE controllersFibre Channel – used in large servers – faster and costlier than SCSI28Secondary StorageOptical DisksCDs and DVDs are Optical disksData is written and read using lasers, not a disk headCD-ROM is Compact Disk Read-Only MemoryCD-R is used for recording only onceCD-RW is an erasable optical disk that can both record and erase data over and over againDVD is a CD-style disk with extremely high capacityStores 4.7 or more GBDVD-R is used for recording only onceDVD-RW, DVD-RAM, DVD+RW are reusable DVDs29Secondary StorageMagnetic TapeThin plastic tape coated with a substance that can be magnetizedStore 200 GB and higherUsed in the form of tape cartridgesStill popular for large backups because of their large data capacityBut don’t get it near a magnet as that will erase it!30Secondary StorageSmart CardsResembles a credit card, but contains a microprocessor and memory chipsHolds more information than standard magnetic-strip credit cards; 8 – 40 MB of dataUltraCard Uses a magnetic shim that draws out of the card to be read, then retracts into the drive Provides 2 GB of storageContact smart cardsMust be swiped through card readers Can wear out from useContactless smart cardsRead when held in front of a low-powered laser31Secondary StorageFlash MemoryNonvolatile memory with no moving partsBut the electronics can wear outAvailable as Flash memory cards Insert these into a flash port of a camera, handheld PC, smartphoneFlash memory sticks A form of flash memory that plugs into a memory stick portFlash memory drivesA finger-sized module of flash memoryPlugs into the USB port of most PCs and Macintoshes32Secondary StorageOnline Secondary StorageAllows you to use the internet to back up your dataSign up with a vendor and receive access to software that allows you to upload your data to that company’s serverFiles should be encrypted to maintain securityUse only for vital files that require immediate availabilityUse tape, removable hard disk cartridges, zip disks, optical storage or tape for normal backup33Future Developments in Processing & StorageMoore’s LawGordon Moore predicted the number of transistors on a silicon chip will double every 18 monthsIt has held up since the 1960s!34Future Developments in Processing & Storage New TechnologyM-RAMOUMNanotechnologyOptical ComputingDNA ComputingQuantum Computing Description of Processing TechnologyMagnetic RAM uses miniscule magnets rather than electrical chargesOvonic Multiplied Memory stores bits by generating different levels of low and high resistance on a glossy materialTiny machines work at a molecular level to make nanocircuitsUses lasers and light, not electricity Uses strands of synthetic DNA to store dataBased on quantum mechanics and stores information using particle states35Future Developments in Processing & Storage New TechnologyHigher-density disksMolecular electronics Description of Storage TechnologyMagnetic disk drives currently hold 100 GB of dataBlank CDs are replacing floppy disks since they hold 650MB and cost < $1 eachDVD disks hold up to 4.7 GB of data currentlyPerpendicular recording technology allows 25% - 100% more data to be stored on the same diskPolymer memory creates chips that store data on plasticsNonvolatile memoryData is stored based on polymer’s electrical resistance36
Các file đính kèm theo tài liệu này:
- chap004_421.ppt