InterviewStack.io LogoInterviewStack.io

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.

HardTechnical
49 practiced

Describe how process credentials (real and effective UID/GID) interact with execve(2) and the setuid/setgid bits. Explain the security model for setuid binaries, how interpreters and shebang lines affect setuid behavior, and what operational recommendations you'd make for running third-party binaries that require elevated privileges.

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?

MediumTechnical
58 practiced

Compare select(2), poll(2), and epoll(7) on Linux: their complexity characteristics, limits (e.g. fd_set size), kernel/user interactions, and pitfalls when implementing an event loop (such as edge-triggered epoll gotchas). Which would you choose for a service handling tens of thousands of concurrent connections, and why?

HardTechnical
52 practiced

During an incident you observe a process issuing tens of thousands of open(2) calls per second causing IO and CPU overload. Provide a step-by-step incident response plan to: (1) collect evidence (syscall counts, flamegraphs, stack traces), (2) quickly mitigate impact (rate-limit, cgroups, restart), and (3) propose durable fixes (caching, lazy open, file descriptor pooling). Include exact commands/tools (bpftrace, perf, systemd-cgtop) you would use and trade-offs of each.

HardSystem Design
61 practiced

Design a small process supervisor for security tooling that starts workers, restarts failed children with backoff, and guarantees no zombies. What system calls and state transitions would you track?

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.