System resource
wikipedia System resource
In computing, a system resource, or simply resource, is any physical or virtual component of limited availability within a computer system. Every device connected to a computer system is a resource. Every internal system component is a resource. Virtual system resources include files (concretely file handles), network connections (concretely network sockets), and memory areas. Managing resources is referred to as resource management, and includes both preventing resource leaks (not releasing a resource when a process has finished using it) and dealing with resource contention (when multiple processes wish to access a limited resource).
Major resource types
1、Interrupt request (IRQ) lines
2、Direct memory access (DMA) channels
3、Locks
4、External Devices
5、External memory or objects, such as memory managed in native code, from Java; or objects in the Document Object Model (DOM), from JavaScript
General resources
- CPU, both time on a single CPU and use of multiple CPUs – see multitasking
- Random-access memory and virtual memory – see memory management
- Hard disk drives, include space generally, contiguous free space (such as for swap space), and use of multiple physical devices ("spindles"), since using multiple devices allows parallelism
- Cache space, including CPU cache and MMU cache (translation lookaside buffer)
- Network throughput
- Electrical power
- Input/output operations
- Randomness
实现分析
显然,OS需要描述各种system resource,需要记录下每个进程占用 哪些资源。
limit
系统资源是有限(具有上限),所以一个系统能够支持的最大用户数也是有上限的,这是在阅读 https://idea.popcount.org/2014-04-03-bind-before-connect/ 时,想到的