InterviewStack.io LogoInterviewStack.io

System Calls Fundamentals Questions

Core OS-level concepts covering system call interfaces and conventions, examples such as fork, exec, opendir, and stat, kernel-user space interactions, process lifecycle, file I/O, memory management primitives, and basic concurrency primitives in systems programming.

EasyTechnical
51 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 SRE-run services (include syscall name, errno numeric value, and human-readable text). Also cover minimal-impact ways to collect such errors in high-throughput paths.
HardTechnical
50 practiced
Describe TOCTOU (time-of-check to time-of-use) race conditions when performing file system operations. Provide concrete examples where checking a path then opening it leads to vulnerabilities. Explain how openat(2), O_NOFOLLOW, O_DIRECTORY, and fstatat(2) can be used to avoid races and perform secure atomic checks and opens.
MediumTechnical
68 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
55 practiced
Explain how sendfile(2), splice(2), and tee(2) enable zero-copy or reduced-copy data transfer on Linux. For each syscall describe typical use-cases (file->socket, pipe->socket, duplicating data) and limitations (supported fd types, blocking behavior). From an SRE perspective, when would using these APIs be beneficial and what monitoring signals indicate improvements?
HardTechnical
57 practiced
A high-performance server has high context-switch rates and increased user CPU because it issues many small read/write syscalls. Propose actionable strategies to reduce context switches and syscall count (for example, batching, writev/readv, user-space buffering, zero-copy APIs), explain trade-offs in latency vs throughput, and outline how you would benchmark and validate improvements in production.

Unlock Full Question Bank

Get access to hundreds of System Calls Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.