←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Diagrams

Diagrams

Visual representations for Unit 5

Figure 5.1: The 7 Standard Attributes of a File in an Operating System

Figure 5.1: The 7 Standard Attributes of a File in an Operating System
1. Name
Human-readable symbolic file name (e.g., syllabus.pdf)
2. Identifier (Inode)
Unique internal number tag that identifies the file inside the OS
3. Type
Indicates file format (e.g., .txt, .exe, .jpg)
4. Location
Pointer to the device and exact starting block address on the disk
5. Size
Current size of the file in bytes, kilobytes, or blocks
6. Protection
Access control permissions: Who can Read (R), Write (W), or Execute (X)
Explanation
  • A file's metadata records information such as name, size, location and protection.
  • The OS uses those attributes to manage it independently of its contents.
Detailed Notes →Quick Revision →

Figure 5.2: The Three File Access Methods in Operating Systems

Figure 5.2: The Three File Access Methods in Operating Systems
1. Sequential Access
Reads records strictly one after another in order: Record 1 → 2 → 3 (Like a Cassette Tape)
2. Direct (Random) Access
Jumps directly to ANY block N in any order without reading previous blocks (Like a DVD / SSD)
3. Indexed Access
Looks up a key in an in-memory Index Table first, then follows the pointer directly to the disk block
Explanation
  • Sequential access reads in order and direct access jumps to a chosen position.
  • Indexed access looks up a key to find the required record or block.
Detailed Notes →Quick Revision →

Figure 5.3: The 5 Types of Directory Structures in Operating Systems

Figure 5.3: The 5 Types of Directory Structures in Operating Systems
Type 1Single-Level Directory
All files of all users are placed inside ONE single root folder (Causes naming collisions!)
Type 2Two-Level Directory
Master File Directory (MFD) gives each User their own separate User File Directory (UFD)
Type 3Tree-Structured Directory
Users can create unlimited Subdirectories (folders inside folders) forming an inverted tree
Type 4Acyclic-Graph Directory
Allows two users to SHARE the same subdirectory/file via Links (No cycles allowed)
Type 5General Graph Directory
Allows arbitrary links including Cycles (Requires Garbage Collection & Cycle Detection)
Explanation
  • Single-level and two-level directories provide simple name organisation.
  • Trees and graph structures add nested paths or sharing, with extra rules needed for cycles.
Detailed Notes →Quick Revision →

Figure 5.4: The 3 Disk File Allocation Methods in Operating Systems

Figure 5.4: The 3 Disk File Allocation Methods in Operating Systems
1. Contiguous Allocation
File occupies a continuous sequence of adjacent blocks (e.g., Blocks 10, 11, 12, 13)
2. Linked Allocation
File blocks are scattered anywhere; each block holds a pointer to the next block (`9 → 16 → 1 → 10`)
3. Indexed Allocation
All block pointers of a file are collected together inside one special Index Block!
Explanation
  • Contiguous allocation uses neighbouring blocks and linked allocation follows pointers.
  • Indexed allocation stores block addresses in a separate index.
Detailed Notes →Quick Revision →

Figure 5.5: How Indexed Allocation Works Using an Index Block

Figure 5.5: How Indexed Allocation Works Using an Index Block
Directory EntryFile: notes.pdf | Index Block = 19
→ Points to →
Index Block (Block 19)Array of Block Pointers: [ 9 | 16 | 1 | 10 ]
→ Direct Access to →
Scattered Data BlocksBlocks 9, 16, 1, and 10 on Disk
Explanation
  • An index block holds addresses for a file's data blocks.
  • The OS can use an entry to reach the desired block without following every earlier data block.
Detailed Notes →Quick Revision →

Figure 5.6: Physical Geometry of a Magnetic Hard Disk (Platters, Tracks, Sectors & Cylinders)

Figure 5.6: Physical Geometry of a Magnetic Hard Disk (Platters, Tracks, Sectors & Cylinders)
1Platters
Circular magnetic metal disks spinning at 5,400 to 15,000 RPM on a central Spindle
2Tracks
Concentric rings on the surface of each platter (numbered 0 at outer edge to 199 inside)
3Sectors
Each Track is subdivided into hundreds of pie-slice segments called Sectors (Typically 512 Bytes)
4Cylinder
The set of tracks at the exact same arm position vertically across all platters
Explanation
  • Tracks are circular paths on platter surfaces and sectors divide them into units.
  • A cylinder groups tracks at the same position across surfaces.
Detailed Notes →Quick Revision →

Figure 5.7: The Three Core Aspects of Swap-Space Management

Figure 5.7: The Three Core Aspects of Swap-Space Management
1. Swap-Space Use
Used to hold swapped-out processes & anonymous virtual memory pages (Heap/Stack)
2. Swap-Space Location
Can be a Swap File inside the normal file system OR a Separate Raw Swap Partition
3. Swap-Space Allocation
Allocated either at process creation time or dynamically when a page is forced out of RAM
Explanation
  • Swap space reserves backing storage for memory contents removed from RAM.
  • Allocation and tracking let the OS locate those contents when they are needed again.
Detailed Notes →Quick Revision →

Figure 5.8: Key RAID Levels Used for Disk Reliability and Performance

Figure 5.8: Key RAID Levels Used for Disk Reliability and Performance
RAID 0Block-Level Striping (No Redundancy)
Fastest read/write speed, but 0% fault tolerance (If 1 disk fails, all data is lost)
RAID 1Disk Mirroring (100% Duplicate Copy)
Every write is duplicated onto a Mirror Disk — Highest Reliability, but costs 2× disk space
RAID 5Block-Level Striping with Distributed Parity
Distributes data + error-correcting Parity across N disks; survives any 1 disk failure using only 1 disk's worth of overhead!
RAID 10 (1+0)Striped Mirrors (Mirroring + Striping)
Combines the speed of RAID 0 with the bullet-proof reliability of RAID 1 (Needs min 4 disks)
Explanation
  • Striping spreads data across disks and mirroring keeps duplicate copies.
  • Parity-based levels use redundancy to reconstruct data after supported failures.
Detailed Notes →Quick Revision →

Figure 5.9: Classification of Operating System Security Threats

Figure 5.9: Classification of Operating System Security Threats
1. Program Threats (Malicious Code)
  • Trojan Horse: Fake useful app that secretly steals data or installs spyware
  • Trap Door (Backdoor): Secret undocumented entry point left by a programmer to bypass login
  • Logic Bomb: Malicious code that triggers only when a specific date or condition occurs
  • Virus: Self-replicating code that attaches itself to legitimate `.exe` files
2. System & Network Threats
  • Worms: Standalone malware that replicates across networks automatically without human action
  • Port Scanning: Automated probing of a server's TCP/UDP ports to find weak services
  • Denial of Service (DoS): Flooding a system with fake requests so legitimate users are locked out
Explanation
  • Threats can affect a program, an operating system service or network access.
  • The appropriate protection depends on which resource and boundary are involved.
Detailed Notes →Quick Revision →

Figure 5.10: How Windows Security Architecture Works

Figure 5.10: How Windows Security Architecture Works
1. Winlogon & LSASSVerifies User Login & Password against SAM / Active Directory
→ Generates →
2. Access Token (SID)Attached to every process launched by that User
→ Checked by →
3. SRM (Security Reference Monitor)Compares User's Token against the File's ACL (Security Descriptor)
Explanation
  • A signed-in process receives a security context describing its identity and privileges.
  • Access checks compare that context with the requested operation on a protected object.
Detailed Notes →Quick Revision →