or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
OS筆記-Chapter 13: I/O Systems
tags:
OS
目錄
Chapter 1: Introduction
Chapter 2: Operating-System Structures
Chapter 3: Processes
Chapter 4: Threads
Chapter 5: CPU Scheduling
Chapter 6: Process Synchronization
Chapter 7: Deadlocks
Chapter 8: Main Memory
Chapter 9: Virtual Memory
Chapter 10: File-System Interface
Chapter 11: File System Implementation
Chapter 12: Mass-Storage Systems
Chapter 13: I/O Systems
Chapter 14: Protection
Chapter 15: Security
概觀
I/O裝置在功能與速度方面變化極大(滑鼠、硬碟、光碟機),因此需要許多不同的功能來控制
I/O裝置目前存有兩個相互衝突的方展方向
裝置驅動程式(device driver):代表一個與I/O子系統相通知統一裝置存取介面
I/O硬體
阜(port):裝置和機器藉此互通訊息
匯流排(bus):由一組纜線組成,並使用嚴謹定義之協定,規定一組可在纜線上傳送的訊息組成
菊花鏈(daisy chain):裝置A有纜線連接裝置B,裝置B有纜線連接裝置C,裝置C有纜線連接電腦阜,通常以匯流排方式操作
PCI匯流排(PCI bus):負責處理處理器-記憶體(processor-memory)子系統與快速裝置的連接
控制器(controller):可操控連接阜、匯流排或裝置的電子零件,擁有一個或多個暫存器
I/O連接阜包含四個暫存器
輪詢(polling)/忙碌等待(busy-waiting)
中斷(interrupt)
直接記憶體存取(DMA,Direct Memory Access)
應用I/O介面(Application I/O Interface)
介面(interface):將一般性特徵由一組標準化功能加以存取

每種作業系統都有自己適用的裝置驅動器介面
大部分的作業系統有跳脫(escape)/後門(backdoor)可以原封不動的將來自某應用程式之任意指令傳給裝置驅動器
區段與字元裝置
網路裝置(Network devices)
時鐘與計時器(Clocks and Timers)
阻隔與非阻隔I/O(Blocking and Nonblocking I/O)
向量I/O(vectored I/O)
核心I/O子系統(Kernel I/O Subsystem)
I/O排班程式
緩衝(buffer)
快取(cache)
spooling 和裝置預約
錯誤處理(error handle)
I/O保護(I/O Protection)
核心資料結構(Kernel Data Structures)
轉換I/O要求為硬體操作指令(I/O Requests to Hardware Operations)
考慮一個行程從磁碟讀取一個檔案
I/O要求的生命週期

STREAMS
讓應用程式能夠動態組合驅動程式之程式碼的管線(pipeline)
STREAMS I/O是非同步
STREAMS 提供一個架構以模組化漸進式的方法來撰寫裝置驅動模式和網路協定
性能(Performance)
I/O是影響系統性能的主要原因
改進I/O之執行效率
應用程式層開發彈性較高,但內容轉換可能造成額外的負擔