CSE Roadmap

Core tier · about 3 hours · 8 parts

Part 1 of 8 · 1 min read

Why this page comes last in Level 0

In this module you will

  • Find out which kernel, processors and memory a Linux machine has.
  • List processes and read the details of one through /proc/PID.
  • See the open file descriptors of a running process.
  • Measure how long a system call takes and split run time into user and system time.
  • Use strace and the manual pages to answer "what is this program asking the OS to do?"

Pages 1 to 5 explained the ideas: the OS as a manager, the two modes, the structure of the kernel, booting and interrupts. This page turns them into things you can see on a real machine. The commands here are used in every later level to check what the theory says. The main sources are "The Linux Programming Interface" (TLPI), chapters 2, 3 and 12, and "Operating System Concepts" (OSC). Every command and program was run on Linux before it was written here. Numbers marked "made up" only show the idea, and numbers from the test machine will differ on yours.

About this example About this example

Real: Every command and program output on this page came from a small Linux virtual machine used as the test machine.

Scripted: The closing reading exercise of section 6 is a worked reading of one strace line, not a new measurement.

Not real: The figure of 87 nanoseconds per system call depends on the processor, the kernel and its security settings, so it will differ on other machines.