Lecture 2 - The PC and its components

advertisement
Lecture 2
”The PC and its components”
Administration of computer systems, 2009
Lecture goals
• After this lecture you should:
– Be able to identify the main components of a
PC
– Know how to install these components
– Be able to benchmark the performance of the
components
– Be prepared for exercise 1
The modern PC
• Central Processing Unit, CPU
– Executes instructions read from memory, main
system controller
CPU
• Memory
– Stores program instructions and data,
implemented hierarchically
MEM
• Input/Output
– Allows the system to interact with other devices
(humans, other PC’s, floppy drives)
I/O
Working with electronics
• Electrostatic discharge (ESD)
• Electrocution
Electrocution
• Potentially lethal hazard even at low voltages
• Always disconnect the PC from the power
outlet before opening and working on it.
– There may still be components that hold a charge
after disconnection!
• “One-hand rule”, avoid ever creating a circuit
that goes across your chest.
• Never try to open or modify the power supply
Electrostatic discharge
• Damages and destroys components due to
high voltage potential between two surfaces.
• Touch the metal chassis of the PC to lower
the voltage potential.
• Wear an ESD wrist-strap connected to the
chassis
• Store components in ESD-protected bags
Putting a PC together
• The chassis
– Holds all the components of the machine.
– Built to accommodate certain motherboard form
factors
– Larger chassis allows for more internal peripherals,
hard drives, CD drives, expansion cards
Wikipedia
The Power Supply Unit, PSU
• Converts 110-240V AC into 12V and 5V
DC to power the internal devices.
• The PSU must be powerful enough to
power all components connected to it,
often several hundred watts
• Remember: not serviceable
The motherboard
• Connects CPU, memory and I/O together
• Distributes power to attached components
• Defines a set of components that can work
together
Common form factors
viagallery.com
The CPU
• Today usually packaged as a single chip
• Implemented in silicon
• A complex system in itself that contains
– Registers, “small memories”
– Arithmetic Logic Unit (ALU)
– Instruction memory (part of the memory hierarchy)
• Synchronous, all operations take place in synch
with the system clock (frequency measured in
hertz, Hz)
CPU sockets
• Easy removal and installation of CPU
• Most x86 CPU’s are of the socket type
• Slotted CPU’s popular for a while
Wikipedia
Intel Socket 370, pin grid array
Wikipedia
Intel Socket T, land grid array
CPU cooling
• Modern CPU’s generate a lot of heat and
must be cooled.
Wikipedia
Installing a CPU
• Zero-insertion force (ZIF) socket
– Raise lever
– Insert processor
– Lower lever
• Low insertion-force (LIF) socket
– Gently insert processor into socket correctly aligned.
• Apply thermal compound
• Install heat sink and fan
• Connect fan to power source on motherboard
Identifying your CPU
• Software
– Specialized diagnostic tools
– Built in, e.g. the BIOS
– Operating system, e.g. the “Device Manager” in
Windows
• Physical inspection
– Requires removing the heat sink, only do this if you
have thermal compound so that you can reinstall the
heat sink.
• System specification
– System manual
– Manufacturer database, e.g. “Dell Tag”
The memory architecture
• Remember the von Neumann
architecture?
CPU
Data/
Instruction
Memory
• What happens when the CPU speed
(number of instructions/time) increases?
The von Neumann bottleneck
“Surely there must be a less primitive way of
making big changes in the store than by
pushing vast numbers of words back and
forth through the von Neumann
bottleneck“
— John Backus, 1977
Caches
• It turns out that we can exploit instruction
and data locality
• Load chunks of data or instructions that
are close together in slow memory into
smaller faster memory.
CPU
L1
~128 kB
L2
RAM
~256 kB
MB’s
Mix of architectures
Harvard
Von Neumann
L1 I
CPU
L2
L1 D
RAM
Memory types
• Caches
– More expensive (less storage/area), e.g.
Static Random Access Memory (SRAM).
– Typically integrated on-chip, not expandable
• Main memory
– Often expandable using memory modules
– DRAM, SDRAM, DDR SDRAM
• Cache and main memory RAM is volatile,
i.e. loses data when powered off
Memory module form factors
DIP
SIPP
SIMM 30 pin
SIMM 72 pin
DIMM 168 pin
DDR DIMM 184 pin
Installing a RAM module
• Make sure the module is of the right type
for your motherboard.
• Align module so that notches match the
port
• Push gently and close clips at the ends of
the memory port.
Back to the memory hierarchy
• What if the requested data cannot be
found in the main memory?
• Most systems use virtual memory, i.e. the
main memory acts as a cache for
secondary storage, typically hard drives.
• A page fault occurs and the operating
system must load data from HD into RAM
(slow)
Hard drives
• Permanent magnetic storage
• Data is stored by magnetizing parts of
spinning platters.
• Reading and writing is done using a head
for each platter.
• This allows large (hundreds of GB’s) and
cheap permanent storage.
Hard drives
• Drives are connected to other devices on the
motherboard via a bus.
• Common storage device buses
– IDE/ATA, SATA, SCSI
Wikipedia
IDE/ATA
SATA
Communication buses
•Pros and cons of not using a bus
+No sharing
-Not easy to add a new node
-Lot of interconnections
A
B
C
D
•Instead, use a shared communication channel, a bus
+Easy to add new devices
- Devices have to share the communication channel
A
B
C
D
Sharing on the ATA bus
• The (now old) ATA bus allows 2 devices per
host controller
– “device 0 (master)”
– “device 1 (slave)”
• When using 1 device on a cable with 3
connectors
– Set it to “master” or “single” and place it at the end of
the cable (to avoid the “stub”)
• When using 2 devices on a cable with 3
connectors
– Set one to “master” and the other to “slave”
– Or use “cable select” on both devices
Serial ATA
•
•
•
•
SATA/150, 1.5 GB/s transfer speed
SATA/300 3.0 GB/s transfer speed
Compact cables
1 disk per cable, no master/slave
Jumper
• Connector used to form a circuit, acts as
an on/off switch for configuring
motherboards, disk drives, CD-drives etc.
I/O Transfers
• Polling
– The CPU asks an I/O device to prepare some
data for it to read, and then repeatedly checks
to see if the data is available.
• Interrupt-driven
– The CPU asks an I/O device to prepare some
data for it to read, when the I/O device has the
data ready it interrupts the CPU.
Polling I/O
RAM
CPU
HD
Initiate transfer
Data ready?
No
HD fetching data
Data ready?
No
Data ready?
Yes
Transfer data
Write data to memory
Initiate transfer
Interrupt-driven I/O
RAM
CPU
HD
Initiate transfer
HD fetching data
Interrupt: Data ready
Transfer data
Write data to memory
Initiate transfer
Direct Memory Access, DMA
• DMA offloads the CPU when transferring
data into or from the memory
• Hard drive DMA controller can access
secondary storage and memory directly
• Many DMA modes for ATA/IDE
– DMA singleword mode 0-2, multiword mode 0-2
– UDMA mode 0-5
• For UDMA modes 3-5 an 80 conductor cable
is needed
DMA
CPU
DMA-Controller
HD
RAM
Initiate DMA
request
Get bus control
Perform
other
work
Transfer data
Release bus
Notify CPU of
error/success
The northbridge and southbridge
CPU
Northbridge
PCI
Southbridge
Memory
Bus
Memory
AGP
PCIExpress
Front-Side
Bus (FSB)
ATA/IDE
SCSI
USB…
Intel 810 Chipset
Intel
Peripheral buses
• Peripheral Component Interconnect, PCI
– Allows expanding computer functionality
• PCI devices are typically identified by a
vendor and device code
– Vendor 0x10DE = NVIDIA
– Device 0x0110 from NVIDIA = Geforce
graphics card
• PCI vendor/device number database
– http://www.pcidatabase.com
Benchmarking
• Systems cannot be compared based on
just their specifications
• Running a set of operations to get a
relative performance measure
– Synthetic
– Application-based
• Pitfalls
– Comparing different benchmarks
– Non-representative benchmarks
Review
• Safety
– ESD/Electrocution
• PSU, MoBo, CPU
• Memory
– Hierarchy, main memory, cache, virtual mem.
• I/O
– Transfer modes
Exercise 1
• Start working on the preparatory questions
• Sign up for an exercise session at the
course web page
Download