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.

MediumTechnical
52 practiced
Describe copy-on-write semantics after fork(2) on Linux. When the child writes to memory, what happens at page granularity? Explain how madvise(MADV_DONTNEED), mlockall, and the kernel OOM killer interact with COWed pages, and list SRE best practices for services that rely on frequent forking with large address spaces.
MediumTechnical
103 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.
HardTechnical
63 practiced
Write a robust C function that daemonizes a process: perform the right fork/setsid/double-fork sequence or the recommended modern alternative, set umask, chdir("/"), close or redirect file descriptors, and ensure a single-instance using a lockfile with fcntl(2). Provide code and explain race conditions and why a double fork avoids acquiring a controlling terminal.
EasyTechnical
65 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
63 practiced
Describe differences between fork(2), vfork(2), and clone(2) on Linux. Explain copy-on-write semantics after fork, behavioral/performance differences for vfork, and how clone allows thread-like or namespace behavior. For each primitive, give SRE-relevant use cases and hazards (e.g., memory doubling, deadlocks, container namespace creation).

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.