Abstract


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
brew install procs # Installation 
 
# Alias to ps, and add in config file, add the following line to .zshrc
alias ps='sudo procs --load-config <path_to_your_config.toml>' # Refer to https://github.com/dalance/procs?tab=readme-ov-file#configuration for more info on the config.toml

Terminologies


Core Image

Child Process

  • Has the same UID as its parent

Process State

  1. Running
  2. Ready to Run - Could be running but CPU gave processing power to some other Process (进程)
  3. Block - Process is waiting for some other things like I/O to finish working (eg. waiting for file to be read)

Process Resources