ǹСͺ

 

ػóԴдɰ öͧҹѺ ӹdz ººѴԹ ʴ͡ ѧ֧çҧСͺǹҧ öҹкʹͧͧͧ

ͧСͺػóѺ (input device) Ѻҡ͡ػó˹ѡ (main memory) ǹѡ١ ҹ˹ҧ ¡ ͧҹ˹ӹdzºº˹ѡ ҡӹdzѺѧ˹ѡ ͡ʴó͡ (output device) Ѻҹ ѧкСͺ ˹ ػóѺ ػó͡

ػóеԴѺҡ·ѡ ˹ҷᵡҧѹ 繵ѡ 繪شѡ Ҷ֧Ẻ Sequentially Randomly 觢Ẻ Synchronously Asynchronously ҧػó Dedicated Shared ҧػó Read-only Read-write зءػó٧ӵҧѹ
ػó¡Դö¡ 2

1. ػó쪹Դ (stream) ػóŷ͡§ӴѺ͹-ѧ ¡ŷµǨͺӴѺͧ ػóöѴ §ѴѺ-觢١ͧ§ ҧͧػó쪹Դ 觢ŷк仵ӴѺá 㴶١͹ж١ҡ͹ ͧѴػó ŷ١͡仡͹ж١͹ ŷ١价ѧж١ѧ

2. ػó쪹Դ (non-stream) ػó ŷѺѺӴѺ ҵͧ¢ͷ¡Те èѴػó кԺѵԡèеͧԸըѴ੾ ѺѡɳТͧػó쪹Դ ҧػó쪹Դ Ҿ ͵ѡ÷Ҿʴ еͧ㹵˹觷١ͧ ˹觢ͧѡ÷ʴ躹ҾеǨʹʻШӵ˹觹 觵ѡѧʹ㴵ѡáҡ躹Ҿ ˹ʹʹ ѧ 觵ѡҾ繵ͧӴѺ觷١ͧ ͧʹʷçѺ˹ҹ
7.1
ػóѺ ʴ

ػóԹص (Input device) ػóöѺ觵ҧ ҡš ¹͡ ҧ ͧҹѵ
ػóӢ ػóöѺ觵ҧ ҡ¹ͧ͡ ѹ ͪش觷¹觧ҹ ӧҹ鹵͹ Тŷͧ仾Ѻ ˹»żšҧӡûż мԵѾͧ͡ ҧ ͧҹѵ ʵԡ ҡʧ ͧԨԵ ᡹ 繵

ػóҵص (Output device) ػóǺ觼͡š¹͡ ҧ ͧкѵ Ҿ ͧ
ػóӢ͡ ػóʴ ػóǺ觼͡¹ͧ͡ ѧҡӡûż еͧԸ㹡ùӼѾ͡ʴ öػóʴŹ ͡ 3 ػóʴѾǤ Ҿ (Monitor) ػóʴѾ ͧ (Printer) ػóʴѾ÷ҧҹҿԡ ͵ (Plotter)
7.1.1
ŧṹ (Polling)

(1) A communications technique that determines when a terminal is ready to send data. The computer continually interrogates its connected terminals in a round robin sequence. If a terminal has data to send, it sends back an acknowledgment and the transmission begins. Contrast with an interrupt-driven system, in which the terminal generates a signal when it has data to send.

(2) A technique that continually interrogates a peripheral device to see if it has data to transfer. For example, if a mouse button was pressed or if data is available at a communications port. Contrast with event-driven or interrupt-driven techniques, in which the operating system generates a signal and interrupts the system. (Techweb.com)

ºԸա÷ó 㹡ҧ host ǤǺ ա÷ handshaking 繾鹰ҹ 2 bits ҹ producer consumer controller host աú觺͡ʶҹТзӧҹ
7.1.2
Ѵѧ (Interrupts)

âѴѧШзӧҹҧͧѺ CPU ֧١¡ Interrupt-request line ·ӧҹ Interrupt-driven I/O cycle Ѻ 7 ͧСͺ

1. device driver initialtes I/O

2. initiates I/O

3. input ready, output complete, or error generates interrupt signal

4. CPU receiving interrupt, transfers control to interrupt handler

5. interrupt handler processes data, returns from interrupt

6. CPU resumes processing of interrupted task

7. CPU executing checks for interrupts between instructions

[img]interruptcycle.png[/img]

7.1.3 Ҷ֧˹¤µç (Direct memory access)

(Direct Memory Access) Specialized circuitry or a dedicated microprocessor that transfers data from memory to memory without using the CPU. Although DMA may periodically steal cycles from the CPU, data are transferred much faster than using the CPU for every byte of transfer. On PCs, there are eight DMA channels commonly used as follows. Most sound cards are set to use DMA channel 1

DMA ǧþɷ͡Ẻ觢ҧ ˹¤ ֧˹¤÷ӧҹͧ CPU 繡÷ӧҹҴѧ ͷӹ¢ǧ˹ 㹡¡ŷͧ ᷹ CPU 繤觧ҹ¡µç

Ҿʴ鹵͹÷ӧҹѹͧ CPU, Cache, CPU memory bus, DMA, PCI bus, IDE disk controller Disk բ鹵͹ҧ 6 鹵͹

1. device driver is told to transfer disk data to buffer at address X

2. device driver tells disk controller to transfer C bytes from disk to buffer at address X

3. disk controller initiates DMA transfer

4. disk controlelr sends each byte to DMA controller

5. DMA controller transfers bytes to buffer X, increasing memory address and decreasing c until c = 0

6. when c = 0, DMA interrupts CPU to signal transfer completetion

[img]http://www.infocom.cqu.edu.au/Units/win2000/85349/Resources/Lectures/pics/12_7.gif[/img]

Ǣͧػóҧ

 

ػó

10 Bps

100 Bps

56 KB

7 KBps

᪹Ѿ

8 KBps

ISDN

16 KBps

ͧ

100 KBps

400 KBps

(Classic)

1.2 MBps

USB (Universal serial bus)

1.5 MBps

ԨԷ

4 MBps

ʡ IDE

5 MBps

մ 40X

6 MBps

(Fast)

12.5 MBps

ISA

16.7 Bps

ʡ EIDE (ATA-2)

16.7 MBps

FireWire (IEEE 1394)

50 MBps

͹ XGA

60 MBps

SONET OC-12

78 MBps

ʡ SCSI Ultra 2

80 MBps

(Gigabit)

125 MBps

Ultrium

320 MBps

PCI

528 MBps

SUN Gigaplane XB backplane

20 GBps


7.2 Application I/O Interface

7.2.1 Block and character devices

»кԺѵԡèФҴѧͼҹ read() write() seek() ػó觢Ẻ simple linear array of block raw I/O ҧػóẺѴش keyboard

7.2.2 Network devices

к͢¨աõԴáѹҹ socket interface ͡ҡõԴẺ read() write() seek() ѧաػó͢Ҽҹ socket աҧ˹ ӹ֧֧кԺѵԡҨ UNIX Windows ʹ੾觷ҷҧ

7.2.3 Clocks and timers

ǹ˭ hardware clock timer ž鹰ҹǡѺ 3 ҧ

- ͡һѨغѹ (Current time)

- ͡ҷҹ (Elapsed time)

- trigger лԺѵԡõ

7.2.4 Blocking and nonblocking I/O

system-call interface ͧѺ I/O Ҩҡ blocking nonblocking мҨ mouse keyboard 觢žѹ 㹢зѧԴҾ¹ҡ CD ֧ͧͺѺŵҧ

Characteristics of I/O devices

aspect

variation

example

data-transfer mode

character
block

terminal
disk

access method

sequential
random

modem
CD-ROM

transfer schedule

synchronous
asynchronous

tape
keyboard

sharing

dedicated
sharable

tape
keyboard

device speed

latency
seek time
transfer rate
delay between operations

 

I/O direction

read only
write only
read-write

CD-ROM
graphics controller
disk


7.3 Kernel I/O Subsystem

Kernel 蹢ͧк ԡõҧ ҡ ѹѺ I/O ҹҧ ͡ҷ 6 ͧ仹 к¢ͧèѴ kernel ǡѺ I/O

7.3.1 I/O scheduling
7.3.2 Buffering (
红ŷҡ)
7.3.3 Caching (
红ŷ¡ з¡ǡ)
7.3.4 Spooling and device reservation (
buffer 纼Ѿͧػó printer)
7.3.5 Error handling
7.3.6 Kernel data structures

[img]http://www.humblepie.com/graphics/diskcacheread1.jpg[/img]
7.4
ԺѵԡõԴػó

- ֡Դػó

- ֡ǨͺǢͧػó input output ҧ
-
֡¹ἹҾʴҧ CPU Ѻ I/O controller
-
鹤ҢǡѺ кѺ ʴ ҡԹ Ƿ§ҹ 觵᷹ʹ˹Ҫ

 

ػóԴдɰ öͧҹѺ ӹdz ººѴԹ ʴ͡ ѧ֧çҧСͺǹҧ öҹкʹͧͧͧ

ͧСͺػóѺ (input device) Ѻҡ͡ػó˹ѡ (main memory) ǹѡ١ ҹ˹ҧ ¡ ͧҹ˹ӹdzºº˹ѡ ҡӹdzѺѧ˹ѡ ͡ʴó͡ (output device) Ѻҹ ѧкСͺ ˹ ػóѺ ػó͡

   

    1. (Keyboard)  ػóҷö͹¡þ
        
3 Դ  
        1.1  
Ẻ˭ ѡеѺAT
        1.2  
PS/2 ѡеѺATX
        1.3  
Ẻẹ USB ѡеѺATX
    2.
Ǫ (Pointing  Device)
         
ػóǪӹ¤дǡѺҹ 2  Դ
         2.1  
ҷ (Mouse)   3 Դ
                2.1.1  
Ẻẹ ѡеѺAT ATX ҧ
                2.1.2  
PS/2 ѡеѺATX
                2.1.3  
Ẻẹ USB  ѡеѺATX
          2.2  Joy  Stick   
 2  Դ
                2.2.1  
Ẻẹ   Pad  Stick
                2.2.2.
Ẻѹ¡;ǧ Fight  Stick
     3.
ػóҾ Digital  ͹Ӣ
           3.1
ͧ᡹    2 Դ
                 3.1.1
ͧ᡹ Roller,Hand  Scan
                 3.1.2
ͧ᡹Ẻ蹡Ш  Jet Scan
           3.2  
ͧٻԨԵ  
           3.3  
ͧҾ͹ VDO
           3.4  
ͧҹ蹢 CD-ROM
           3.5  
ͧҹᶺ硪Դ͹  Disk Drive

 


                                                                               <<ػó    INPUT>>
      
       ػóö¡ѧ仹






ػó input output

From CPE SKE Wiki

Jump to: navigation, search

Contents

[hide]

*                               1 ػó input

*                                       1.1 Keyboard

*                                       1.2 Mouse

*                               2 ػó Output

*                                       2.1 Printer

*                                               2.1.1 Dot Matrix

*                                               2.1.2 Laser Printer

*                                               2.1.3 Inkjet Printer

*                                       2.2 Monitor

*                                               2.2.1 CRT <Cathod Ray Tube>

*                                               2.2.2 LCD <Liquid Crystal Display>

*                                               2.2.3 OLED <Organic Light Emitting Diode>

[edit] ػó input

[edit] Keyboard

*                   ෤ԤẺԵ

*                   ١蹤 ҧѹö˹ window

*                   աõǧẺ Matrix 繡ûѴ

*                   ÷ӧҹ cpu 俷Ƿ 1 յç˹Ѵǧ ը¹ ǹѺҷǷ 1 ա ǹҧ ¡ǹ

*                   Keyboard notebook ҧҡի ç(ATA) 觢Ẻparallel deskopserial

*                   ҨЫͧ Ҥͧ

[edit] Mouse

1.    Mouse Ẻ١

§                    ١駷ҡѺ蹨·ǹ͹ (蹨ҹٷҧµ)

§                    աع ʧͧաáоԺ

§                    êmouse价ҧ Դҡૹʧ 2 ǵ§ѹ ¨ʧѴѹ ͹ͧͧʧѴҹૹ˹͹з͡ع- õǨͺẺ¡ Encorder

2.    Mouse Ẻʧ

§                    á Mouse е躹ͧ ¶ͧ¡mouse ẺҨ

§                    ͧͧк Image Procesing CMOS Sensor 㹡ͧdigital դ´¡ ૹǹжٻ͹˹ѧ 繡öҾẺ ǻmouse 价ҧ˹ ´٨ҡᵡҧͧ

§                    mono ;鹼Ƿ͹ѹҡ 蹡Ш .

[edit] ػó Output

[edit] Printer

[edit] Dot Matrix

*                   ǹ§ѹǵ 2 Ẻ Ẻ 9 24 ¨ 2 12 ͧѹ

*                   ͡ʷдɨеԴ

*                   ͤѧ еͧԴͧѧдɵԴ ֧д Ҩзѡ

¶֧ػóҧ ӧҹҹѹԴûż èѴ С/ʹ ҧҨ¡ device ¶֧ػóͧ к͡ 4 ػó觢к (input devices) ˹»ż(processors) ػóʴѾ (output devices) ػó˹ҷ˹纤¹͡˹¤ͧ (secondary storage dvices)

ػó觢Ţ(Input Devices)

  Input devices ػó㹡
觢ʹЪش
к   ͧ鹹ѡҧ ͧ 7 ѹҧ㹻Ѩغѹ 鹾 Թ ᡹ͧ᡹ ⿹ ػóҹᶺ ػó觢šҿԡ 

˹»ż (Processors)

          ôӤѭشͧк
º͹кͧͧҧ ˹ҷżŢʹȴªش觷
ӧҹͧ ǹͧ˹¼ŹСͺἧǧõҧ ἧǧ÷Ӥѭ    ˹»żšҧ CPU 
(cetral processing)
˹¤ (memory) ἧǧþɷҧմ
öͧѡɳҧ
 
żŢŷٻͧ§ ҿԡ image Ҿҧ  㹡÷ӧҹͧ 繵 Ӥѭ

ػóʴѾ (Output Devices)      

ػóʴŢͧ÷ӧҹк  Ҿ   ͧ      ػóʴѾٻͧҿԡ

ػó˹ҷ˹纤¹͡˹
ͧ (Secondary Storage  Devices)
             
ػó㹡红ʹЪش »㹻Ѩغѹ    ҹ  ᶺШҹʧлդسѵТʹբᵡҧѹ  СѺҹѡɳеҧ   öʹٻẺҧ ҧӡѴöʹȡѺк
㹤駵 ͵ͧ