https://github.com/satoru-takeuchi/linux-in-practice-2nd

前提

ubuntuはMutipassを使用して環境構築した

https://multipass.run/docs/tutorial

https://zenn.dev/kujirahand/articles/f70183a6f19879

https://qiita.com/k-keita/items/4cf8c697bacba38ab0f5

https://qiita.com/notakaos/items/928987623fc61e815363

# VMの起動
multipass start ubuntu

# Shellの起動
multipass shell ubuntu

# VMの停止
multipass stop ubuntu

Linuxの概要

システムコールは、プロセスがカーネルに処理を依頼するための方法。

システムコールが呼び出されると、CPUはユーザーモード(通常のプログラムが動作するモード)からカーネルモード(OSが動作する特権モード)に切り替わる

  1. strace -o hello.log ./hello FYI: https://qiita.com/t_ymgt/items/7f13c89b08b889da2146 -T オプションをつけると、各種システムコールに要した時間をマイクロ秒で計測できる
  2. cat hello.log

main関数の前後で