Resource Limits

In this chapter, we will look at per-process resource limits—what they are, and why we require them. We will go on to describe the granularity and the types of resource limits, distinguishing between soft and hard limits. Details on how a user (or system administrator) can query and set the per-process resource limits using appropriate CLI frontends (ulimit, prlimit) will be covered.

The programming interfaces (APIs)practically speaking, the key prlimit(2) system call APIwill be covered in detail. Two detailed code examples, querying the limits and setting a limit on CPU usage, will give the reader hands-on experience of working with resource limits.

In this chapter, with regard to resource limits, we will cover the following ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.