DOC PREVIEW
U of I CS 232 - Introduction to I/O

This preview shows page 1-2-3-24-25-26 out of 26 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Introduction to I/OI/O is slow!Common I/O devicesHard drivesNetworksI/O PerformanceBack of the Envelope CalculationAccessing data on a hard diskEstimating seek timeEstimating rotational delayEstimating transfer timeParallel I/OComputer busesHierarchical busesBasic bus protocolsWhat is the bus anyway?Multiplexed bus linesExample bus problemsExample Bus Problems, cont.Synchronous and asynchronous busesBuses in modern PCsPCIFrequenciesThe North BridgeExternal busesThe Serial/Parallel conundrum1Introduction to I/OComputers communicate with the outside world via I/O devices—Input devices supply computers with data to operate on—Results of computations can be sent to output devicesThere are two main ingredients to I/O systems—Devices: e.g. hard drives, CD drives, keyboards, printers, display—Buses: these connect devices to each other and to the processorToday and Friday we’ll talk about I/O system issues—I/O performance affects the overall system speed—We’ll look at some common devices and factors affecting their performance—We’ll look at how I/O devices are connected: by buses2I/O is slow!How fast can a typical I/O device supply data to a computer?—A fast typist can enter 9-10 characters a second on a keyboard—Common local-area network (LAN) speeds go up to 100 Mbit/s, which is about 12.5MB/s—Today’s hard disks provide a lot of storage and transfer speeds around 40-60MB per secondUnfortunately, this is excruciatingly slow compared to modern processors and memory systems:—Modern CPUs can execute more than a billion instructions per second—Modern memory systems can provide 2-4 GB/s bandwidthI/O performance has not increased as quickly as CPU performance, partially due to neglect and partially to physical limitations—This is changing, with faster networks, better I/O buses, RAID drive arrays, and other new technologies3Common I/O devicesHard drives are almost a necessity these days, so their speed has a big impact on system performance:—they store programs, media, etc.—Virtual memory systems: hard disk acts as a large (but slow) part of main memoryNetworks are also ubiquitous nowadays—access to data from around the world—Hard disks can act as a cache for network data! For example, web browsers often store local copies of recently viewed web pagesMany computing tasks are I/O-bound, and the speed of the input and output devices limits the overall system performance (Amdahl’s Law)4Hard drivesFigure 8.4 in the textbook shows the ugly guts of a hard disk—Data is stored on double-sided magnetic disks called platters—Each platter is arranged like a record, with many concentric tracks—Tracks are further divided into individual sectors, which are the basic unit of data transfer—Each surface has a read/write head like the arm on a record player, but all the heads are connected and move togetherA 75GB IBM Deskstar has roughly:—5 platters (10 surfaces),—27,000 tracks per surface,—512 sectors per track, and—512 bytes per sectorPlatterTrackPlattersSectorsTracks5ping www.uiuc.edu : time=0.275 msping www.stanford.edu: time=68.4 msping www.tu-berlin.de: time=140 msping www.uiuc.edu : time=0.275 msping www.stanford.edu: time=68.4 msping www.tu-berlin.de: time=140 msNetworksWhen communicating over a network, data is broken into a collection of “packets”Internet:—Each packet carries ~1kB of data—Packets are reassembled into the original message at the destinationIt takes time for bits to travel across states, countries and oceans!6There are two fundamental performance metrics for I/O systems:1. Latency: the time taken for the smallest transfer (units = time)—This is a primary concern for programs that do many small dependent transfers2. Bandwidth: the amount of data that can be transferred in unit time (units = bytes/time) —This is a primary concern for applications which transfer large amounts of data in big blocks—If you download large files over Kazaa, bandwidth will be the limiting factorI/O Performance7Back of the Envelope CalculationBecause data transmission can be pipelined, the total time to get data can be estimated as:Time = latency + transfer_size / bandwidth sec bytes / (bytes/sec)Dominant term forsmall transfersDominant term forlarge transferslatency8Accessing data on a hard diskAccessing a sector on a track on a hard disk takes a lot of time!Factors affecting latency:—Seek time measures the delay for the disk head to reach the track—A rotational delay accounts for the time to get to the right sectorFactors affecting bandwidth:—The transfer time is how long the actual data read or write takes. We usually assume that the disk can read/write as fast as it can spin. Thus, the transfer time is determined by the rotational speed (measured in revolutions per minute or RPM), which also determines the rotational delay9Estimating seek timeManufacturers often report average seek times of 8-10ms—These times average the time to seek from any track to any other trackIn practice, seek times are often much better—For example, if the head is already on or near the desired track, then seek time is much smaller. In other words, locality is important!—Actual average seek times are often just 2-3ms10Estimating rotational delayOnce the head is in place, we need to wait until the right sector is underneath the head—This may require as little as no time (reading consecutive sectors) or as much as a full rotation (just missed it)—On average, for random reads/writes, we can assume that the disk spins halfway on averageRotational delay depends on how fast the disk platters spin:Average rotational delay = 0.5 rotations / rotations per minute—For example, a 5400 RPM disk has an average rotational delay of:0.5 rotations / (5400 rotations/minute) = 5.55msThe average latency is the sum of the average seek time and the average rotational delay11Estimating transfer timeAssume a disk has the following specifications—An average seek time of 11ms—A 5400 RPM rotational speed—A 10MB/s average transfer rateHow long does it take to read a random 1,024 byte sector?—The average rotational delay is 5.55ms—Thus, the average latency is 11 + 5.55 = 16.55msThe transfer time will be about (1024 bytes / 10 MB/s) = 0.1msIt thus takes 16.55ms + 0.1ms = 16.7ms to read a random sector—That’s 16,700,000 cycles for a 1GHz


View Full Document

U of I CS 232 - Introduction to I/O

Documents in this Course
Goal

Goal

2 pages

Exam 1

Exam 1

5 pages

Exam 1

Exam 1

6 pages

Exam 2

Exam 2

6 pages

Exam 1

Exam 1

5 pages

Load more
Download Introduction to I/O
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to I/O and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to I/O 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?