- Execution of Unix processes could be devided into two levels: User mode and Kernel mode. Many other systems like Windows have more levels, but for Unix, two levels are enough. The differences of these two levels are:
- User mode process could access only their own instructions and data; while Kernel mode process could access both user and kernel instructions and data. A virtual address of a process could be devided into kernel mode only address and kernel/user mode address.
- Process in user mode could not execute some privileged instructions, like operating on processor or register, or it will cause error.
- The system will attempt to restart the instruction after it caused an exception; and the system will continue the next instruction after it has serviced the interupt. But the system provides one mechanism to handle both exception and interupt.
- Processors execution levels, from top to low:
Machine Errors Clock Disk Network Devices Terminals Software Interrupts
- The kernel resides in the main memory PERMANENTLY, while the currently running process resides in the memory as well(maybe not all, but at least part of it).