[OS] Process
Contents
Process
Process 是一個執行中的 program,就是執行中的程式;換言之,靜態的程式稱為 program,動態的程式稱為 process。
Process 是作業系統分配資源的單位,所以有時會被稱作 tasks or jobs。
一個 Process 主要有:
- Code text (程式碼)
- Data section (資料)
- Heap & stack (放動態/暫時性資料)
- CPU register value
- program counter (程式計數器 擺放下一個要執行程式 section 的起始地址)
- Program ID (又稱作 pid)
- Process state
