โ† All Linux Flashcard Decks

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
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.