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.

MediumTechnical
57 practiced

You need to rotate logs atomically across multiple processes writing to the same filename. Explain how rename(2) enables atomic rotation, what happens to existing file descriptors after rename, and when copytruncate is required. Propose a robust log rotation strategy that avoids losing logs and works with long-lived processes that keep files open.

MediumTechnical
70 practiced

A worker process keeps being killed by the OOM killer on your Linux host. Explain how setrlimit(2) can be used to constrain memory usage per process and the differences between RLIMIT_AS and RLIMIT_RSS. Discuss consequences of overly strict limits and how you would choose sensible limits for a service while preserving reliability and SLOs.

MediumTechnical
106 practiced

Explain the semantics of O_APPEND on Linux. Is write(2) atomic for multiple processes appending to the same file? Under what conditions does the kernel guarantee atomicity for appends, and what are the implications for multi-process logging? Provide recommendations for safe concurrent appends.

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
54 practiced

How would you use inotify(7) to watch configuration files and directories for changes and trigger a reload in a service? Cover the resource limits (inotify max_user_watches), race conditions (e.g. moved or renamed files), and alternatives such as fanotify or eBPF-based watchers for large-scale monitoring with lower overhead.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.