This one tripped me up more than it should have.
Start by clarifying the scenario: 5 identical processes, 2 cores, 4 sharing CPU equally, 1 starved. Then systematically investigate OS components: scheduler, process states, priorities, affinity, and resource limits. Conclude with likely causes such as CPU affinity, priority inversion, or cgroup constraints.
Pro tip: Mention that you'd use tools like top, ps, and /proc to inspect per-process CPU usage, priority, and affinity, and check dmesg for OOM or throttling messages. This shows hands-on debugging experience.
Confirm that all processes are identical, CPU-bound, and continuously runnable. Verify that the fifth process is truly starved (0% CPU) rather than just low priority.
Inspect process states (R, S, D) and scheduling policies (nice values, real-time priorities). Look for priority inversion or a process stuck in uninterruptible sleep.
Check if the starved process is pinned to a CPU that is fully utilized, or if it's in a cgroup with CPU quota that is exhausted.
Review ulimits, OOM killer logs, and kernel messages for throttling or errors affecting the process.
Based on findings, identify the most likely cause: CPU affinity misconfiguration, priority inversion, cgroup CPU quota, or a bug in the scheduler.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.