Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Peripherals
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 2 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Topics I/O & System performance Types & characteristics of I/O devices Examples of I/O devices Networking & Networking protocols Buses: Types, communication protocols, & performance
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 3 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Devices Wide diversity – Keyboard – Monitor – Printer – Magnetic disk – CD-ROM – Modem / other communication interface – Magnetic tape – Scanners – Sound card – Analog/Digital converter
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 4 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Devices Different needs for interfacing Online connection: – Device controlled directly by CPU Peripheral: – Device attached to computer
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 5 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Introduction Characteristics of I/O systems are driven by technology I/O systems differ from processors – Processor designers focus primarily on performance – I/O designers consider performance & other issues (e.g. expandability, ability to recover & return to original form or position)
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 6 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Introduction Performance for I/O system is more complex than for processor. It depends on many aspects: – Device characteristics – Access latency – Throughput – Connection between devices and the system – Memory hierarchy – Operating system
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 7 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Introduction – The connections between I/O devices, processor, & memory are called buses – Communication among the devices & processor use protocols & interrupts
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 8 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Introduction Why is I/O research neglected? – Difficulties in assessing and designing I/O systems – Courses in every aspect of computing often ignore I/O or give it insufficient coverage – Textbooks leave the subject to near the end, making it easier to skip I/O research is important – I/O capability is one of the most distinctive features of a machine – As networking becomes important, I/O will increasingly become important => Ignoring I/O is dangerous
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 9 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Impact of I/O on System performance Example – Assume having a benchmark that executes 100 seconds 90 seconds is CPU time, rest is I/O time CPU time improves by 50% per year – How much faster will the program run after 5 years? Elapsed time= CPU time + I/O time 100 = 90 + I/O time I/O time = = 10 After n yearsCPU time I/O time Elapsed time % I/O % 160 (90/1.5)107014% 240 (60/1.5) % 327 (40/1.5) % 418 (27/1.5)102836% 512 (18/1.5) %
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 10 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Assessing I/O Performance Depends on application – Super computer: Long streams of data – Text processing Large number of small, unrelated I/O operations What is important – Throughput? Need to measure I/O bandwidth – Response time? – We can’t have a system that is optimal in both throughput & response time Compromise is required
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 11 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Assessing I/O Performance How do we measure – Use benchmarks I/O Benchmarks are available for testing the following: – Disk system – Supercomputers – Transaction processing – File system –...
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 12 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Assessing I/O Performance Disk System Benchmarks – Performance is affected by Disk technology How disks are connected Memory system Processor File system (provided by OS) – Performance depends on transfer rate Measured in MB/sec Uses base 10 (as opposed to main memory - uses base 2)
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 13 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Assessing I/O Performance Supercomputer Benchmarks – Run batch jobs – A job can last for hours – I/O consists of large read, followed by writes to snapshot the computation (for backup) => Performance measure is data throughput # bytes / sec transferred between the supercomputer’s main memory & disk
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 14 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Assessing I/O Performance Transaction processing (TP) I/O Benchmarks – Examples: Banks – I/O accesses are small – Concerned with I/O rate (#disk accesses / sec) Security of transaction (not lost or sabotaged) Minimized cost – Involve changes to large databases => Performance measure is both throughput & Response time
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 15 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Assessing I/O Performance File System I/O Benchmarks – File systems stored on disks have different access pattern – Example: Engineering environment for UNIX file system (study) 80% accesses to files are < 10 KB 90% all file accesses data in sequential addresses 67% of accesses were “reads” 27% of accesses were “writes” 6% of accesses were “modify” => Performance measure depends on type of workload
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 16 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Types & Characteristics of I/O Devices I/O devices can be distinguished by – Behavior: Input (read once) Output (write only) Storage (read/write) – Communication partner: Who is at the other end? (Human, machine) – Peak communication (Data) rate: Peak rate at which data can be transferred between I/O device & memory or processor – Note: A network can be counted as input & output, but not storage
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 17 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Types & Characteristics of I/O Devices
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 18 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Example: Keyboard Manually controlled One of the slowest devices Collection of keys A scan (2-dimensional) matrix is used to detect which key is pressed A decoder drives the X-lines and a multiplexor Is attached to the Y-lines Micro-controller controls both the decoder & MUX and periodically scans the values generated 2 codes generated for each key: – Make code: When key is depressed – Break code: When key is released
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 19 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Device Example: Disk Drives Intermediate speed Nonvolatile Read & Write capability Information stored serially Multiple platters magnetized in 1 or 2 surfaces Read/Write head for each surface Concentric tracks Cylinders formed from same tracks from all platters Sectors contain equal number of bytes ( 256 to 4K bytes) Some spare sectors are reserved to replace defective sectors Byte address defined by giving – Cylinder # – Head # – Sector # – Word offset within sector Platt e rs T r a c k S ecto rs Plat te r T r acks
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 20 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Example of what not to do
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 21 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Device Example: Disk Drives Steps to access data: – Seek: position head over the proper track (8 to 20 ms. avg) – Rotational latency (delay): Time needed to move head from current cylinder to desired cylinder Wait for desired sector (~0.5 / RPM) – Transfer: Get the data (one or more sectors) 2 to 15 MB/sec Transfer rates are MB/sec (1997) Most disk transfers are in blocks (multiple sectors)
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 22 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Device Example: Disk Drives Disk controller: – Handles the transfer between disk & memory Controller time: – Overhead taken by the controller to access & output data Waiting time: – Time wasted if other processes are using the disk
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 23 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Device Example: Disk Drives Disk manufacturers report – Minimum, – Maximum, – and Average seek times Actual average seek time can be 25% to 30% of the advertised value, – Locality of disk references => Time to perform I/O = Seek + Rotation + Transfer + Controller time + Wait time
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 24 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Device Example: Disk Drives Exercise: – What is the average time to read or write a 512-byte (0.5 KByte) sector for a disk that rotates at 5400 RPM? – Assume Advertised seek time= 12 ms Transfer rate = 5 MB/sec Controller overhead = 2 ms Disk is idle (waiting time = 0) Measured average seek time is 25% of advertised average
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 25 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) I/O Device Example: Disk Drives Exercise: Calculations: Measured seek time = 12 x 0.25 = 3 ms Rotation (average) time = 0.5 rotation / 5400 RPM = (0.5)/ (5400/60 sec/min) = 5.6 ms Transfer time = (0.5 KB)/ (5 MB/sec) = 0.1 ms Time to perform I/O (Using advertised average)= = 19.7 ms Time to perform I/O (Using measured average) = = 10.7 ms
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 26 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) (Interconnection) Networks Major inter-computer communication medium Transfers messages (packets) between network components Network components could be – CPU – Memory – Switches: A group of input and output ports – Links: Wires connecting ports
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 27 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) (Interconnection) Networks Key characteristics: – Distance: ,000 km – Speed: MB/sec – Topology:bus, ring, star, tree – Shared lines:None (point-to-point), shared (multi- drop) – Dimensionality: Number of choices available to get from source to destination
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 28 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Network (Switching) Topology Geometric arrangement of computer systems Describes how links & switches are arranged Lines represent links Nodes represent switches Memory & CPU are typically attached to switches by interfaces Topologies can be mixed
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 29 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Type of topologies Bus Star Ring Tree Grid Full Other topologies: – Double tour – Cube – Hypercube
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 30 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Network (Switching) Topology Bus topology – All devices connected to a central cable called “bus” or “backbone” – Used by Ethernet systems – Advantages Inexpensive Easy to install for small networks Bus/ Back-plane
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 31 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Network (Switching) Topology Star topology – Zero dimension – A central switch to which all nodes are connected – Used by standard twisted-pair Ethernet – Advantages: Simple design Easy to install & manage Malfunctioning non-central node does not affect the rest of the network – Disadvantages: Central switch can be a major bottleneck Single failure at central switch destroys whole system
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 32 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Network (Switching) Topology Ring Topology – One dimensional – Devices connected in a closed loop shape – Advantages: High bandwidth Span large distances, since each node regenerates messages as they pass through it – Disadvantages: Relatively expensive Difficult to install (compared to star)
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 33 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Network (Switching) Topology Tree Topology – Zero dimensional – Top node is bottle-neck Grid Topology – Two-dimensional – Used in many commercial systems – Can be easily up-scaled
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 34 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Network (Switching) Topology Complete ( Full ) interconnection – Zero-dimensional – Maximizes bandwidth – Exceedingly fault-tolerant – Expensive – Number of Links for k nodes = k(k-1)/2
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 35 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Types of Networks Terminal (point-to-point) Network Local-area Network (LAN) Switched Network Wide Area (Long-Haul) Network (WAN) Massively Parallel Processor (MPP)
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 36 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Types of Networks Terminal (point-to-point) Network – Features: KBit/sec Central computer connected to several terminals (star shape) Each terminal meters from the computer Advantages: – Inexpensive dedicated wires Disadvantages: – Slow Making a comeback
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 37 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Local-Area Network (LAN) Features: – Use either ring or bus topology – One-wire bus – Mbit/sec (now up to 1 Gbit/sec) – Messages (packets) sent in blocks ( byte) – Twisted-wire pair, coaxial cable or optical fiber – Bit-serial transmission – Multiple masters & an arbitration scheme to determine who gets control (discussed later)
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 38 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Local-Area Network (LAN) Advantages – No central control Disadvantages: – Limited bandwidth – Single-shared path Only one sender/message can be transmitting at any time – Response time & throughput can degrade rapidly at higher utilization
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 39 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Switched Network – Uses switches to reduce number of hosts per Ethernet segment – Hosts directly connected to switches – Common in WANs
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 40 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Switched Network Packet Switching – Variable-length packets – Packets sent over separate paths to destination node – Destination re-assembles the packets into a message & gives it to host – Packet includes: Source & destination device address Data start delimiter Data Data end delimiter
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 41 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) WAN / Long-Haul Network e.g. ARPANET – Transports over long distances (10-10,000 km) – Internet predecessor – Copper & coaxial cables – Data transfer 56 Kbits/sec – Point-to-point lines leased from telephone companies – Host computer talks to an interface message processor [IMP] Uses packet switching approach: – IMP at source breaks message into 1-Kbit packets – IMP at destination re-assembles packets
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 42 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) The Internet, eh Features: – Switched networks – Very high bandwidth – Use TCP/IP protocol stack – Copper, coaxial, or fiber optic cables – 100Mbit/sec - 1Gbit/sec – Time needed by a network for data transmission Transmission time = # transmitted bytes / Bandwidth Bandwidth = # bytes per seconds – Interconnect latency – HW latency to/from network – SW overhead for sending/receiving
OCC - CS/CIS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 43 OCC-CS 116 Fall Morgan Kaufmann Publishers (Augmented & Modified by M.Malaty and M. Beers) Next time, in Computer Architectures Protocols Buses