LX0-104 · Question #685
Which of the following resources can be directly limited for a given user using ulimit? (Choose three correct answers.)
The correct answer is A. Maximum seconds of CPU time spent. B. Maximum number of open file descriptors. C. Maximum number of processes available.. The ulimit command allows for setting various per-process or per-user resource limits, including CPU time, the number of open file descriptors, and the maximum number of processes. These limits are crucial for managing system resources and preventing individual users or processes
Question
Options
- AMaximum seconds of CPU time spent.
- BMaximum number of open file descriptors.
- CMaximum number of processes available.
- DMaximum number of concurrent login sessions.
- EMaximum seconds of login duration per session.
How the community answered
(49 responses)- A86% (42)
- D10% (5)
- E4% (2)
Why each option
The `ulimit` command allows for setting various per-process or per-user resource limits, including CPU time, the number of open file descriptors, and the maximum number of processes. These limits are crucial for managing system resources and preventing individual users or processes from monopolizing them.
`ulimit -t` sets the maximum amount of CPU time in seconds that a process can use, making 'Maximum seconds of CPU time spent' a directly limitable resource.
`ulimit -n` sets the maximum number of open file descriptors, also known as open files, that a user's processes can have.
`ulimit -u` sets the maximum number of user processes (or threads) available to a single user, preventing one user from spawning too many processes.
`ulimit` does not directly control the 'Maximum number of concurrent login sessions'; this is typically managed through PAM or other system-level configuration, not directly by `ulimit`.
`ulimit` does not limit the 'Maximum seconds of login duration per session'; this type of limit is usually managed by other system-wide or service-specific configurations.
Concept tested: ulimit resource limits
Source: https://man7.org/linux/man-pages/man1/ulimit.1p.html
Topics
Community Discussion
No community discussion yet for this question.