Presentation is loading. Please wait.

Presentation is loading. Please wait.

FSKTM Sistem I/O Control Data-path Memory Processor Input Output Topik Hari ini: I/O Systems Control Data-path Memory Processor Input Output Network.

Similar presentations


Presentation on theme: "FSKTM Sistem I/O Control Data-path Memory Processor Input Output Topik Hari ini: I/O Systems Control Data-path Memory Processor Input Output Network."— Presentation transcript:

1 FSKTM Sistem I/O Control Data-path Memory Processor Input Output Topik Hari ini: I/O Systems Control Data-path Memory Processor Input Output Network

2 FSKTM I/O System Sistem IO mengandungi: –IO devices (peripherals), Disk, Tape –Control units (programmed IO, DMA, IOP) –Software to carry out IO operations (operating System) Sistem IO berkemungkinan dibezakan oleh corak tawaran pembabitan CPU dalam operasi IO.

3 FSKTM I/O System Design Issues Processor Cache Memory - I/O Bus Main Memory I/O Controller Disk I/O Controller I/O Controller Graphics Network interrupts Performance limited by mechanical delays Expandability

4 FSKTM I/O Device Examples Device Behavior Partner Data Rate (KB/sec) Keyboard Input Human 0.01 Mouse Input Human 0.02 Line Printer Output Human 1.00 Floppy disk Storage Machine 50.00 Laser Printer Output Human 100.00 Optical Disk Storage Machine 500.00 Magnetic Disk Storage Machine 5,000.00 Graphics Display Output Human30,000.00

5 FSKTM Prestasi Sistem I/O Prestasi sistem I/O bergantung kpd pelbagai aspek sistem (“limited by weakest link in the chain”): –The CPU –The memory system: Internal and external caches Main Memory –The underlying interconnection (buses) –The I/O controller –The I/O device –The speed of the I/O software (Operating System)

6 FSKTM Prestasi Sistem I/O Dua unit/metrik yg selalu digunakan: Throughput: I/O bandwidth (truput) Bil. tugas yg diselesaikan oleh pelayan dlm satu unit masa Untuk mencapai truput tertinggi seboleh mungkin: Pelayan tidak mungkin semestinya unggul Queue tidak mungkin semestinya kosong Response time: Latency (pendaman) Bermula apabila tugas diletak dlm queue Tamat apabila telah diselesaikan oleh server Untuk meminimumkan masa tindakbalas: Queue semestinya kosong Pelayan semestinya unggul

7 FSKTM Throughput versus Respond Time 20%40%60%80%100% Response Time (ms) 100 200 300 Percentage of maximum throughput

8 FSKTM Antaramuka I/O Berkaitan persoalan Bgmn aturcara permohonan IO ditransimi kedalam arahan peranti dan berkomunikasi dgn peranti. Bgmn data ditransmisi dari/ke memori. Knp ada pembabitan OS –Perkongsian peranti IO oleh pelbagai program diurus oleh OS –Adanya sampukan digunakan peranti IO yg diurus oleh OS Apakah tanggungjawap OS

9 FSKTM Commands to IO devices Special IO instruction arahan pemproses akan mengenalpasti device number dan comman word. Arahan ini hy dilaksanakan ketika supervisor mode OS. Memory mapped I/O menggunakan special address space yg diperuntukkan bg setiap IO.

10 FSKTM Komunikasi dgn Pemproses. I/O Control Structures Polling Interrupts DMA I/O Controllers I/O Processors

11 FSKTM I/O Interface Independent I/O Bus CPU Interface Peripheral Memory memory bus Seperate I/O instructions (in,out) CPU Interface Peripheral Memory Lines distinguish between I/O and memory transfers common memory & I/O bus

12 FSKTM Interrupt Driven Data Transfer CPU IOC device Memory User program progress only halted during actual transfer add sub and or nop read store... rti memory user program (1) I/O interrupt (2) save PC (3) interrupt service addr (4) interrupt service routine

13 FSKTM Memory Mapped I/O Single Memory & I/O Bus No Separate I/O Instructions CPU Interface Peripheral Memory ROM RAM I/O CPU Memory Bus MemoryBus Adaptor I/O bus

14 FSKTM Programmed I/O (Polling) CPU IOC device Memory Is the data ready? read data store data yes no done? no yes busy wait loop not an efficient way to use the CPU unless the device is very fast! IO operations are completely controlled by the CPU, where the CPU executes programs that initiate, direct, and terminate the IO operation IO transfer rate is limited by the speed with which the CPU can test and service an IO device

15 FSKTM Direct Memory Access CPU IOC device Memory DMAC CPU sends a starting address, direction, and length count to DMAC. Then issues "start". Direct Memory Access (DMA): External to the CPU Act as a master on the bus Transfer blocks of data to or from memory without CPU intervention DMAC provides handshake signals for Peripheral Controller, and Memory Addresses and handshake signals for Memory. DMA is capable of generating memory addresses and transferring data to or from the system bus

16 FSKTM Direct Memory Access DC Control unit IODR DMA controller IOARARAC Control unit IR CPU System bus DMA request DMA Acknowledge IO device DATA Address Main memory DC stores the number of words that remain to be transferred it is automatically decremented and tested for zero IOAR is used to store the address of the next word to be transferred IODR data buffer register

17 FSKTM Input/Output Processors CPU IOP Mem D1 D2 Dn... main memory bus I/O bus CPU IOP issues instruction to IOP interrupts when done memory (2) (3) (4) Device to/from memory transfers are controlled by the IOP directly. IOP steals memory cycles. OP Device Address target device where cmnds are looks in memory for commands OP Addr Cnt Other what to do where to put data how much special requests (1)

18 FSKTM Responsibilities of the Operating System OS bertindak sbg antaramuka antara: Perkakasan I/O & program yg meminta I/O Tiga ciri sistem I/O: Sistem I/O dikongsi oleh pelbagai program menggunakan processor Sistem I/O selalunya menggunakan sampukan utk saling- tukaran informasi berkenaan operasi I/O. Sampukan mesti diuruskan oleh OS kerana ia melibatkan peralihan ke supervisor mode The low-level control of an I/O device is complex: Managing a set of concurrent events The requirements for correct device control are very detailed

19 FSKTM Operating System Requirements Menyediakan kawalan (protection) kpd sumber I/O yg dikongsi Jaminan bahawa pengguna program hy blh capai peranti IO yg dibenarkan sahaja kpdnya. Mengurus sampukan yg dijanakan oleh peranti IO Menyediakan capaian yg samarata kpd sumber IO yg dikongsi Semua pengguna program mesti mempunyai capaian samarata kpd sumber I/O. Penjadualan capaian utk meningkatkan truput sistem

20 FSKTM OS and I/O Systems Communication Requirements OS mesti berkebolehan menghalang: Pengguna aturcara berkomunikasi secara terus dgn peranti I/O. Jika pengguna aturcara boleh menggunakan I/O secara terus: Kawalan terhadap sumber I/O kongsian, boleh jadi tidak disediakan Tiga jenis komunikasi diperlukan: OS mesti berkebolehan memberi arahan kpd peranti I/O Peranti I/O mesti berkebolehan memberitahu OS apabila ia selesai melaksanakan tugas atau menghadapi masalah. Data mesti dialihkan drpd memori & peranti I/O


Download ppt "FSKTM Sistem I/O Control Data-path Memory Processor Input Output Topik Hari ini: I/O Systems Control Data-path Memory Processor Input Output Network."

Similar presentations


Ads by Google