What is the purpose of process limits?
To prevent individual programs from overconsuming system resources.
Why are process limits important?
They ensure system stability and responsiveness.
What are key process limits?
CPU Time, Memory Usage, Stack Size, Number of Open File Descriptors, and Core File Size.
What does CPU Time limit define?
Total seconds a process may run on the CPU.
What happens when CPU time is exhausted?
The kernel stops the process.
Why limit CPU time?
Prevents single tasks from monopolizing CPU and helps with capacity planning.
What does Memory Usage limit do?
Sets upper limit on a process’s virtual address space including RAM and swap.
What is swap space?
Disk area used as RAM overflow.
Why limit memory usage?
Protects against memory leaks and runaway applications.
What does Stack Size limit control?
Memory reserved for a process’s call stack.
What is stored in the call stack?
Return addresses, parameters, and local variables.
Why limit stack size?
Prevents memory corruption and crashes from deep recursion.
What is a file descriptor?
An integer referencing an open file, socket, or pipe.
Why limit number of open file descriptors?
Prevents errors like ‘too many open files’ and resource exhaustion.
What happens if file descriptor limit is exceeded?
May lead to dropped connections or data loss.
Why monitor file descriptors?
To detect leaks from unclosed descriptors and optimize resource management.
What does Core File Size limit control?
Whether and how large a crash memory dump file will be.
Why limit core file size?
Balances diagnostic needs and storage usage.
Why are core dumps useful?
For post-crash debugging.
What risk do unrestricted core dumps pose?
They can quickly consume disk space.