Assessing Hardware
Assessing computer systems is useful for several reasons
- forces you to think about computing needs now and in the future
- keeps you from spending any more money than you need to
- helps you spend your computing dollars wisely and effectively
Computer Subsystems
- CPU subsystem
- memory subsystem
- storage subsystem
- A/V subsystem
- ports to external devices
CPU subsystem
- CPU = Central Processing Unit
- This is the Central Processor Unit, or CPU
- the CPU has many components. A simplified view is (reference diagram)
- control unit (CU) : carries out the instruction
- arithmetic logic unit (ALU) : does arithmetic operations
- instruction decoding unit : decodes the instruction after it is read from memory
- prefetch unit : requests that instructions be read from memory
- bus interface unit : controls interactions with the memory unit (which is separate from CPU)
- these units must cooperate to make things happen
- The intricate dance they perform is known as the machine cycle or instruction cycle, which follows these major phases:
- Fetch the instruction : prefetch unit requests instruction from memory. It is transferred
from memory, via the bus, into the decoding unit.
- Decode the instruction : decoding unit decodes the operation and operands and activates the
control unit
- Execute the instruction : the control unit sends values to the ALU to
be added, subtracted, or whatever
- Store the results : the results of the operation may be stored into memory
- The instruction cycle is repeated millions of times per second.
- It is controlled by the computers clock, which sends out timing pulses, or "ticks".
- The instruction cycle requires several clock ticks. Some instructions require more clock ticks than others.
- CPUs are usually characterized by their clock speed, measured by number of clock ticks per second
- Clock speed is measured in "GHz", which means Giga Hertz. 1 GHz is 1 billion clock ticks per second
- NOTE: If you compare 2 computers with two different clock rates,
the one with the higher rate may not be "faster"!
- some instructions require more clock ticks than others
- if your software application uses lots of these complex instructions, it will run slower even on the same
computer than some other application
- Control Unit up close and personal
- major subcomponents are Instruction Register and Program Counter
- a register is a very small but fast storage (32 or 64 bits) located on the CPU
- the Instruction Register holds the next instruction to be carried out
- the Program Counter contains the memory address where the next instruction is stored
- Arithmetic Logic Unit up close and personal
- majors subcomponents are binary arithmetic circuits and accumulators
- the fundamental binary arithmetic operation is addition. Subtraction can be done by
negating then adding, multiplication by repeated addition, division by inverting then repeated addition
- the accumulators are registers which hold the arithmetic values and results
- Cache unit is random access memory on the CPU chip itself but separate from the CPU.
- Is quicker to access cache than RAM memory unit
- Recently and frequently used instructions and data are stored in cache
- Level 1 (L1) cache is closest to the CPU. It is fastest to access but has smallest capacity (measured in KB)
- Level 2 (L2) cache is further away but still on the chip. It is slower to access but has larger capacity (possibly measured in MB)
- Some chips also include Level 3 (L3) cache, measured in MB
- The CPU chip may contain two or more cores.
- Each core is a processor and all can operate simultaneously
- Each core will likely have its own L1 cache, but L2, L3 may be shared.
- All cores share the same RAM memory unit
- You can get CPU information on a Windows XP system by selecting My Computer from the Start menu then
View System Information from System Tasks.
- You can get CPU performance information on a Windows XP system by right-clicking in the task bar and selecting Task Manager then the Performance tab
- Laptops use slower and less powerful CPUs than desktops do, because they consume less electricity and produce less heat
- You can replace the CPU with a new one, but there is rarely a need to do this. The new one must be compatible with the motherboard
Memory subsystem
- RAM = Random Access Memory. Any location can be accessed at any time
- As you know, RAM is solid state (no moving parts) but is volatile (loses contents when power shut off)
- Where programs and data are stored for direct use by the processor. Can think of it as a large collection of
mailboxes. Each mailbox has a unique address plus its contents.
- When the processor needs an instruction or data
(the contents), it sends a request containing the address to the Memory Unit. The Memory Unit looks up that address
and responds with a copy of its contents.
- When the processor wants to store something in memory, it sends a request
containing both the address and the new contents to the Memory Unit. The Memory Unit finds that address and stores
the contents in it.
- Recall that everything is stored in binary. The size of each "mailbox" is based on the basic size unit,
the byte, or 8 bits.
- This is why many memory circuit boards contain 8 ICs or "chips". Each IC represents one position in the byte
- Most systems now use "double data rate" (DDR or DDR2) memory; can access twice in the same clock cycle
- Memory is usually characterized by its capacity.
- The units used for primary memory are "MB" and "GB".
- MB means megabytes or 1 million bytes (actually 1,048,576 which is 220)
- GB means gigabytes or 1 billion bytes (actually 1,073,741,824 which is 230)
- Memory can also be characterized by its speed
- Memory clock cycles are slower (longer) than CPU clock cycles
- One or two memory operations can occur per clock cycle
- Still pretty fast, 100 MHz or more
- Not as easy to determine speed by reading specs, as it is for CPU
- Access time is generally 10-15 nanoseconds.
- A nanosecond is 1 billionth of a second; light travels about 1 foot
- All RAM memory is "multitasking". A CPU can only execute one task at a time but memory can hold many tasks at the
same time. Memory is divided into pages.
- You can get memory information on a Windows XP system by selecting My Computer from the Start menu then
View System Information from System Tasks.
- You can get memory performance information on a Windows XP system by right-clicking in the task bar and selecting Task Manager then the Performance tab
- You can replace or add RAM to your system with relative ease.
- The new memory card must be compatible with the motherboard.
- There are a limited number of slots, typically 2 to 4
- You may not be able to mix old and new memory cards if they have different capacity
Storage subsystem
- Long-term storage of data and instructions
- non-volatile
- By contrast, "memory" is short-term and volatile
- Look at three categories, based on storage technology
- Magnetic
- Optical
- Solid-state
Magnetic Disk Storage
- The disk is a random access device
- Disks are rotating devices.
- Data are stored in concentric circles. Each such circle is called a track.
- There are also dividing lines that radiate out from the center to the edge. These divide the disk
surface into sectors.
- The surface is thus sliced up into slightly curved rectangles called blocks
- A specific address on the disk is identified by its track number and sector number combined
- The read/write head is mounted on an arm which can slide back and forth from the edge of a disk
toward its center. This movement selects the track. The rotating disk allows access to the desired sector.
- Access time determined by
- latency or rotational delay : how long it takes for disk to spin around to desired sector
- seek delay : how long it takes arm to move to desired track
- Note that these are simultaneous: disk is spinning at the same time arm is moving
- Hard drives normally have 2 or more platters that allow multiple
bits to be read/written at once.
- Disk storage is primarily characterized by its capacity, expressed in GB or perhaps TB (terabytes, or trillions of bytes)
- It is secondarily characterized by speed
- Typical hard drive rotates at 5400 or 7200 RPM
- Don't confuse access time with transfer rate
- Access time is how long it takes to get to first bit position (see above) -- typically 10 milliseconds ( 0.01 seconds)
- Transfer rate is how quickly the bits can be read once positioned (100 MB per second or more)
- To view disk capacity and usage in Windows XP, select My Computer from the Start menu, then right-click on the
disk's icon and select Properties
- Hard drives are physically easy to install.
- External drives normally connect via USB
- Internal drives normally connect via IDE (older) or SATA (newer)
- IDE or SATA are not interchangeable
- Open the box to see what the hard drive cables look like
- IDE is parallel and has wide flat cable
- SATA is serial and has skinny cable
- The C: drive is more difficult to replace because it must contain booting and operating system software
Magnetic Tape storage
- data are stored as magnetic charges on ribbons of tape
- tapes are sequential access, not random, because to get from address X to address Y, every address on the ribbon
between X and Y has to pass across the read/write head.
- tapes have traditionally been cheaper per unit of storage than disks, so tapes used for backup and long term storage
Optical storage
Distinguish from disks in that
- data are read and written using lasers (concentrated light beams) rather than magnetic devices
- data are stored as physical "pits", with a pit representing 1 and no-pit representing 0
- thus it is fundamentally harder to write than it is to read - have to "burn" the pits
- hard disks have much higher capacity per square inch of surface
- hard disks are also much less portable
Currently used optical storage media include:
- CD-ROM : Compact Disc - Read Only Memory
- CD-R : Compact Disc - Recordable (write once)
- CD-RW : Compact Disc - Re-Writable
- DVD-ROM : Digital Versatile Disc - Read Only Memory
- DVD-R, DVD+R : Digital Versatile Disc - Recordable (write once)
- DVD-RW, DVD+RW : Digital Versatile Disc - Re-Writable
- BD : Blu-ray Disc (uses blue laser instead of red)
The data are stored on a reflective substrate beneath a protective clear plastic
surface. A laser shines down onto the surface and the beam is either reflected
back strongly or weakly. Strong reflection means flat or 0, weaker means pitted
or 1.
- To handle "-ROM" operations requires only a weak laser to detect pit/no-pit.
- To handle "-R" operations requires a second stronger laser to "burn" pits
- To handle "-RW" operations requires a third laser (stronger than read, weaker than write) to "erase" pits
- There are several competing DVD writable and re-writable formats, so be
wary
The drive itself may be compatible with a combination of media (e.g. DVD+RW drive can also read and
write CD formats) Optical drives are also characterized by reading and recording speed.
- Because the media are removable (like floppies) their capacities are fixed.
- CDs hold about 650 MB of data. The basic DVD holds 4.7 GB (more focused laser) but this can be doubled by using a second
layer or both sides, and quadrupled by using both.
- Blu-ray holds about 25 GB and that can doubled by using a second layer.
Blue lasers have a shorter wavelength than red and thus tighter focus. This
allows bits to be placed closer together.
- Drive speeds are rated as a multiple of how much faster it reads data compared
to the first generation of CD drives (150 KB per second). A "32X CD-ROM" reads
data up to 32 times faster than the original drives.
- Re-writable drives often have three sets of "X" speeds: the recording speed,
the re-write speed, and the reading (playback) speed (e.g. 6X/4X/24X).
Solid state storage
- They are solid state (no moving parts)
like RAM but are not volatile.
- Commonly known as "flash memory".
- They are re-writable, like a CD-RW.
- Faster than hard drives, slower than RAM
- Their most common use is in digital cameras.
- They are also used in portable USB storage devices
called, variously, "flash drives", "memory sticks", "thumb drives", etc.
- Not totally random-access, data are read/written in large chunks
- Capacities continue to rise as cost per GB falls - about 32 GB and about $3 per GB as of November 2009
A/V subsystem
Video
- system contains video card attached to motherboard
- interface between CPU and monitor
- contains its own specialized CPU called a GPU (Graphics Processing Unit)
- contains its own RAM memory - many MB
- Why dedicated GPU? Circuitry optimized to execute special graphics instructions
- Why dedicated RAM? Improves animation (Monitor pixels get their color values from RAM, so with extra RAM the system can store pixel values
before they have to be displayed. This allows faster pixel refresh. Since the values are computed in advance, all can be displayed
at the same time)
- True color requires 24 bits per pixel (8 bits each for red, green,blue).
This makes 224 = 16.7 million different colors
- Advanced visual features of Windows Vista and 7 require specified minimum GPU/RAM configuration
- To view Graphics properties in Windows XP, right-click on desktop and select Graphics Properties
- Video cards are straightforward to replace
- LCD monitors may have either a VGA (older, analog, sometimes called D-sub) or DVI (newer, digital video) connection. They are not compatible.
- Monitors measured by screen size, measured diagonally
- Monitors also measured by resolution in pixels: width x height (e.g. 1024 x 768).
- To view resolution on Windows XP, right-click on desktop and select Properties then the Settings tab
Audio
- sound cards include a variety of inputs and outputs
- typically microphone input, "line" input, "line" output
- "line" input and output means the signal has a certain strength, compatible with audio equipment
- may need special sound card for specific audio in/out devices
- surround sound is a common feature
Ports
- Some ports covered in sections above
- various video and audio ports described above
- USB for many general purpose devices
- Firewire for many digital video devices
- Ethernet for networking
- Ports for flash memory cards: SD, Compact Flash, xD, etc
- laptops have PCMCIA (aka PC card) ports for external devices