The von Neumann Architecture CPU PC
IT 3123 Hardware and Software Concepts
Accumulator
IR
Control Unit MAR
Review March 29
ArithmeticLogic Unit
MDR
I-O
Command
Main Memory Notice: This session is being recorded.
Copyright © 2005 by Bob Brown
Main Memory Main memory is short-term storage • Holds programs and data for running processes • Does not (usually) hold data for processes that are not running • Contents are lost when power is turned off. • Is not generally thought of as “storage.”
• • • •
Peripherals Devices that are separate from the basic computer Not the CPU, memory, power supply Classified as input, output, and storage Connect via • Ports • parallel, USB, serial
• Interface to system bus • SCSI, IDE, PCMCIA
Storage Speed • Measured by access time and data transfer rate • Access time: average time it takes a computer to locate data and read it • millisecond illi d = one-thousandth h d h off a second d
• Data transfer rate: amount of data that moves per second
Hierarchy of Storage Device
Access Times Transfer Rate
CPU Registers
½ nanosecond
Cache memory
10-30 ns
Main memory
50-100 ns
Hard disk
10-50 ms.
600k-6m/sec
Floppy disk
100 ms.
100-200k/sec
CD-ROM
100-600 ms
500k-4m/ sec
Tape
½ sec up
11m /sec
1
Sequential and Direct Access • Sequential access: You must pass over all prior data to reach a given piece of data; tape devices (music and computer) are sequential access. • Direct Di t access: Access A tto any bl blockk off data d t on the medium takes “about as long” as access to any other; disks, CD-ROM, and DVD are direct access. • Compare “direct access” to “random access.”
Disk Access Time • Average Seek Time: average time to move from one track to another • Average Latency Time: average time to rotate to the beginning of the sector = ½ * 1/ 1/rotational t ti l speedd • Transfer Time: 1/(# of sectors * rotational speed) • Total Time to access a disk block: Seek Time + Latency Time + Transfer Time
Redundant Disks
Magnetic (Hard) Disks
A “sector” is a physical portion of a track on the disk. A “block” is the data written in a sector. Often used interchangeably.
About “Head Crashes” • Disk heads “fly” a few thousandths of an inch from the disk surface on an air bearing created by the spinning disk. • The disk is moving very fast. • If the head touches the disk, it can abrade the magnetic material; this is a “head crash.” • The magnetic material is destroyed, and the debris causes other head crashes.
RAID 5
• If redundant (duplicative) data are stored on two or more disks, the failure of any single disk will not cause data loss. • RAID = redundant array of inexpensive di k disks. • “Levels” of RAID • RAID 1: Mirrored disk volumes • RAID 5: Bits of each data word duplicated
across three or more drives. Image Courtesy of Sun Microsystems
2
Networked Storage • File servers: general-purpose computers with software that makes their disks accessible over the network • Network Attached Storage (NAS): S i l Special-purpose appliances li that th t workk like lik file servers • Storage Attachment Network (SAN) large arrays of disks are apportioned to many CPUs. Attachment is fiber or fast Ethernet.
Displays • Pixel: A single colored dot on the screen, contraction of “picture element.” Also called “pel.”
Picture Size • How many pixels? • 640 x 480 = 307,200 • 1280 x 1024 = 1,310,720
Colors • Additive colors: red, green, blue • Number of bits/color determines how many colors can be displayed • 4 bits = 16×16×16 = 4,096 colors (212)
• How many bits per pixel?
• 8 bits = 256×256×256 =16.7 million colors
• 24 bits x 1,310,720 = 31,457,280
(224)
(about 8MB)
Printers • Dots vs. pixels • 300-2400 dpi vs. 70-100 pixels per inch • Dots are on or off, pixels have intensities • Types • Inkjet – squirts heated droplets of ink • Laser – xerographic imaging • Thermal wax transfer Color technologies • Dye Sublimation • Older technologies
}
Communications and Networking • • • • • •
MODEM DSL Cable modem Ethernet High-speed networking Wireless networking
• Dot matrix, fully-formed characters
3
MODEM
Digital Subscriber Line • Both analog (low frequency) and digital (high frequency) signals on one pair of wires • Network connection is always on. • Phone conversations are possible while network traffic is present • Speeds to 6+ mbps
• MOdulator/DEModulator: Alters (modulates) an audible signal to encode digital information • Operates over the dial network; the phone li is line i busy b when h in i use for f data. d t • Theoretical maximum speed: 64 kbps • Practical maximum: 52 kbps
Multiplexor Data
Splitter Subscriber Premises
Voice Telephone Office
Cable Modem
`
Ethernet
• One or more “channels” on the cable are devoted to data • Speeds up to 6 or more mbps • Multiple subscribers on one connection (a possible security problem)
• A local-area networking technology • 10, 100, or 1000 mbps • Multiple-access (more than two devices on the same wire) CSMA/CD • Switched access: each device is connected to a switch and isolated from other devices.
http://it.csumb.edu/services/cablemodem/nodes.html
PC Organization Clock
CPU
Cache Contr.
Cache Memory
Mainframe Organization
Main Memory
On-chip cache
Disk Interrupt Contr
DMA Contr
PCI Bridge
Disk Contr
PCI Bus
4
Improving Performance • • • • •
Faster clock speeds Faster buses and circuits Wider instruction and data paths More and faster memory Faster disks
Multiprocessing • Motivation • Faster computing
Definitions • Multiprogramming: Two or more programs running concurrently on one computer. • Multiprocessing: A computer has two or more processors (CPUs). (CPU )
Tightly Coupled Systems • Shared memory and I-O • Two ways to configure:
• More processing power
• Master-slave multiprocessing
• Parallel processing
• Symmetric multiprocessing (SMP)
• Coupling of Processors • Tightly coupled • Loosely coupled
Tightly-Coupled Systems
Master-Slave Multiprocessing One CPU is the “Master” • Manages the system • Controls all resources and scheduling • Assigns tasks to slave CPUs
5
Symmetric Multiprocessing • Each CPU has equal access to resources • Each CPU determines what to run using a standard algorithm • Advantages • High reliability • Fault tolerant support is straightforward • Balanced workload
• Disadvantages • Resource conflicts – memory, I/O, etc.
Loosely-Coupled Systems • Clusters or multi-computer systems • Each system has its own CPU, memory, and I/O facilities • Advantages: Fault-tolerant, scalable, well balanced, distance is not (much of) an issue • Two ways to configure • Shared-nothing model • Shared-disk model
• Complex implementation
Beowulf Clusters • • • •
Simple and highly configurable Low cost Loosely Coupled Computers connected to one another by a private Ethernet network • Connection to an external network is through a single gateway computer
Computer Interconnection • Communication channel – pathway for data movement between computers • Point-to-Point connectivity • Communication channel that passes data directly
between two computers • Serial connection • Telephone modem • Terminal controller – handles multiple point-to-point connections for a host computer
Parallel Computers • Massively parallel architectures • Hundreds to millions of CPUs • CPUs have small amounts of local memoryy • All CPUs have access to global shared memory • Pipelined CPUs • Results from one CPU flow to the next CPU for additional processing
Client-Server Architecture • Computer servers provide services • File storage, databases, printing services,
login services, web services
• Client computers • Execute programs in their own memory • Access files either locally or files on a
server
• Multipoint connectivity • Shared communication channel
6
Local Area Network (LAN) • A collection of networked computers and other devices (printers, routers, hubs) • Communication characteristics: • Shared medium • High speed (10, 100 or more megabits) • All connections the same speed (about)
• Department, building, campus, etc. (“local”)
The Idea of a “Protocol Stack” The Internet model is slightly different from and simpler than the OSI model. The OSI Model 7. Application Layer 6 Presentation layer 6. 5. Session Layer 4. Transport Layer 3. Network Layer 2. Data Link Layer 1. Physical Layer
The Internet Model SMTP, HTTP, telnet, etc. TCP or UDP Internet Protocol (IP)
Protocols • Protocols are rules for communicating • TCP/IP: Transmission Control Protocol / Internet Protocol; the basic transport protocol of the Internet. • HTTP: Hypertext Transfer Protocol; the protocol of the World Wide Web. Uses TCP/IP for transport. • So, TCP/IP is a “lower level” protocol and HTTP is a “higher level” protocol.
LAN Topology • Arrangement of workstations in a shared medium environment • Logical topology (data flow) • Physical topology (cabling scheme) • Current topologies • Physical and logical star • Physical star, logical ring
Ethernet, WAN protocols, etc.
Ethernet MAC Protocol • MAC – Medium Access Control • Ethernet and CSMA/CD • Carrier sense multiple access with collision detection • Four step procedure • Listen; if medium is idle, transmit • If medium is busy, listen until idle and then transmit • If collision is detected, cease transmitting • After a collision, wait a random amount of time before re-transmitting • Why random time?
Switched Ethernet • The switch “port” is a device in each collision domain. • The switch identifies packets that need to go to other segments. • All traffic on a segment originates or terminates on that segment • Modern network: Only one device per segment. All devices talk only to the switch; no collisions are possible.
7
Token Ring MAC Protocol • Token “seized” by changing a bit on the circulating frame to indicate start of frame rather than token • Default configuration requires sender to complete transmission and begin receiving t transmitted itt d frame f before b f releasing l i the th token t k • “Early token release” allows release of token after transmission but before receipt of frame • Better performance on high demand because no collisions are possible.
Wide Area Networks • Circuit switching: Dedicated channel between source and destination for duration of connection • Packet switching: An independent path is created for each network packet (datagram) • Virtual circuit: A route is created from source to destination before transmission begins and all datagrams are sent using the same route • Virtual Private Network (VPN): A packetswitched network in which encryption keeps data secure.
The Web is not The Internet
Routers • Connect dissimilar networks or dissimilar address spaces • Convert format of the message to correspond to the protocol of the other network t k • Network traffic is specifically addressed to the router • Connect LANs to wide-area networks
The Internet A “Network of Networks”
• A common address space • A common name space • A collection of common communication protocols
Communication Channel
• The Internet • • • •
A network of networks A common name space A common address space A collection of common communication protocols
• The World Wide Web • A protocol and a markup language • Software and servers • A vast collection of linked documents Copyright 2010 John Wiley & Sons, Inc.
48
8
Communication Channels:
Signaling Transmission Method
Many Ways to Implement
Choice depends on medium and signal characteristics:
• Signal: specific data transmitted • Diagram shows a multi-link channel connecting a computer and a wireless laptop
•
Analog
•
Discrete
•
Digital
•
•
• Physically: signal passes through different channel forms
including audio, digital, light, radio • Converters between separate channel links
• • •
Signal takes on a continuous range of values Signal takes on only finite, countable set of values Binary discrete signal Frequently preferred because less susceptible to noise and interference Can be regenerated
“On the wire,” all signals are analog
Copyright 2010 John Wiley & Sons, Inc.
49
50 Copyright 2010 John Wiley & Sons, Inc.
Multiplexing
Signaling Technology
• Carrying multiple messages over a channel simultaneously
• Signal carriers • Electrical voltage
• TDM (time division multiplexing)
• Electromagnetic radio wave
• Example: packet switching on the Internet • Use: digital channels
• Switched light
• FDM ((frequency q y division multiplexing) p g)
• Data are represented by changes in the signal as a function of time
• Example: Cable TV • Analog channels
• Synchronized switches or filters separate different data signals at receiving end
Copyright 2010 John Wiley & Sons, Inc.
51
Copyright 2010 John Wiley & Sons, Inc.
Analog Signals • • • • •
Sine Waves
Wireless networking Most telephones Satellites Microwave communications R di andd soundd Radio
• Common natural occurrence • Basic unit of analog transmission • Amplitude: wave height or power • Period: amount of time to trace one complete cycle
of the wave • Wavelength : distance spanned by a sine wave in
• Radio waves can be converted to electrical
space
signals for use with wire media for mixed digital and analog data. Example: Cable TV with digital Internet feed
• Frequency: cycles per second, i.e., number of times
sine wave repeated per second • 1 Hertz = 1 cycle/sec (now defined as inverse time)
• “On the wire,” all signals are analog. Copyright 2010 John Wiley & Sons, Inc.
52
• Unit of bandwidth for signaling 53
Copyright 2010 John Wiley & Sons, Inc.
54
9
Sine Wave
Phase-Shifted Sine Waves Difference, measured in degrees, from a reference f sine i wave
f = 1/T
f is the frequency of the sine wave and where T is the period measured in seconds
λ=c/f
λ is the wavelength of the sine wave and c is the speed of light Copyright 2010 John Wiley & Sons, Inc.
55
Copyright 2010 John Wiley & Sons, Inc.
Waveform Representation • All can be represented as the sum of sine waves of different frequencies, phases, and amplitudes • Spectrum: frequencies that make up a signal • Bandwidth: range of frequencies passed by the channel with a small amount of attenuation • Filtering: controlling the channel bandwidth to prevent interference from other signals
Copyright 2010 John Wiley & Sons, Inc.
57
Signal Frequencies
Creating a Square Wave from Sine Waves
Copyright 2010 John Wiley & Sons, Inc.
58
Sine Waves as Carriers
• Sound waves: approximately 20 Hz to 20 KHz
• A single pure tone consists of a sine wave
• Stereo systems: 20-20,000 Hz for high fidelity
• The orchestral note middle A is a 440-Hz sine wave
• Phones: 400-4000 Hz for voice but limits speed for data
• Electromagnetic radio waves: 60 Hz to 300 GHz
• To represent the signal modulate one of the three characteristics – amplitude, frequency, p phase
• AM radio: 550 KHz to 1.6 MHz
• 20 KHz bandwidth centered around dial frequency of the station • FM radio: 88 MHz to 108 MHz
• Example: AM or amplitude modulated radio station
• 100 KHz bandwidth per station
at 1100 KHz modulates amplitude of the 1100 KHz sine wave carrier
• TV: 54 MHz to 700 MHz
• >4.5 MHz bandwidth per channel • Cell phones, Wi-Fi wireless networks: 800 MHz to 5.2Ghz
Copyright 2010 John Wiley & Sons, Inc.
56
• Demodulator or detector restores original waveform, or close to it.
59
Copyright 2010 John Wiley & Sons, Inc.
60
10
Amplitude Modulations
Copyright 2010 John Wiley & Sons, Inc.
Modulating Digital Signals
61
Copyright 2010 John Wiley & Sons, Inc.
Frequency Division Multiplexing
62
Time Division Multiplexing • TDM - multiple signals share channel
Optical form of frequency division multiplexing (FDM) is known as wavelength division multiplexing (WDM) Copyright 2010 John Wiley & Sons, Inc.
63
Copyright 2010 John Wiley & Sons, Inc.
A-to-D: Pulse Code Modulation 1. Analog waveform sampled at regular time intervals (Remember Nyquist?) •
Maximum amplitude divided into intervals •
Example: 256 levels requires 8 bits/sample
Copyright 2010 John Wiley & Sons, Inc.
65
64
A-to-D: Pulse Code Modulation 1. Analog waveform sampled at regular time intervals (Remember Nyquist?) •
Maximum amplitude divided into intervals •
Example: 256 levels requires 8 bits/sample
Copyright 2010 John Wiley & Sons, Inc.
66
11
Digital Signal Quality
Bandwidth • Digital signals: sum of sine waves of different frequencies • Higher frequencies: higher data rates • Channel with wider bandwidth has higher data rates • Data rates usually measured in bits per second
• Subject to noise, attenuation, distortion like analog • Signal quality less affected because only necessary to distinguish 2 levels • Repeaters • Recreate signals at intervals • Use: transmit signals over long distances
• Error correction techniques available
Copyright 2010 John Wiley & Sons, Inc.
67
Digital Subscriber Line
Copyright 2010 John Wiley & Sons, Inc.
68
Transmission Media • Means used to carry signal • Characterized by • Physical properties • Signaling method(s)
Bandwidth Sensitivity to noise
• Guided (or “bounded”) media: confine signal physically h i ll to some kind ki d off cable bl • Unguided (unbounded) media: broadcast openly • Signal-to-noise ratio
Three “bands” of data on one transmission medium.
• Higher ratio for given bandwidth increases data
capacity of the channel
Copyright 2010 John Wiley & Sons, Inc.
69
Copyright 2010 John Wiley & Sons, Inc.
Wireless Networking
70
Wi-Fi
• Wi-Fi (wireless Ethernet)
• Access point
• Short-range, local area networking
• Hub for wireless devices • Router between wireless and wired devices
• WiMAX, cellular telephone technology
• Forwards packet to destination station
• Competing versions of longer range
wireless networking
• CSMA-CA
• Bluetooth
• Collision avoidance, not collision detection!
• Personal level networking
• Optional “request-to-send” and “clear-to-
send” packets reserve a time for a packet.
Copyright 2010 John Wiley & Sons, Inc.
71
Copyright 2010 John Wiley & Sons, Inc.
72
12
Questions
13