😎

プロセス制御ブロック(process control block, PCB)(=プロセステーブル)

に公開
2025/11/30

概要

  • リソースは限られているため、OSは各プロセスを管理する必要がある。
    そのために使用されるのが、プロセス制御ブロックというデータ構造。
  • 各プロセスに関する情報が含まれている
  • 現在動いているプロセスの一覧テーブル

psコマンド

  • ps (process status)コマンドにて、プロセス制御ブロックに保持されている情報を確認できる
    • プロセスの識別番号
    • CPUの使用率
    • メモリの使用率 等
  • $ ps aux実行後の結果一部↓
USER               PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
y                38531   4.0  2.1 412953328 344496   ??  S    241025   94:18.86 /Applications/iTerm.app/Contents/MacOS/iTerm2
_windowserver      379   2.2  0.8 413784784 138976   ??  Ss   24 925  615:07.43 /System/Library/PrivateFrameworks/SkyLight.framework/Resources/WindowServer -daemon
root               385   1.2  0.1 426980720  22736   ??  Ss   24 925   28:06.23 /usr/libexec/runningboardd

参考

https://wa3.i-3-i.info/word11038.html

https://wa3.i-3-i.info/word11037.html

https://envader.plus/course/15/scenario/1008

Discussion