Process Management Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Process Management flashcards as text
What does 'strace -p PID' do?
Answer: Attaches to a running process and traces its system calls
strace -p attaches to an already-running process and prints every system call it makes, useful for debugging hangs or unexpected behavior.
Which scheduling policy gives a process guaranteed CPU time slices in a real-time manner?
Answer: SCHED_FIFO
SCHED_FIFO is a real-time scheduling policy where a process runs until it yields or is preempted by a higher-priority real-time process.
What information does 'cat /proc/PID/status' provide?
Answer: Human-readable process metadata including state, memory, and UIDs
/proc/PID/status provides a human-readable summary of process state, memory usage, thread count, and real/effective UIDs.
What happens when a process calls exec() after fork()?
Answer: The current process image is replaced with a new program
exec() replaces the calling process's memory image with a new program, keeping the same PID but running entirely new code.
Which command shows real-time per-process I/O statistics?
Answer: iotop
iotop displays a top-like interface showing disk read/write rates per process in real time.
What does setting OOM score adjustment (oom_score_adj) to -1000 for a process do?
Answer: Makes the process completely immune to the OOM killer
An oom_score_adj of -1000 disables OOM killing for that process, used to protect critical system daemons from being killed under memory pressure.
Which command can be used to run a process in a specific CPU affinity set (bind it to certain cores)?
Answer: taskset
taskset sets or retrieves the CPU affinity mask for a process, allowing you to bind it to specific CPU cores.