Skip to main content

Stage 2: Kernel Adventurer

Help learners understand how the Linux kernel manages processes, memory, and scheduling. Build confidence in explaining kernel concepts and demonstrate practical commands that reveal system internals - a frequent interview focus.


Hackbook Overview

  • Kernel Role: Core of Linux, manages hardware, memory, processes, and system calls.
  • Processes: Each running program is a process with PID (Process ID).
  • Scheduling: Kernel decides which process runs and when (fairness, efficiency).
  • Memory Management: Handles RAM allocation, swap space, and virtual memory.
  • System Calls: Interface between user programs and kernel functions.
  • Why It Matters: Interviewers test kernel knowledge to assess system‑level understanding.

Hands‑On Practice

  • View running processes: ps aux or top.
  • Kill a process: kill -9 <PID>.
  • Check memory usage: free -h.
  • View kernel version: uname -r.
  • Inspect system calls: strace ls.

Interview Question Bank

Conceptual

  • Q1. What is the role of the Linux kernel?
    A1. The kernel manages hardware, memory, processes, and system calls, acting as the bridge between applications and hardware.
  • Q2. What is a process in Linux?
    A2. A process is an instance of a running program, identified by a unique PID.
  • Q3. Explain Linux scheduling.
    A3. Scheduling determines which process runs at a given time, balancing fairness and efficiency using algorithms like CFS (Completely Fair Scheduler).

Practical

  • Q4. How do you check memory usage in Linux?
    A4. Run free -h or use top to see RAM and swap usage.
  • Q5. How do you find the kernel version?
    A5. Run uname -r.
  • Q6. How do you trace system calls made by a command?
    A6. Use strace <command>. Example: strace ls.

Scenario‑Based

  • Q7. A process is consuming too much CPU. How do you handle it?
    A7. Identify with top or ps aux, then terminate using kill -9 <PID>.
  • Q8. The system is running out of memory. What steps would you take?
    A8. Check usage with free -h, identify heavy processes with top, and consider adding swap space.
  • Q9. How would you explain virtual memory to a junior engineer?
    A9. Virtual memory allows processes to use more memory than physically available by mapping to disk (swap).

Behavioral Based

  • Q10. Tell me about a time you solved a kernel or process issue.
    A10. Example: “I once resolved a server slowdown by identifying a runaway process with top and terminating it, restoring performance.”

Cheatsheet (Quick Notes)

  • Kernel Role: Manages hardware, memory, processes.
  • Processes: Identified by PID, managed with ps, kill.
  • Scheduling: Determines process execution order.
  • Memory: free -h, swap space, virtual memory.
  • System Calls: Interface between apps and kernel (strace).

Updated on Dec 21, 2025