Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

OS Internals & Security
OS

OS Internals & Security

Compare Linux and Windows architectures and understand the basics of system security: Authentication and Authorization.

Linux vs Windows Internals

AspectLinuxWindows NT
Kernel typeMonolithic (with modules)Hybrid (microkernel-like architecture with kernel-mode drivers)
ConfigurationText files in /etcRegistry (binary key-value database)
File systemExt4, XFS, Btrfs (everything is a file)NTFS, ReFS (object-based)
Process creationfork() + exec()CreateProcess() — single call
GUISeparate (X11/Wayland)Integrated into kernel
DriversIn-kernel or loadable modulesKernel-mode driver model (.sys files)
Command lineRich (bash, zsh, coreutils)PowerShell, cmd
File permissionsrwx 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.

PropertyGPOS (Linux/Windows)RTOS (QNX, VxWorks)
SchedulingFairness (CFS)Priority-based, preemptive
Interrupt latencyVariable (can be high)Bounded (guaranteed max)
Kernel preemptionCoarseFine-grained
Priority inversionPossible (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.

My Private Notes

Notes are auto-saved locally to this device.