Abstract
-
Container that holds all the information needed to run a program, Abstraction over running program
-
2 Components - Address Space, Process Control Block (PCB), stored in Main Memory
-
Process also has a Page Table that translates a given Memory Page to the Memory Address of Memory Frames that stores the actual data
Communication among processes
Process usually don’t share Memory Frames among themselves for isolation purposes. We need Inter-Process Communication (IPC) for communication among processes.
Process memory usage
You can check the detailed breakdown of process memory usage but
cat /proc/<pid>/statm
on Linux Kernel. You refer to ChatGPT to make sense what the value represent.
Info
VmSize
represents the size of Virtual Memory assigned to a process.
VmRSS
represents the size of Memory Frames a process is currently using.
Useful CLI tool
procs
- A
ps
replacement written in Rust
Terminologies
Core Image
- A suspended Process (进程) consists of its Address Space
Child Process
- Has the same UID as its parent
Process State
- Running
- Ready to Run - Could be running but CPU gave processing power to some other Process (进程)
- Block - Process is waiting for some other things like I/O to finish working (eg. waiting for file to be read)
Process Resources
- Address Space
- Register (Include Program Counter and Stack Pointer)
- A list of open File
- Outstanding Software Interrupt
- List of related processes
- Process Management information etc