You are on page 1of 68

Lecture 04:

CPU, Memory, and Storage


Mahboob Qaosar
Associate Professor
Dept. of Computer Science & Engg., R.U.
Transforming Data Into
Information
How Computers Represent Data
• Number systems
– A manner of counting
– Several different number systems exist
• Decimal number system
– Used by humans to count
– Contains ten distinct digits
– Digits combine to make larger numbers
How Computers Represent Data
• Binary number system
– Used by computers to count
– Two distinct digits, 0 and 1
– 0 and 1 combine to make numbers
How Computers Represent Data
• Bits and bytes
– Binary numbers are made of bits
– Bit represents a switch
– A byte is 8 bits
– Byte represents one character
How Computers Represent Data
• Text codes
– Converts letters into binary
– Standard codes necessary for data transfer
– ASCII
• American English symbols
– Extended ASCII
• Graphics and other symbols
– Unicode
• All languages on the planet
How Computers Process Data
• The CPU
– Central Processing Unit
– Brain of the computer
– Control unit
• Controls resources in computer
• Instruction set
– Arithmetic logic unit
• Simple math operations
• Registers
How Computers Process Data
• Machine cycles
– Steps by CPU to process data
– Instruction cycle
• CPU gets the instruction
– Execution cycle
• CPU performs the instruction
– Billions of cycles per second
– Pipelining processes more data
– Multitasking allows multiple instructions
How Computers Process Data
• Memory
– Stores open programs and data
– Small chips on the motherboard
– More memory makes a computer faster
How Computers Process Data
• Nonvolatile memory
– Holds data when power is off
– Read Only Memory (ROM)
– Basic Input Output System (BIOS)
– Power On Self Test (POST)
How Computers Process Data
• Flash memory
– Data is stored using physical switches
– Special form of nonvolatile memory
– Camera cards, USB key chains
How Computers Process Data
• Volatile memory
– Requires power to hold data
– Random Access Memory (RAM)
– Data in RAM has an address
– CPU reads data using the address
– CPU can read any address

5A-12
Components affecting Speed

5A-13
Affecting Processing Speed
• Registers
– Number of bits processor can handle
– Word size
– Larger indicates more powerful computer
– Increase by purchasing new CPU
Affecting Processing Speed
• Virtual RAM
– Computer is out of actual RAM
– File that emulates RAM
– Computer swaps data to virtual RAM
• Least recently used data is moved
Affecting Processing Speed
• The computer’s internal clock
– Quartz crystal
– Every tick causes a cycle
– Speeds measured in Hertz (Hz)
• Modern machines use Giga Hertz (GHz)
Affecting Processing Speed
• The bus
– Electronic pathway between components
– Expansion bus connects to peripherals
– System bus connects CPU and RAM
– Bus width is measured in bits
– Speed is tied to the clock
Affecting Processing Speed
• External bus standards
– Industry Standard Architecture (ISA)
– Local bus
– Peripheral control interface (PCI)
– Accelerated Graphics Port
– Universal Serial Bus (USB)
Affecting Processing Speed
• Universal Serial Bus (USB)
– Connects external devices
– Hot swappable
– Allows up to 127 devices
– Cameras, printers, and scanners

5A-19
Affecting Processing Speed
• Cache memory
– Very fast memory
– Holds common or recently used data
– Speeds up computer processing
– Most computers have several caches
– L1 holds recently used data
– L2 holds upcoming data
– L3 holds possible upcoming data

5A-20
Modern CPUs
A Look Inside The Processor
• Architecture
– Determines
• Location of CPU parts
• Bit size
• Number of registers
• Cache Size
• Pipelines

5B-22
Comparing Processors
• Speed of processor
• Size of cache
• Number of registers
• Bit size
• Speed of Front side bus
Advanced Processor Topics
• Parallel Processing
– Multiple processors in a system
– Symmetric Multiple Processing
• Number of processors is a power of 2
– Massively Parallel Processing
• Thousands of processors
• Mainframes and super computers
Extending The Processors Power
• Standard computer ports
– Keyboard and mouse ports
– USB ports
– Parallel
– Network
– Modem
– Audio
– Serial
– Video
Standard Computer Ports
Extending The Processors Power
• Serial and parallel ports
– Connect to printers or modems
– Parallel ports move bits simultaneously
• Made of 8 – 32 wires
• Internal busses are parallel
– Serial ports move one bit
• Lower data flow than parallel
• Requires control wires
• UART converts from serial to parallel
Serial Communications
Parallel Communications
Extending The Processors Power
• SCSI
– Small Computer System Interface
– Supports dozens of devices
– External devices daisy chain
– Fast hard drives and CD-ROMs
Extending The Processors Power
• USB
– Universal Serial Bus
– Most popular external bus
– Supports up to 127 devices
– Hot swappable
Extending the Processors Power
• Expansion slots and boards
– Allows users to configure the machine
– Slots allow the addition of new devices
– Devices are stored on cards
– Computer must be off before inserting
Extending the Processors Power
• Plug and play
– New hardware detected automatically
– Prompts to install drivers
– Non-technical users can install devices
Types of Storage Devices
Describing Storage Devices
• Store data when computer is off
• Two processes
– Writing data
– Reading data

6A-35
Describing Storage Devices
• Storage terms
– Media is the material storing data
– Storage devices manage the media
– Magnetic devices use a magnet
– Optical devices use lasers
– Solid-state devices have physical switches

6A-36
Magnetic Storage Devices
• Most common form of storage
• Hard drives, floppy drives, tape
• All magnetic drives work the same

6A-37
Magnetic Storage Devices
Floppy Disk

Hard Disk

Tape

6A-38
Magnetic Storage Devices
• Data storage and retrieval
– Media is covered with iron oxide
– Read/write head is a magnet
– Magnet writes charges on the media
• Positive charge is a 1
• Negative charge is a 0
– Magnet reads charges
– Drive converts charges into binary

6A-39
Data Retrieval

6A-40
Magnetic Storage Devices
• Data organization
– Disks must be formatted before use
– Format draws tracks on the disk
– Tracks is divided into sectors
• Amount of data a drive can read

6A-41
Tracks and Sectors

6A-42
Magnetic Storage Devices
• Finding data on disk
– Each track and sector is labeled
• Some are reserved
– Listing of where files are stored
• File Allocation Table (FAT)
• FAT32
• NTFS
– Data is organized in clusters
• Size of data the OS handles

6A-43
Magnetic Storage Devices
• Hard disks
– Primary storage device in a computer
– 2 or more aluminum platters
– Each platter has 2 sides
– Spin between 5,400 to 15,000 RPM
– Data found in 9.5 ms or less
– Drive capacity greater than 40 GB

6A-44
Illustrated Hard Disk

6A-45
Magnetic Storage Devices
• Tape drives
– Best used for
• Infrequently accessed data
• Back-up solutions
– Slow sequential access
– Capacity exceeds 200 GB

6A-46
Optical Storage Devices
• CD-ROM
– Most software ships on a CD
– Read using a laser
• Lands, binary 1, reflect data
• Pits scatter data
– Written from the inside out
– CD speed is based on the original
• Original CD read 150 Kbps
• A 10 X will read 1,500 Kbps
– Standard CD holds 650 MB
6A-47
Optical Storage Devices
• DVD-ROM
– Digital Video Disk
– Use both sides of the disk
– Capacities can reach 18 GB
– DVD players can read CDs

6A-48
Recordable Optical Technologies
• CD Recordable (CD-R)
– Create a data or audio CD
– Data cannot be changed
– Can continue adding until full

6A-49
Recordable Optical Technologies
• CD Regrettable (CD-RW)
– Create a reusable CD
– Cannot be read in all CD players
– Can reuse about 100 times

6A-50
Recordable Optical Technologies
• Photo CD
– Developed by Kodak
– Provides for photo storage
– Photos added to CD until full
– Original pictures cannot be changed

6A-51
Solid State Devices
• Data is stored physically
• No magnets or laser
• Very fast

6A-52
Solid State Devices
• Flash memory
– Found in cameras and USB drives
– Combination of RAM and ROM
– Long term updateable storage

6A-53
Solid State Devices
• Smart cards
– Credit cards with a chip
– Chip stores data
– Eventually may be used for cash
– Hotels use for electronic keys

6A-54
Solid State Devices
• Solid-state disks
– Large amount of SDRAM
– Extremely fast
– Volatile storage
– Require battery backups
– Most have hard disks copying data

6A-55
Measuring and Improving Drive
Performance
Drive Performance
• Average access time
– Also known as seek time
– Time to find desired data
– Measured in milliseconds
– Depends on two factors
• RPM
• Time to access a track
– Hard drive between 6 and 12 ms
– CD between 80 and 800 ms

6B-57
Drive Performance
• Data transfer rate
– How fast data can be read
– Measured in Bps or bps
– Hard drive ranges from 15 to 160 MBps
– CD ROMS depend on X factor
• 24x CD transfers 24 x 150 KBps
– Floppy disks transfer at 45 KBps

6B-58
Data Transfer Rate

6B-59
Optimizing Performance
• Disk optimization
– Handled by operating system tool
– Routine disk maintenance
– Optimization should be run monthly

6B-60
Optimizing Performance
• Clean up unnecessary files
– Delete temp files
– Uninstall unused programs
– Delete obsolete data files
– Files should be cleaned weekly

6B-61
Optimizing Performance
• Scan a disk for errors
– Bad spots on the media
– Find and fix the error
• Move data to a good spot
• Mark the spot as bad
– Disks should be scanned monthly

6B-62
Optimizing Performance
• Defragment a disk
– Files fragment when resaved
– Fragmented files load slower
– Defragment puts the fragments together
– Disks should be defragged monthly

6B-63
Optimizing Performance
• File compression
– Shrinks the size of a file
– Takes up less space on disk
– Reduce a disks performance
– Will increase disk capacity
– PKZip, WinZip and WinRAR

6B-64
File Compression

763 KB
on disk

Compressed
157 KB

6B-65
Drive Interface Standards
• Interface
– How the device is connected
– Drive controllers allow transfer of data
– Dictates transfer rate and access time

6B-66
Drive Interface Standards
• Small Computer System Interface
– SCSI
– Higher transfer rates than EIDE
– More than 40 devices per SCSI controller
• Computers may have several SCSI controllers
– Many versions exist
• Versions are typically incompatible
– Found in servers and workstations

6B-67
Drive Interface Standards
• USB
– External drives and Devices
– Transfer rate is limited
– Many devices can be connected

6B-68

You might also like