![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/88.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/88.gif)
◦Behaviour: input, output, storage
◦Partner: human or machine
◦Data rate: bytes/sec, transfers/sec
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/88.gif)
- DOS BIOS (Basic Input/Output System), a low-level component in DOS operating systems, including PC DOS and DR-DOS
- I/O System (86-DOS), the DOS-BIOS specifically in 86-DOS
- I/O System (MS-DOS), the DOS-BIOS specifically in MS-DOS
![More smileys for free download](http://www.tiptopglobe.com/skin/smile/s12360.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/88.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Particularly for storage devices
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Latency (response time)
◦Throughput (bandwidth)
◦Desktops & embedded systems
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Servers
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
I/O BUS CONNECTIONS |
Function of I/O modules:
1) Control and Timing.
![]() |
I/O MODULE STRUCTURE |
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
2) CPU Communicating.
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
3) Device Communication.
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
4) Data Buffering.
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
5) Error Detection.
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/15.gif)
Interconnecting components:
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦CPU, memory, I/O controllers
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Parallel set of wires for data and synchronization of data transfer
◦Can become a bottleneck
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Wire length, number of connections
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Like networks
Bus signals and synchronization
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Carry address and data
◦Multiplexed or separate
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Indicate data type, synchronize transactions
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Uses a bus clock & a fixed protocol for communicating. E.g. perform a read from memory: 1st clock cycle need a protocol to transmit the address and read command using control lines. 5th clock cycle, the memory need to respond eith the data word.
◦Adv= fast. Disadv= clock skew and synchronization problem.
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Uses request/acknowledge control lines for handshaking to accommodate a wide variety of devices of differing speed
◦Solve clock skew and synchronization prob.
![](http://images.slideplayer.us/1/222988/slides/slide_15.jpg)
Techniques of I/O
i. Programmed I/O : The CPU issues a command then waits for I/O operations to be complete. If the CPU is faster than the I/O module then this method is wasteful of CPU time.
ii. Interrupt Driven I/O : The CPU issues commands then proceeds with its normal work until interrupted by I/O device on completion of its work.
iii. DMA : In this CPU and I/O Module exchange data without involvement of CPU.
iv. Memory mapped I/O : there is a single address space for memory locations and I/O devices. CPU treats the status and data registers of I/O modules as memory locations and uses the same machine instructions to access both memory and I/O devices.
v .Isolated I/O : a dedicated instruction that is used to give a command to an I/O device. It specifies both the device number and the command.
Programmed I/O
The code in the OS for Programmed I/O be more like:
keyboard_wait: ; for get_ch
test Keyboard_Status, 80000000h
jz keyboard_wait
mov eax, Keyboard_Data
and
display_wait: ; for put_ch
test Display_Status, 80000000h
jz display_wait
mov Display_Data, eax
This scheme is known as BUSY WAITING, or SPIN WAITING. The little loop is called a SPIN WAIT LOOP.
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/93.gif)
*much time is wasted spin waiting.
if it takes 100 instructions to program this, and each instruction takes 20ns to execute, then it takes
100 * 20nsec = 2000nsec = 2 usec to execute
if a device takes 2msec (=2000usec) to deal with one character, then the percent of time spent waiting
time waiting / total time = 2000us / 2000us +2us =99.9%
We'd like a solution that spent less time "doing nothing"
Interrupts
interrupt processing |
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Controller interrupts CPU
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦But not synchronized to instruction execution
◦Can invoke handler between instructions
◦Cause information often identifies the interrupting device
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Devices needing more urgent attention get higher priority
◦Can interrupt handler for a lower priority interrupt
![]() |
INTERRUPT DRIVEN CYCLE |
![]() |
INTERRUPT DRIVEN DATA STRUCTURE |
Direct Memory Access
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Free CPU from pure data transfer tasks
◦DMA access: Pointer to source, destination and size of data issued to start transfer
◦Processor writes the data DMA access data and continuous working
◦Handshake protocol
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/93.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦In band signaling
◦Bit oriented
◦Bit/byte word translation
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Byte word oriented
◦Out of band signaling
◦IDE, SCSI
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/93.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Don’t neglect I/O performance as parallelism increases compute performance
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Benchmark takes 90s CPU time, 10s I/O time
◦Double the number of CPUs/2 years
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/93.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦For time-critical operations
◦If system is unloaded
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Find “weakest link” (lowest-bandwidth component)
◦Configure to operate at its maximum bandwidth
◦Balance remaining components in the system
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Need to use queuing models or simulation
![]() |
RACK-MOUNTED SERVER |
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/93.gif)
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Web search, office apps, virtual worlds, …
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Multiple processors, networks connections, massive storage
◦Space and power constraints
![](http://i171.photobucket.com/albums/u300/ferny-dust/sozai/bullets/70.gif)
◦Multiples of 1.75” (1U) high
![]() |
SUN FIRE x4150 1U SERVER |
sources :
http://en.wikipedia.org/wiki/Input_device
http://en.wikipedia.org/wiki/Output_device
http://en.wikipedia.org/wiki/I/O_System
No comments:
Post a Comment