codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Subjects
🖥️

Operating Systems

25 chapters

1Intro to OS & Kernel Architecture2Process Concept & Lifecycle3System Calls & Interrupts4Process Management & PCB5Inter-Process Communication (IPC)6CPU Scheduling (FCFS, SJF, RR)7Threads (User vs Kernel Level)8Process Synchronization9Critical Section Problem10Producer-Consumer Problem11Dining Philosophers Problem12Deadlock Conditions & Prevention13Banker's Algorithm (Avoidance)14Memory Management & Paging15Memory Allocation (First Fit, Best Fit)16Paging and Segmentation17Translation Lookaside Buffer (TLB)18Virtual Memory & Demand Paging19Page Replacement Algorithms20Thrashing21File Systems & Directory Structure22File Allocation Methods23Disk Scheduling Algorithms24I/O Systems & DMA25OS Protection & Security
SubjectsOperating Systems

OS Protection & Security

Updated 2026-05-06
2 min read

OS Protection & Security

Protection refers to mechanisms for controlling the access of programs, processes, or users to resources defined by the OS. Security refers to defending the system against external and internal attacks.

1. Goals of Protection

The principle of Least Privilege states that every process should operate with the minimum set of privileges necessary to complete its task. A web server process should not have permission to modify the kernel or read SSH private keys.

2. Access Control

Access Control Matrix

A conceptual matrix where rows represent users/processes (subjects) and columns represent resources (objects). Each cell contains the set of permissions (read, write, execute).

Access Control Lists (ACLs)

Each resource stores a list of which users/groups can access it and what operations they can perform. This is the column-based view of the access control matrix. Used by NTFS on Windows.

Capability Lists

Each user stores a list of resources they can access and the permitted operations. This is the row-based view. Used in some microkernel systems.

Unix Permission Model

Each file has three sets of permissions (Owner, Group, Others), each specifying Read (r), Write (w), Execute (x). Represented as a 9-bit value (e.g., rwxr-xr-- = 754 in octal).

3. Common Security Threats

Buffer Overflow

A program writes more data to a buffer than it can hold, overwriting adjacent memory. An attacker crafts the overflow to overwrite the return address on the stack, redirecting execution to malicious code.

  • Defense: Stack canaries, ASLR (Address Space Layout Randomization), NX bit (non-executable stack).

Privilege Escalation

An attacker exploits a vulnerability to gain higher privileges than intended (e.g., going from a regular user to root).

Denial of Service (DoS)

Flooding a system with so many requests that it cannot serve legitimate users.

Trojan Horse

A program that appears legitimate but contains hidden malicious functionality.

4. Authentication

How the OS verifies the identity of a user:

  • Something you know: Passwords (stored as salted hashes, not plaintext).
  • Something you have: Hardware tokens, smart cards.
  • Something you are: Biometrics (fingerprint, facial recognition).
  • Multi-Factor Authentication (MFA): Combining two or more of the above for stronger security.


PreviousI/O Systems & DMA

Recommended Gear

I/O Systems & DMA