Operating Systems and Kernel-Level Mechanisms
The OS as a Resource Manager
System Role
An operating system multiplexes hardware among competing programs while protecting isolation and providing abstractions such as processes, threads, virtual memory, and files.
Core Abstractions
What is the main purpose of virtual memory?
Virtual memory provides isolation and abstraction over physical memory.
Correct answer: To provide address translation, isolation, and flexible memory management
Why are system calls necessary?
System calls enforce protection boundaries.
Correct answer: They provide a safe interface for user programs to request privileged kernel services.
Process vs. Thread
Process
- Separate address space
- Stronger isolation
- Higher creation and communication overhead
Thread
- Shares address space with peers
- Cheaper communication
- Requires careful synchronization
How the OS Enforces Isolation
-
1
Separate user and kernel privilege levels.
-
2
Use page tables and memory protection.
-
3
Mediate hardware access through system calls and drivers.
-
4
Schedule execution fairly or according to policy.
-
5
Recover from faults or contain them within a process boundary.
A context switch primarily changes what?
A context switch saves and restores execution state so another task can run.
Correct answer: The executing CPU state from one thread/process to another
Kernel-Level Risk
Bugs in kernel code can compromise the entire machine, which is why kernel design emphasizes minimal trusted code and rigorous testing.
Systems Research Link
Modern OS research spans scheduling for heterogeneous cores, memory disaggregation, security hardening, and virtualized infrastructure. Theory and implementation are tightly coupled.