Process Concept


Command Line

View size of each section of a program

D-OS-Ch02a-size

View size of each section of a process

D-OS-Ch02b-vmmap


Process State

Requirements of running processes in OS

  • time sharing
  • isolation:process 間資源互相獨立
  • interaction:process 間傳輸資料

Process State

D-SP-Ch8ad-Process_State

Process Control Block (PCB)

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

D-OS-Ch02c-Private_OS

Asymmetric Multiprocessing (AMP)

D-OS-Ch02d-AMP

Symmetric Multiprocessing (SMP)

D-OS-Ch02e-SMP

Heterogeneous Multiprocessing (HMP)

D-OS-Ch02g-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

Context Swtich

context switch


Communications in Client-Server Systems

D-OS-Ch02f-Communications_in_Client-Server_Systems