1 / 27

IT253: Computer Organization

Tonga Institute of Higher Education. IT253: Computer Organization. Lecture 13: Input/Output. Input/Output. Input and output allows people to work with computers. It includes many parts: keyboard, mouse, printer, hard drive, network card…. I/O Examples. Storage Devices.

rjanelle
Download Presentation

IT253: Computer Organization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tonga Institute of Higher Education IT253: Computer Organization Lecture 13: Input/Output

  2. Input/Output • Input and output allows people to work with computers. • It includes many parts: keyboard, mouse, printer, hard drive, network card…

  3. I/O Examples

  4. Storage Devices • The hard disk is an I/O device. • It is long-term storage that is a slow, but still a valuable part of the memory hierarchy

  5. Organization of Magnetic Disk • Most of the time, a hard disk will have: • 500-2000 tracks per platter • 32 – 128 sectors per track (a sector is the smallest amount of data that can be read or written) • Usually all tracks have same number of sectors, but sometimes they are different because it might be faster to get to one spot on the hard disk than another

  6. Characteristics of Magnetic Disks • Cylinder – the word for all the tracks that can be read by the read/write head in the spot that the read/write head is in • Reading and Writing data takes 3 steps • Seek time – move the head to the correct place • Rotational latency – wait for the platter to spin so that the right sector is underneath the head • Transfer time – time it takes to transfer a sector from the head

  7. Characteristics of Magnetic Disks • Rotational Latency • Most disks rotate at 3,600 RPM to 10K RPM (rotations per minute). About 3.5 ms to 16 ms for one rotation • Transfer time depends on: • Transfer size (usually 1 KB sectors) • Rotation speed • Recording density (how many bits you can fit in one square inch) • Diameter of the platter • Usually you can get 2 – 12 MB of data transferred a second

  8. Disk Access • Access time = queue + seek + rotational + transfer + overhead • Queue – the request has to wait for other things to finish first • Seek time – move arm of head over track • Rotational latency – wait for platter to spin to right place • Transfer time – the number of bits you get a second

  9. Disk Access Example • Parameters: • Transfer size: 8MB • Advertised average seek is 12 ms • Disk spins at 7200 RPM • Transfer rate is 4 MB • Average rotational delay: 4 ms • Controller overhead: 2 ms • What is average disk access time for a sector? • Avg seek + avg rotate delay + transfer time + overhead • 12 ms + 4 + 8 MB/4 MB/s + 2 ms • 12 + 4 + 2 + 2 = 20 ms • Advertised rate was 12 ms, but really 20 ms. The real rate is usually about only ¼ as fast as the advertised rate.

  10. Alternative Storage • DRAM as hard disk – you could use DRAM as your hard disk, but you would need the power to be on all the time, and it would be expensive, but very fast • CD-ROM – read only • CD-RW – read and write • Magnetic tape – • Sequential access, very slow, very big in size. Tera or peta bytes of data

  11. Buses: Connecting I/O to Processor • A bus is a communication link between devices • It is usually a set of wires that will connect to many things all at once (between different inputs and outputs and the processor and memory)

  12. Goods things about Buses • Why do we need buses? • Allows us to add new devices easily • Allows us to move parts from one computer to another if they use same bus type • Lower cost because we only use one set of wires to connect all the pieces

  13. Bad things about buses • Buses can also introduce a few problems for computers • They create a communication bottleneck. • Things may not be able to send and get data as fast as possible because it has to wait for other things to use the bus • Maximum speed of a bus is determined by: • Length of bus • How many devices are on the bus • How many devices it has to work with (different devices will have different speeds for sending and getting data

  14. Bus Organization • A bus will have two wires, one for control of the bus and one for sending data • Control Lines: • Carries requests and acknowledgements for who wants to use the bus • Tells what kind of data is being sent on the bus • Data Lines: • Carries data between source and destination

  15. Master/Slave Bus Organization • To use the bus, two things must happen: • Sending the address • Receiving or sending data • A Master device will start the transaction on the bus by sending the address • A Slave device will respond to this address by either • Sending data to the master • Receiving data from master

  16. Outputting Data There are three steps for outputting data • A request on the bus to read memory • Reading the memory • Sending the memory to the output device

  17. Input Operation • Input is when the processor receives data from an input device • When we want to do an input operation we need to take two steps. • A request to write memory on the bus • Sending data from input device to memory

  18. Types of buses • There are different types of buses that a computer can use to transfer data between different objects • Processor-Memory bus: short and high speed. Connected directly from memory to processor • External I/O bus: longer and slow. Must work with many devices. Connects to processor memory bus • Backplane bus: connects all the pieces together, including memory and processor and all I/O devices. Only one bus needed • Bit-Serial Bus: high speed buses that connect directly from one object to another object. (like USB or FireWire)

  19. A Backplane Bus Computer • Backplane bus: a single bus is used to connect all components • Simple and low cost • But it is slow and can cause bottlenecks where data waits for a long time before it gets where it needs to go. • Not used today

  20. Two-Bus Computer • A two-bus computer will use an I/O bus for the devices and a processor-memory bus • I/O buses connect to the processor-memory bus through “bus adapters” • The bus adapters allow the different buses to work together without problems

  21. Synchronous and Asynchronous Buses • Synchronous bus: this means that the operation of the bus is determined by a clock cycle • It is pretty easy to implement and also runs fast • But every device on the bus must use same clock cycle and if the bus is too long there will be “clock skew” • Clock skew is a problem where a device at the end of the bus may think it’s an older clock cycle, but a new cycle has already started • Asynchronous bus: • No cycle and can work with many devices • It can be any size without worrying about clock skew • Not as fast.

  22. Using the bus • One of the most important issues is how will devices get access to control the bus • The master-slave system avoids many of the problems. The bus master controls all actions and tells devices when they will read data and when they will write data to the bus • The simplest way is to make the processor the bus master. That means every time there is an I/O transaction the processor has to be told about it and then tell the bus to do that. This means the processor is slowed down by bus transactions

  23. Bus Masters • It is not the best solution to use the processor as the bus master. • Instead, we might have a few pieces of hardware act as the bus masters. • That means there needs to be a way to determine who will use the bus if there are many masters • This is called bus arbitration and it uses two ideas • Priority – if something is really important, then it should be allowed to use the bus right away • Fairness – make sure all the devices are able to use the bus in a reasonable amount of time

  24. Bus Arbitration • There are generally four bus arbitration ideas used • Distributed arbitration by self-selection - each device on the bus will put a request on the bus to use it when it needs it. It then might have to wait its turn • Distributed arbitration by collision detection – this is what Ethernet uses. It will just send the data on the bus and if it crashes into other data and is lost, then it will send again • Daisy Chain arbitration – there is one device which is a bus arbitrator and it has devices connected one after each other. There is only one wire to connect devices to bus master • Centralized-Parallel arbitration – all devices are connected to a bus master with their own separate lines. Then the bus arbitrator decides who uses the bus

  25. Centralized-Parallel Arbitration

  26. Daisy Chain Arbitration Slow, but simple and cheap

  27. Bus Summary

More Related