spooling
buffering

polling
每一段時間,I/O device 將information放進register裡面,cpu每一段時間去確認所需要的服務
1.過於浪費cpu時間

interrupt
當process需要os服務時會丟出一個中斷通知os
大量hardisk處理仍然太慢
1.os收到interrupt 停止目前process
2.依照interrupt ID 從interrupt vector 尋找interrupt 位址
3.執行ISR
4.ISR執行完 控制權交回給OS
5.cpu scheduler繼續原先Process的工作或另外指派工作

DMA (direct memory access)
在memory跟I/O device間負責傳輸,過程中不需要cpu監督
適用於高速I/O device
需要額外DMAC

System call
當user process需要os服務時,提出system call跟相對應參數給OS,在依據system call ID去找出相對應的服務
1.register
2.memory+register
3.stack
1.Process control
2.File operation
3.Device manipulation
4.information maintain
5.communication

DMAC
1.command Type
2.Memory location
3.Device location
4.Transfer length

Dual mode
CPU protection
防止user process無限期佔用資源 設定timer
memory protection
保護monitor area
I/O protection
將所有I/O設成privileged instruction


PCB process control block
1.process ID
2.Process state
3.Programming counter
4.CPU register
5.CPU scheduling information
6.memory management information
7.Account information
8.I/O status information

Process control operations
1.Creation
2.Destruction
3.suspend and wakeup
4.Assign and change Attribut

long-term scheduler (job scheduler)
從job queue挑選ˋ合適的job 進入memory準備執行
1.執行頻率低
2.適用batch system
3.可調控multiprogramming degree
4.I/O bound,CPU bound

short-term scheduler (CPU scheduler)
從ready queue中使priority高的process獲得CPU的控制權

medium-term schedule
當memory不足夠執行新的process時,將priority低的process swap out memory,當工作結束之後在swap in
1.執行頻率低
2.適用time-sharing system
3.可調控multiprogramming degree
4.I/O bound,CPU bound

context switching
要執行另一個process時將目前執行狀態保存下來,並載入新的process PCB
是一種負擔,因為在過程中沒有process執行
1.register
2.private register set
3.multithread

Dispatcher
short-term
context switch, change to user mode, jump to the execution entry of the process

五個評估電腦性能的criteria:
1.turnaround time
2.throughout
3.CPU utilizaion
4.waiting time
5.response time (time sharing system)

arrow
arrow
    全站熱搜

    Zucker 發表在 痞客邦 留言(0) 人氣()