- Published on
KembaraXtra- Computer Science-Kernel Mode and User Mode
I. Core Concept: Privilege Levels
I. Core Concept: Privilege Levels
- Definition: A CPU capability that grants the operating system special rights while restricting other code. It's a way to control what different parts of the software can do.
- Purpose: Ensures programs behave well, prevents interference between programs and the OS, restricts direct hardware access, and protects system files.
- Kernel Mode (Supervisor Mode):
- Privileges: Highest level of privilege; full access to the system (memory, I/O devices, special CPU instructions).
- Trust: Code running in kernel mode is trusted.
- Components: Kernel, device drivers, and key OS components.
- User Mode:
- Privileges: Lower level of privilege; limited access.
- Trust: Code running in user mode is untrusted.
- Components: Most applications.
- Ensuring Trust: Only trusted code runs in kernel mode.
- Control: Allows the operating system to enforce rules and prevent user mode code from misbehaving.
- Security: Prevents direct access to hardware and critical system resources by user applications.
- Key Components:
- Kernel & Executive: Core kernel-mode functionalities (often discussed together). Stored in ntoskrnl.exe.
- Hardware Abstraction Layer (HAL): Isolates the kernel, executive, and device drivers from hardware differences.
- Windowing and Graphics System (win32k): Provides graphics drawing and user interface interaction capabilities.
0 Comments