RTUComputer ScienceYr 2024 · Sem 52024

Q6Operating Systems (Departmental Elective)

Question

4 marks

Describe the concept of File Protection mechanisms.

Answer

An architectural review of File Protection mechanisms, detailing how Access Control Lists (ACLs) and UNIX Permission Bits mathematically enforce strict read, write, and execute boundaries between independent users.

In a modern, massively multi-user Operating System (like a university Linux server), hundreds of users simultaneously share the exact same physical Hard Drive. Without absolute mathematical protection architectures, User A could violently delete, corrupt, or maliciously steal User B's financial databases. File Protection is the strict OS subsystem engineered to guarantee complete data isolation and controlled sharing.

1. Access Control Lists (ACLs)

The most granular and mathematically absolute protection mechanism. - Architecture: Every single file on the disk is physically attached to a massive, hidden list. This list explicitly dictates the exact User ID and the exact operations they are authorized to perform (Read, Write, Execute). - Mechanism: When User A attempts to write() to file.txt, the OS Kernel violently halts the operation, scans the ACL, and if User A lacks the mathematical Write permission, the OS instantly throws an "Access Denied" exception.

2. The UNIX Permission Architecture

Because massive ACLs consume catastrophic amounts of disk space, UNIX/Linux engineered a highly compressed, 9-bit mathematical abstraction.

  • The universe is strictly divided into three domains: Owner (The creator), Group (A specific team), and Universe (Everyone else).
  • Each domain is assigned exactly 3 binary bits: r (Read), w (Write), x (Execute).
  • Example rwxr-xr-- (754): - The Owner has absolute power: rwx (Read, Write, Execute). - The Group is mathematically restricted: r-x (Can read and execute, absolutely cannot modify). - The Universe is violently locked out: r-- (Can only read, cannot execute or modify).

This 9-bit integer is physically embedded into the file's i-node, allowing the OS to execute blisteringly fast mathematical bitwise AND operations to verify permissions on every single file access.

Back to Paper