Most processors support at least two execution modes:
- Non-privileged mode, that is, user mode
- Privileged mode , Namely system mode, control mode or kernel mode
user mode
Kernel mode
Process management
- Process creation and termination
- Process scheduling and dispatch
- Process switching
- Process synchronization and support for inter-process communication
- Management of process control block
Memory management
- Allocate address space to processes
- Exchange
- Management of pages and sections
I/O management
- Buffer management
- Assign I/O channels and devices to the process
support function
non-privileged state and Called user mode, user programs usually run in this mode
Kernel mode refers to the kernel of the operating system, which is a part of the operating system that contains important system functions.
The typical functions of the operating system kernel mode are as follows:
- Process creation and termination
- Process scheduling and dispatch
- Process switching
- Process synchronization and support for inter-process communication
- Management of process control block
- Allocate address space to the process
- Exchange
- Management of pages and segments
- Buffer management
- Allocate I/O channels and devices to the process
The reason for using the two modes Yes, in order to protect the operating system and important operating system tables (such as process control blocks) from user program interference
interrupt processing