A system administrator is investigating a Linux server that unexpectedly terminated a critical application. The server has a large amount of swap space configured. Despite this, the system logs indicate an Out of Memory (OOM) killer event was triggered. Which of the following is the most likely reason for the OOM event to occur even with available swap space?
Swap space is only used for caching files, not for application process memory.
The application's executable file had its read permissions removed.
The kernel required a block of non-swappable memory that could not be allocated.
The OOM killer is automatically disabled when more than 1GB of swap is present.
The correct answer is that the kernel may have attempted a memory allocation that cannot be swapped out. The Linux kernel and certain drivers sometimes require physically contiguous memory blocks that are non-swappable. If such an allocation fails because not enough physical RAM is available, the OOM killer can be invoked regardless of the amount of free swap space. While completely exhausting both RAM and swap space is a common cause for OOM events , the failure to satisfy a non-swappable allocation is a key reason an OOM event can happen even with plenty of swap free. The other options are incorrect: swap space is primarily used for application data (anonymous memory pages), not just file caching; the OOM killer is a last resort and is not disabled by the presence of swap; and the OOM killer's behavior is not determined by file permissions but by the oom_score of a process.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is swap space and how does it work?
Open an interactive chat with Bash
What is the OOM killer and when does it activate?
Open an interactive chat with Bash
What are kernel memory allocation requests and why can't they be swapped out?