Computer Operating System - Lecture 13: I/O System - Nguyen Thanh Son
I/O Hardware
Application I/O Interface
Kernel I/O Subsystem
Transforming I/O Requests to Hardware
Operations
Streams
Performance
Application I/O Interface
Kernel I/O Subsystem
Transforming I/O Requests to Hardware
Operations
Streams
Performance
Bạn đang xem 20 trang mẫu của tài liệu "Computer Operating System - Lecture 13: I/O System - Nguyen Thanh Son", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.
File đính kèm:
- computer_operating_system_lecture_13_io_system_nguyen_thanh.pdf
Nội dung text: Computer Operating System - Lecture 13: I/O System - Nguyen Thanh Son
- Chapter’s Content I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 2
- Typical PC Bus Structure BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 4
- Polling Determines state of device command-ready busy Error Busy-wait cycle to wait for I/O from device BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 6
- Interrupt-Driven I/O Cycle BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 8
- Direct Memory Access Used to avoid programmed I/O for large data movement Requires DMA controller Bypasses CPU to transfer data directly between I/O device and memory BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 10
- Application I/O Interface I/O system calls encapsulate device behaviors in generic classes Device-driver layer hides differences among I/O controllers from kernel Devices vary in many dimensions Character-stream or block Sequential or random-access Sharable or dedicated Speed of operation read-write, read only, or write only BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 12
- Characteristics of I/O Devices BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 14
- Network Devices Varying enough from block and character to have own interface Unix and Windows NT/9i/2000 include socket interface Separates network protocol from network operation Includes select functionality Approaches vary widely (pipes, FIFOs, streams, queues, mailboxes) BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 16
- Blocking and Nonblocking I/O Blocking - process suspended until I/O completed Easy to use and understand Insufficient for some needs Nonblocking - I/O call returns as much as available User interface, data copy (buffered I/O) Implemented via multi-threading Returns quickly with count of bytes read or written Asynchronous - process runs while I/O executes Difficult to use I/O subsystem signals process when I/O completed BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 18
- Sun Enterprise 6000 Device-Transfer Rates BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 20
- Error Handling OS can recover from disk read, device unavailable, transient write failures Most return an error number or code when I/O request fails System error logs hold problem reports BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 22
- UNIX I/O Kernel Structure BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 24
- Life Cycle of An I/O Request BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 26
- The STREAMS Structure BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 28
- Intercomputer Communications BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 30
- Device-Functionality Progression BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 32