System Calls & the Kernel Interface Questions

The boundary between user space and the kernel: how programs request privileged services through system calls, the user/kernel mode transition, and the semantics of core POSIX calls such as fork, exec, wait, open, read, write, and stat. Covers syscall numbers, arguments, return values and errno, and how libc wrappers relate to the underlying trap. This is the foundational interface for all systems programming on Unix/Linux.

MediumTechnical
53 practiced

Explain how seccomp (secure computing mode) filters work on Linux with BPF programs. Describe a safe rollout plan to restrict syscalls for a high-risk service: how would you instrument it to discover the syscalls it actually needs, build a whitelist, test in 'log mode', and gradually enforce the policy while still capturing deny events for debugging?

MediumTechnical
58 practiced

A helper process exits with an unexpected status code, and your daemon must decide whether to restart it, log it, or quarantine the host. How would you interpret exit codes, signals, and core-dump indicators in waitpid() results?

HardTechnical
53 practiced

What does futex(2) actually do under the hood on Linux: the userspace fast-path, when the kernel's futex wait/wake is actually invoked, wait-queue semantics, and how futexes show up in strace output? How would you diagnose a system where many threads are blocked in FUTEX_WAIT and latency spikes occur?

EasyTechnical
67 practiced

What is a zombie (defunct) process on Unix/Linux? Explain how it is created, how to detect zombies on a running host (commands and /proc files), the consequences for system resources (PID table exhaustion), and strategies to ensure children are properly reaped in long-running services or supervisors.

MediumTechnical
53 practiced

Discuss how errno is set by system calls on failure, the thread-safety concerns of strerror(3) vs strerror_r(3), and best practices for formatting diagnostic messages in production services (include the syscall name, the errno numeric value, and human-readable text). What are minimal-impact ways to collect such errors in high-throughput paths?

Unlock Full Question Bank

Get access to all 47 System Calls & the Kernel Interface interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.