Computer Science › Systems

Operating Systems II

0 of 15
  1. Traps, Interrupts, and Exceptions

    A system call, a hardware interrupt, and a page fault look completely different to the programmer, but the CPU handles all three with the exact same trap mechanism — save the current state, jump to a fixed kernel entry point, and let the kernel sort out why it was called.

    Read →6 sections10 min
  2. Anatomy of a System Call

    Tracing a single call like write() from a user-space library wrapper through the trap instruction, into the kernel's system-call table, through the actual kernel routine, and back — the concrete machinery behind every OS service a program ever asks for.

    Read →6 sections9 min
  3. Validating User Input at the Kernel Boundary

    Every pointer and length a user program hands to a system call is a claim the kernel cannot trust — the same memory-safety failure mode already seen at the application level becomes catastrophic here, because the code trusting bad input is running with full privilege.

    Read →6 sections9 min
  4. Pipes and Anonymous Communication

    The shell's | operator connects one process's standard output directly to another's standard input through a kernel-managed byte buffer — the simplest, oldest, and still most common form of IPC on any Unix-like system.

    Read →6 sections9 min
  5. Shared Memory IPC

    The kernel maps the exact same physical page into two otherwise-isolated address spaces, giving both processes direct, zero-copy access to the same bytes — the fastest IPC mechanism there is, and the one that hands all synchronization responsibility straight back to the already-covered lock and semaphore mechanics.

    Read →6 sections9 min
  6. Message Queues and Structured IPC

    Instead of a raw shared buffer or an undifferentiated byte stream, the kernel manages discrete, typed messages with their own delivery and ordering guarantees — trading shared memory's raw speed for safety, since the kernel mediates every access instead of trusting processes to coordinate correctly on their own.

    Read →6 sections8 min
  7. Sockets as a Uniform IPC Abstraction

    The Berkeley sockets API presents communication with a process on the same machine and a process on the other side of the planet through the exact same read/write interface — the abstraction this discipline's IPC mechanisms converge on, and the one a future networking discipline builds directly on top of.

    Read →6 sections9 min
  8. Full-System Virtualization and Hypervisors

    A hypervisor runs an entire guest operating system — kernel, drivers, and all — as if it had a whole machine to itself, by intercepting every privileged instruction the guest tries to execute and emulating its effect instead of letting it touch the real hardware.

    Read →6 sections9 min
  9. Hardware-Assisted Virtualization

    Trap-and-emulate alone could not virtualize the real x86 instruction set, because a handful of privileged instructions failed to trap at all when run in user mode — the real reason Intel VT-x and AMD-V added a second privilege dimension purpose-built for hypervisors.

    Read →6 sections9 min
  10. Containers and OS-Level Virtualization

    A container shares the host's single kernel and gets its isolated view of processes, network interfaces, and mounts entirely from namespaces, with cgroups capping the resources it can consume — no guest kernel to boot, which is exactly why containers start in milliseconds where a virtual machine takes seconds.

    Read →6 sections10 min
  11. Access Control Lists and Unix Permissions

    An access control list attaches to each object the exact list of subjects allowed to touch it and how — Unix's read/write/execute permission bits are a deliberately simplified, three-bucket version of this idea, and the concrete mechanism the OS uses to enforce the authorization policies already discussed abstractly elsewhere.

    Read →6 sections9 min
  12. Capability-Based Security

    Instead of asking an object's ACL whether a subject may act on it, a capability is an unforgeable ticket a process already holds that proves it may — a genuinely different model, real in systems like seL4, that sidesteps the classic confused-deputy problem an ACL-based design is prone to.

    Read →6 sections10 min
  13. Sandboxing and the Principle of Least Privilege

    chroot, seccomp, and dropping setuid privileges are all the same real idea applied at different granularities — give a running process the absolute minimum access it needs to do its job, so that if it is ever compromised, the blast radius is small on purpose, not by luck.

    Read →6 sections10 min
  14. Capstone: Tracing a Container Launch and Comparing Isolation Boundaries

    Following a single `docker run` from the shell's fork/exec through namespace and cgroup setup to the sandboxed process's first system call ties together every cluster in this discipline — and closes with an honest, numeric comparison of how much isolation a container, a VM, and a bare process each actually buy, and at what cost.

    Read →6 sections9 min

Operating Systems II

Part of the Computer Science curriculum.

Sort
1

Dual-Mode Execution and Privilege Rings

The hardware distinguishes exactly two execution modes — kernel and user — and enforces which instructions and memory each one can touch, the single mechanism every other OS-level protection guarantee in this discipline is ultimately built from.

2

Traps, Interrupts, and Exceptions

A system call, a hardware interrupt, and a page fault look completely different to the programmer, but the CPU handles all three with the exact same trap mechanism — save the current state, jump to a fixed kernel entry point, and let the kernel sort out why it was called.

3

Anatomy of a System Call

Tracing a single call like write() from a user-space library wrapper through the trap instruction, into the kernel's system-call table, through the actual kernel routine, and back — the concrete machinery behind every OS service a program ever asks for.

4

Validating User Input at the Kernel Boundary

Every pointer and length a user program hands to a system call is a claim the kernel cannot trust — the same memory-safety failure mode already seen at the application level becomes catastrophic here, because the code trusting bad input is running with full privilege.

5

Pipes and Anonymous Communication

The shell's | operator connects one process's standard output directly to another's standard input through a kernel-managed byte buffer — the simplest, oldest, and still most common form of IPC on any Unix-like system.

6

Shared Memory IPC

The kernel maps the exact same physical page into two otherwise-isolated address spaces, giving both processes direct, zero-copy access to the same bytes — the fastest IPC mechanism there is, and the one that hands all synchronization responsibility straight back to the already-covered lock and semaphore mechanics.

7

Message Queues and Structured IPC

Instead of a raw shared buffer or an undifferentiated byte stream, the kernel manages discrete, typed messages with their own delivery and ordering guarantees — trading shared memory's raw speed for safety, since the kernel mediates every access instead of trusting processes to coordinate correctly on their own.

8

Sockets as a Uniform IPC Abstraction

The Berkeley sockets API presents communication with a process on the same machine and a process on the other side of the planet through the exact same read/write interface — the abstraction this discipline's IPC mechanisms converge on, and the one a future networking discipline builds directly on top of.

9

Full-System Virtualization and Hypervisors

A hypervisor runs an entire guest operating system — kernel, drivers, and all — as if it had a whole machine to itself, by intercepting every privileged instruction the guest tries to execute and emulating its effect instead of letting it touch the real hardware.

10

Hardware-Assisted Virtualization

Trap-and-emulate alone could not virtualize the real x86 instruction set, because a handful of privileged instructions failed to trap at all when run in user mode — the real reason Intel VT-x and AMD-V added a second privilege dimension purpose-built for hypervisors.

11

Containers and OS-Level Virtualization

A container shares the host's single kernel and gets its isolated view of processes, network interfaces, and mounts entirely from namespaces, with cgroups capping the resources it can consume — no guest kernel to boot, which is exactly why containers start in milliseconds where a virtual machine takes seconds.

12

Access Control Lists and Unix Permissions

An access control list attaches to each object the exact list of subjects allowed to touch it and how — Unix's read/write/execute permission bits are a deliberately simplified, three-bucket version of this idea, and the concrete mechanism the OS uses to enforce the authorization policies already discussed abstractly elsewhere.

13

Capability-Based Security

Instead of asking an object's ACL whether a subject may act on it, a capability is an unforgeable ticket a process already holds that proves it may — a genuinely different model, real in systems like seL4, that sidesteps the classic confused-deputy problem an ACL-based design is prone to.

14

Sandboxing and the Principle of Least Privilege

chroot, seccomp, and dropping setuid privileges are all the same real idea applied at different granularities — give a running process the absolute minimum access it needs to do its job, so that if it is ever compromised, the blast radius is small on purpose, not by luck.

15

Capstone: Tracing a Container Launch and Comparing Isolation Boundaries

Following a single `docker run` from the shell's fork/exec through namespace and cgroup setup to the sandboxed process's first system call ties together every cluster in this discipline — and closes with an honest, numeric comparison of how much isolation a container, a VM, and a bare process each actually buy, and at what cost.