Processes (user and system) get process numbers which are distinct from pid's.
The process number is almost the index in the process table, which in general has no relation to the process id.
The process numbers of the system tasks and the first few system processes:
- IDLE -4
- CLOCK -3
- SYSTEM -2
- KERNEL -1
- pm 0
- fs 1
- rs 2
NR_TASKS is 4 and each task has a negative process number; i.e., -4 to -1.
The IDLE process (has process nr -4) is in the proc table at index 0. In general a process is at index (process nr) + NR_TASKS.
Here are the process numbers and process id's of the user level system processes, pm, fs, rs:
Process Name | Process NR | Process ID | Index in proc table |
---|---|---|---|
IDLE | -4 | (-4) | 0 |
CLOCK | -3 | (-3) | 1 |
SYSTEM | -2 | (-2) | 2 |
KERNEL | -1 | (-1) | 3 |
pm | 0 | 0) | 4 |
pm | 0 | 0 | 4 |
fs | 1 | 4 | 5 |
rs | 2 | 5 | 6 |