16_Input_and_Output

16_Input_and_Output - Input and Output How things get into...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPE12 Cyrus Bazeghi Input and Output How things get into and out of the CPU (ch 8)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPE12 Cyrus Bazeghi 2 Computer System
Background image of page 2
CMPE12 Cyrus Bazeghi 3 I/O: Connecting to Outside World •So far, we‟ve learned how to: compute with values in registers load data from memory to registers store data from registers to memory But where does data in memory come from? And how does data get out of the system so that humans can use it?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPE12 Cyrus Bazeghi 4 I/O: Connecting to the Outside World Types of I/O devices characterized by: behavior: input, output, storage input: keyboard, motion detector, network interface output: monitor, printer, network interface storage: disk, CD-ROM data rate: how fast can data be transferred? keyboard: 100 bytes/sec disk: 30 MB/s or more network: 1 Mb/s - 1 Gb/s
Background image of page 4
CMPE12 Cyrus Bazeghi 5 I/O Devices Keyboard • User presses „A‟ key - > „a‟ ASCII code is 0x61 Keyboard sends this on wires 1 for start, 8-bits of data, 0 for stop • „a‟ is: 1011000010 Buffer at computer catches these bits
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPE12 Cyrus Bazeghi 6 Displays Character display works with the reverse process (sort of) • Most displays today are “bit mapped” I/O Devices Printers • Just like a display but now being “printed” to paper, not a screen. • Again, most printers are now “bit mapped” verses character.
Background image of page 6
CMPE12 Cyrus Bazeghi 7 I/O Devices Hard Disk A spinning disk (4600, 5200, 7200, 10000+ RPM) 20 400 GB and growing FAST Magnetic and read/write (like tape) Both sides Usually a stack of platters Disk access Electronic speeds are in the nanoseconds (10-9 sec) Disk speeds are in the milliseconds (10-3 sec) Why use a disk? Queuing Seek Rotation Transfer Depends 10ms 10ms 1ms
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPE12 Cyrus Bazeghi 8 I/O Devices Questions How does CPU ask for a char to be printed? Which printer? • Which display? Who‟s? When is printer ready for the next char? When does keyboard have the next char? What about the million times slower?
Background image of page 8
CMPE12 Cyrus Bazeghi 9 LC-3 I/O Uses the “TRAP” instruction to invoke the Operating System, which in turns talks to the hardware. User specifies the type of operation desired by giving a code to the OS. Ex. “TRAP x20” gets a character from the keyboard.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CMPE12 Cyrus Bazeghi 10 LC-3 I/O •Don‟t use “JSR” because •OS doesn‟t trust user to provide the correct address Want to switch into OS mode, where more things are allowed •CPU sees the “TRAP” instruction and uses the trap vector to determine where to go in the OS code. OS will not allow (or should not) •Users to read each other‟s keyboards Users to access all memory or disk locations
Background image of page 10
CMPE12 Cyrus Bazeghi 11 I/O Controller Control/Status Registers CPU tells device what to do -- write to control register CPU checks whether task is done -- read status register Data Registers CPU transfers data to/from device
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/14/2009 for the course CMPE 12/l taught by Professor Bazeghi during the Fall '09 term at UCSC.

Page1 / 49

16_Input_and_Output - Input and Output How things get into...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online