Process Concept
Command Line
View size of each section of a program
View size of each section of a process
Process State
Requirements of running processes in OS
- time sharing
- isolation:process 間資源互相獨立
- interaction:process 間傳輸資料
Process State
Process Control Block (PCB)
Multi-core and Multi-processor
Multi-core vs. Multi-processor
- Multi-core 是一個 CPU 中有多個 core,他們有自己的 L1 cache 但共享 L2, L3 cache
- Multi-processor 是主板上有多顆 CPU,他們有自己的 cache 並共享 primary storage 和 I/O device
OS Scheduling Strategies for Multiple Processing Units

Private OS
Asymmetric Multiprocessing (AMP)
Symmetric Multiprocessing (SMP)
Heterogeneous Multiprocessing (HMP)
Process Scheduling
Bound
- I/O-bound:process 需要大量 I/O 操作,瓶頸在 I/O
- CPU-bound:I/O 操作不多,但需要很長 CPU time
Types of Lock
- single lock:只嘗試取一次 lock,失敗就算了
- spin lock:不斷 busy waiting 嘗試 lock
- mutex lock:取 lock,失敗就進 waiting queue,不浪費 CPU