A visual playground for understanding what a Linux process actually is: PIDs, parent processes, scheduling, sleeping, memory, file descriptors, system calls, signals, and the process lifecycle.
Watch the simulated process move through states.
One small process can spend most of its time waiting.
In write → sleep mode, the process briefly runs, performs a modeled write, then waits. In busy loop mode it continuously has work to do.
A process is more than a PID.
PID identifies the process. PPID identifies its parent.
Code, data, heap, shared libraries and stack are mapped into the process's virtual memory.
stdin, stdout and stderr are three common file descriptors.
Linux tracks scheduling state, credentials, signals, memory mappings, open files and more.
File descriptors are small integers referring to open resources.
Standard input — normally connected to the terminal.
Standard output — where normal program output goes.
Standard error — commonly used for diagnostics.
A simplified trace of what the simulated process is doing.
Real Linux system calls can be observed with
strace.
A process asks the kernel to create a child. The child receives its own PID and initially resembles the parent.
The child can replace its current program image with another executable. The PID normally remains the same.
A parent can wait for a child to terminate. This is important because an exited child can temporarily remain as a zombie.
Now connect the model to a real Linux system. Enter a PID below. Every command can be copied and "run" inside this page to display representative Linux output. The browser does not execute commands on your machine.
kill
can change process state when executed on a real system.
/proc pseudo-filesystem.
Move from the model to a real Linux process.
Start clock-demo. Watch RUNNING alternate with SLEEPING.
Notice how a continuously runnable process behaves differently from one that frequently sleeps.
On Linux, run:
sleep 300
in another terminal.
Try:
pgrep sleep
or
ps aux | grep sleep.
Put that PID into the Real Linux Lab.
Start with ps and
/proc/PID/status.
On your own test process, try
SIGSTOP and
SIGCONT, then inspect it again.