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
0 practiced
Describe how timerfd_create(2) and signalfd(2) can be used to deliver timer expirations and signals as file-descriptor events, enabling integration with epoll-based event loops. Provide clear pseudocode or a short example showing how to add both types of fd to an epoll set and how this improves safety and simplicity compared to asynchronous signal handlers.
MediumTechnical
0 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.
EasyTechnical
0 practiced
List the POSIX functions that are async-signal-safe and explain why that property matters when implementing signal handlers. Give concrete SRE examples of what is safe to do in a handler (e.g., set a volatile sig_atomic_t flag, write a byte to a pipe) and what is dangerous (e.g., calling malloc, printf), and explain how to integrate signal handling safely into an event-driven server.
MediumTechnical
0 practiced
You suspect a running process is leaking file descriptors and hitting EMFILE. Describe, step-by-step and with concrete commands, how you would locate and confirm the leak on a production Linux host without restarting the process. Include use of /proc/<pid>/fd, lsof, strace, and explain trade-offs between using strace vs eBPF/bpftrace for live systems.
MediumTechnical
0 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.
Unlock Full Question Bank
Get access to hundreds of System Calls Fundamentals interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.