Linux vs Windows Internals
| Aspect | Linux | Windows NT |
|---|---|---|
| Kernel type | Monolithic (with modules) | Hybrid (microkernel-like architecture with kernel-mode drivers) |
| Configuration | Text files in /etc | Registry (binary key-value database) |
| File system | Ext4, XFS, Btrfs (everything is a file) | NTFS, ReFS (object-based) |
| Process creation | fork() + exec() | CreateProcess() — single call |
| GUI | Separate (X11/Wayland) | Integrated into kernel |
| Drivers | In-kernel or loadable modules | Kernel-mode driver model (.sys files) |
| Command line | Rich (bash, zsh, coreutils) | PowerShell, cmd |
| File permissions | rwx for user/group/others (POSIX ACLs) | NTFS ACLs (complex, granular) |
Linux’s “everything is a file” philosophy: files, directories, sockets, pipes, devices (/dev), process info (/proc), and kernel parameters (/sys) are all accessed via the same read/write system calls.
OS Security Basics
Authentication (AuthN) — “Who are you?”
Verifying identity:
- Something you know: password, PIN
- Something you have: security key, phone
- Something you are: fingerprint, face, retina
Authorization (AuthZ) — “What can you do?”
Controlling access after authentication:
- Discretionary Access Control (DAC): file owner decides permissions (Unix rwx)
- Mandatory Access Control (MAC): system-wide policy enforced regardless of owner (SELinux, AppArmor)
- Role-Based Access Control (RBAC): permissions tied to roles (employee, manager, admin)
Access Control Lists (ACLs)
A list of entries specifying which users/groups have which permissions on an object. More flexible than standard Unix rwx — you can give different permissions to specific users.
RTOS (Real-Time OS)
Unlike general-purpose OSes (which optimize throughput and fairness), an RTOS optimizes predictability.
| Property | GPOS (Linux/Windows) | RTOS (QNX, VxWorks) |
|---|---|---|
| Scheduling | Fairness (CFS) | Priority-based, preemptive |
| Interrupt latency | Variable (can be high) | Bounded (guaranteed max) |
| Kernel preemption | Coarse | Fine-grained |
| Priority inversion | Possible (can fix with priority inheritance) | Designed to minimize |
Q: What is a major architectural difference between Linux and Windows?
A: Linux uses a monolithic kernel — all core services run in kernel space for performance. Windows NT uses a hybrid kernel — core OS components run in kernel mode, but many subsystems are isolated. Linux uses “everything is a file”; Windows uses objects and handles.
Q: Difference between Authentication and Authorization?
A: Authentication (AuthN) verifies identity — “who are you?” (password, fingerprint). Authorization (AuthZ) determines permissions — “what can you do?” (can you read this file?). AuthN always comes before AuthZ.
Q: Why can’t we use standard Windows for a self-driving car?
A: Standard OSes are “best effort” — they might pause a critical process for a background update or virus scan. An RTOS guarantees a response within a bounded time — milliseconds every single time. A self-driving car cannot tolerate unpredictable delays.
Q: What is an Access Control List (ACL)?
A: An ACL is a list of permissions attached to a file, directory, or other object. Each entry (ACE) specifies which user/group has which access rights (read, write, execute, delete). ACLs provide finer-grained control than standard Unix rwx permissions.
Premium Content
Unlock OS Internals & Security and all premium lessons with a subscription.
From ₹199.99/year — See plans