0% found this document useful (0 votes)
2 views19 pages

OS Complete Notes

The document provides comprehensive study notes on operating systems, covering key topics such as I/O devices, file systems, disk storage technologies (HDD vs SSD), disk scheduling algorithms, and RAID configurations. It includes definitions, advantages, disadvantages, and applications for each topic, offering insights into I/O subsystems, buffering techniques, and file organization methods. The notes serve as a detailed reference for understanding the fundamental concepts and technologies related to operating systems.

Uploaded by

rajnidevi0001986
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views19 pages

OS Complete Notes

The document provides comprehensive study notes on operating systems, covering key topics such as I/O devices, file systems, disk storage technologies (HDD vs SSD), disk scheduling algorithms, and RAID configurations. It includes definitions, advantages, disadvantages, and applications for each topic, offering insights into I/O subsystems, buffering techniques, and file organization methods. The notes serve as a detailed reference for understanding the fundamental concepts and technologies related to operating systems.

Uploaded by

rajnidevi0001986
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Operating Systems

Complete Study Notes


I/O Devices · File Systems · Disk Storage · RAID

I/O Devices & Subsystems ✦ I/O Buffering Techniques ✦ Disk Storage: HDD vs
SSD ✦ Disk Scheduling Algorithms ✦ RAID Levels

File Concept & Organization ✦ File Allocation Methods ✦ File Directories (Flat &
Hierarchical) ✦ File Sharing & Protection ✦ File System Implementation

Operating Systems — Complete Study Notes


Operating Systems — Complete Notes Page 2

UNIT 1: I/O Devices & I/O Subsystems

1.1 Definitions
I/O Device Any hardware component that allows a computer to communicate with the outside
world, including input, output, and storage devices.

I/O Subsystem The part of the OS responsible for managing all I/O operations, providing a uniform
interface between devices and the rest of the system.

Device Driver A software module that translates OS commands into device-specific instructions,
acting as the interface between the OS and hardware.

Interrupt A signal sent by a device to the CPU indicating that it requires attention, allowing the
CPU to handle I/O asynchronously.

DMA (Direct Memory A mechanism allowing I/O devices to transfer data directly to/from memory without
Access) constant CPU involvement, increasing efficiency.

1.2 Classification of I/O Devices


• Block Devices: Store data in fixed-size blocks; addressable independently (e.g., hard disks, USB drives,
SSDs).
• Character Devices: Transfer data character by character in a stream; not addressable (e.g., keyboards, mice,
serial ports).
• Network Devices: Handle data transmission over networks using sockets (e.g., Ethernet NICs, Wi-Fi
adapters).
• Special Devices: Virtual devices managed by OS (e.g., /dev/null, /dev/random in Unix).

1.3 I/O Subsystem Functions


• Scheduling: Determines the order in which I/O requests are serviced to minimize latency.
• Buffering: Temporarily stores data in transit between devices and processes.
• Caching: Keeps frequently used data in fast memory to reduce I/O operations.
• Spooling: Queues output for slow devices (e.g., printer spooler) so processes are not blocked.
• Error Handling: Detects and recovers from I/O errors; retries or reports to the OS.
• Device Reservation: Manages exclusive access for devices like tape drives to prevent conflicts.

✔ Advantages
✔ Uniform interface hides device complexity from applications.

✔ DMA reduces CPU overhead for large data transfers.

✔ Interrupt-driven I/O allows CPU to multitask efficiently.

✔ Spooling enables concurrent use of slow devices.

✘ Disadvantages
✘ Complex driver development for each device type.

✘ Interrupt overheads can reduce performance under heavy I/O load.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 3

✘ DMA conflicts can cause bus contention.

✘ Error handling adds complexity to the I/O subsystem.

★ Applications
★ Printers, scanners, and input devices in office environments.

★ Storage systems in data centers use advanced I/O subsystems.

★ Network I/O in web servers and cloud computing platforms.

★ Embedded systems in automotive, medical, and IoT devices.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 4

UNIT 2: I/O Buffering

2.1 Definitions
Buffering Temporary storage of data in a memory area (buffer) to smooth out differences in
speed between producer and consumer.

Single Buffering One buffer is used; the process must wait for the buffer to be consumed before
refilling it.

Double Buffering Two alternating buffers allow one to be filled while the other is being consumed,
improving throughput.

Circular Buffering A ring of multiple buffers; new data wraps around to reuse consumed buffer slots,
used in high-speed streams.

Spooling Simultaneous Peripheral Operations On-Line; uses disk as a large buffer for devices
like printers.

2.2 Buffering Techniques


Type Buffers Used CPU Waits? Best For

Single 1 Yes, between writes Simple, low-speed devices

Double 2 Rarely Streaming audio/video

Circular N (ring) No Real-time systems, networks

Spooling Disk-based No Printers, batch jobs

✔ Advantages
✔ Decouples producer and consumer speeds, preventing bottlenecks.

✔ Double buffering nearly eliminates CPU idle time during I/O.

✔ Circular buffers efficiently support real-time data streaming.

✔ Spooling allows simultaneous job submission to slow devices.

✘ Disadvantages
✘ Consumes additional memory for buffer storage.

✘ Single buffering still causes process blocking.

✘ Circular buffer overflow if producer is always faster than consumer.

✘ Spooling requires extra disk space and management overhead.

★ Applications
★ Streaming platforms (Netflix, YouTube) use circular buffering for video.

★ Operating system kernels use double buffering for disk reads.

★ Printers use spooling to queue multiple print jobs.

★ Network stacks use ring buffers for packet processing.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 5

UNIT 3: Disk Storage Technologies — HDD vs SSD

Q: Discuss different disk storage technologies, such as HDDs and SSDs.

3.1 Definitions
HDD (Hard Disk Drive) A magnetic storage device with spinning platters and read/write heads that access
data by physical movement.

SSD (Solid State Drive) A non-volatile flash-based storage device with no moving parts, offering faster
access times and higher durability.

Seek Time Time taken for the disk head to move to the correct track on a platter.

Rotational Latency Time for the platter to rotate the correct sector under the read/write head.

Transfer Rate Speed at which data is read from or written to the storage medium.

NAND Flash The type of non-volatile memory used in SSDs; stores data as electrical charges in
floating-gate transistors.

3.2 HDD vs SSD Comparison


Feature HDD SSD

Technology Magnetic spinning platters NAND Flash memory

Speed (Read) 80–160 MB/s 500–7000 MB/s

Access Time 5–10 ms 0.1 ms

Moving Parts Yes (head, platter) None

Durability Susceptible to shock Highly shock-resistant

Power Use Higher (motor) Lower (no motor)

Cost per GB Lower (~$0.02–0.04) Higher (~$0.06–0.12)

Lifespan Mechanical wear Write cycle limit (TBW)

Noise Audible Silent

Form Factor 3.5" / 2.5" 2.5", M.2, PCIe

Best Use Mass storage, archives OS, apps, performance

3.3 HDD — Advantages, Disadvantages & Applications


✔ Advantages
✔ Lower cost per GB — ideal for large-capacity storage.

✔ Mature technology with wide availability.

✔ Suitable for sequential read/write workloads (video archives).

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 6

✔ Easily recoverable data using magnetic recovery tools.

✘ Disadvantages
✘ Slow random access due to mechanical seek and rotation.

✘ Fragile — susceptible to physical shock and vibration.

✘ Higher power consumption and heat generation.

✘ Produces audible noise during operation.

★ Applications
★ NAS (Network Attached Storage) for home and office backups.

★ Surveillance systems storing weeks of video footage.

★ Data archiving in enterprises (cold storage).

★ Desktop PCs where cost-per-GB matters more than speed.

3.4 SSD — Advantages, Disadvantages & Applications


✔ Advantages
✔ Extremely fast random read/write speeds.

✔ Silent operation with no moving parts.

✔ More durable — handles drops and vibration well.

✔ Lower power consumption — extends laptop battery life.

✘ Disadvantages
✘ Higher cost per GB compared to HDD.

✘ Limited write endurance (TBW — Terabytes Written).

✘ Data recovery is more difficult than HDD if chip fails.

✘ NAND flash degrades over many write cycles.

★ Applications
★ Operating system drives in laptops and desktops for fast boot.

★ Enterprise databases requiring low-latency random I/O.

★ Gaming PCs for faster game loading times.

★ Ultrabooks and mobile devices where form factor and power matter.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 7

UNIT 4: Disk Scheduling Algorithms

4.1 Definitions
Disk Scheduling The method used by an OS to determine the order in which disk I/O requests are
serviced to minimize seek time.

Seek Time Time for the disk arm to position over the correct track.

FCFS First Come First Served — requests served in arrival order; simple but may cause
high seek movement.

SSTF Shortest Seek Time First — next request with minimum seek distance is served; can
cause starvation.

SCAN Disk arm moves in one direction serving requests, reverses at the end; like an
elevator.

C-SCAN Circular SCAN — after reaching end, arm returns to beginning without serving
requests on the way back.

4.2 Algorithm Comparison Table


Algorithm Strategy Advantage Disadvantage

FCFS First Come First Served Simple, fair Poor performance on scattered requests

SSTF Shortest Seek Time First Reduces seek time Starvation of distant requests

SCAN (Elevator)
Move in one direction, then reverse No starvation Long wait at extremes

C-SCAN Circular SCAN, return to start Uniform wait time Wasted return sweep

LOOK Like SCAN but reverses at last request Better than SCAN Slightly complex

C-LOOK Circular LOOK Best average wait Most complex

✔ Advantages
✔ Disk scheduling reduces total seek distance, improving throughput.

✔ SCAN and C-SCAN prevent starvation unlike SSTF.

✔ LOOK and C-LOOK are more efficient by not going to disk extremes.

✔ Modern OS combines scheduling with caching for best performance.

✘ Disadvantages
✘ SSTF causes starvation for requests at disk extremes.

✘ FCFS has poor performance on workloads with scattered requests.

✘ SCAN has higher average wait time for requests just passed.

✘ SSD performance is less dependent on scheduling — algorithms matter more for HDD.

★ Applications
★ File servers handling many concurrent disk I/O requests.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 8

★ Database management systems with heavy random read/write operations.

★ Video editing workstations streaming large sequential files.

★ Operating system I/O schedulers (Linux CFQ, Deadline, NOOP).

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 9

UNIT 5: RAID — Redundant Array of Independent Disks

5.1 Definitions
RAID A storage technology that combines multiple disk drives into a single unit for
redundancy, performance, or both.

Striping Dividing data into chunks spread across multiple disks, increasing read/write speed
by parallelism.

Mirroring Maintaining identical copies of data on two or more disks, providing fault tolerance.

Parity Extra data computed from actual data that allows reconstruction of lost data if a disk
fails.

RAID 0 Striping without parity or mirroring; maximum speed, no redundancy.

RAID 1 Mirroring; each disk duplicated; full fault tolerance at 50% storage efficiency.

RAID 5 Striping with distributed parity across all disks; tolerates 1 disk failure.

RAID 6 Striping with double distributed parity; tolerates 2 simultaneous disk failures.

RAID 10 Combination of RAID 1 (mirror) and RAID 0 (stripe); high performance + redundancy.

5.2 RAID Levels Comparison


RAID Level Description Min Disks Fault Tolerance Use Case

RAID 0 Striping, no parity 2 None High speed, no redundancy

RAID 1 Mirroring 2 1 disk failure Critical data backup

RAID 5 Striping + distributed parity 3 1 disk failure Servers, NAS

RAID 6 Striping + double parity 4 2 disk failures Enterprise storage

RAID 10 Mirror + Stripe 4 Multiple High performance + redundancy

✔ Advantages
✔ RAID improves read/write performance through parallelism (RAID 0, 10).

✔ Fault tolerance protects data from single or double disk failure (RAID 1, 5, 6).

✔ RAID 5 offers a good balance of cost, capacity, and redundancy for servers.

✔ RAID 10 provides highest performance + redundancy for mission-critical systems.

✘ Disadvantages
✘ RAID 0 has zero fault tolerance — one disk failure loses all data.

✘ RAID 1 wastes 50% of total storage capacity.

✘ RAID 5 rebuild after failure is slow and risks data loss if another disk fails during rebuild.

✘ RAID is not a substitute for backup — it does not protect against accidental deletion.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 10

★ Applications
★ RAID 0: Video editing workstations needing fast scratch storage.

★ RAID 1: Servers requiring critical system disk redundancy.

★ RAID 5: File servers and NAS for cost-effective redundancy.

★ RAID 10: Databases and enterprise applications needing both speed and reliability.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 11

UNIT 6: File System — File Concept

6.1 Definitions
File A named collection of related information recorded on secondary storage; the basic
unit of storage in an OS.

File Attribute Metadata stored with a file: name, type, size, location, protection bits, timestamps,
owner.

File Type Category of file format: executable (.exe), text (.txt), image (.jpg), audio (.mp3), etc.

File Operation Actions performed on files: create, read, write, seek, delete, truncate, append.

File Structure The internal organization of a file: unstructured byte stream, fixed-length records, or
variable-length records.

File Access Method How data within a file is retrieved: sequential, direct (random), or indexed access.

6.2 File Access Methods


• Sequential Access: Data read in order from beginning to end; position pointer advances automatically. Used
in text editors, compilers.
• Direct (Random) Access: Data read/written at any position using a block number or offset. Used in databases.
• Indexed Access: Uses an index structure to locate records by key; combines sequential and direct access.
Used in ISAM, B-tree databases.

✔ Advantages
✔ Files abstract away hardware details, providing uniform access.

✔ File attributes enable efficient searching, sorting, and management.

✔ Indexed access provides fast retrieval for large datasets.

✔ OS-managed files ensure persistence across system reboots.

✘ Disadvantages
✘ Sequential access is slow for non-sequential data retrieval.

✘ Direct access wastes storage if blocks are pre-allocated.

✘ Index tables consume additional storage space.

✘ File metadata must be kept consistent — corruption causes data loss.

★ Applications
★ Text editors and log files use sequential access.

★ Relational databases use direct access for fast record retrieval.

★ ISAM (Indexed Sequential Access Method) used in legacy banking systems.

★ File systems on OS for documents, programs, and system data.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 12

UNIT 7: File Organization & Allocation Methods

Q: Discuss the organization of files within file systems, including contiguous, linked,
and indexed allocation methods.

7.1 Definitions
Contiguous Allocation Each file occupies a set of consecutive disk blocks; the directory stores the starting
block and length.

Linked Allocation Each block of a file contains a pointer to the next block; blocks can be scattered
anywhere on disk.

Indexed Allocation A special index block holds pointers to all data blocks of the file; supports direct and
random access efficiently.

FAT (File Allocation A linked allocation variant where all next-block pointers are stored in a central table
Table) in memory.

Inode In Unix/Linux, a data structure (index node) storing file metadata and pointers to data
blocks.

External Fragmentation Wasted disk space between files; a problem in contiguous allocation.

Internal Fragmentation Wasted space within an allocated block when file data does not fill it completely.

7.2 Allocation Method Diagrams


Contiguous Allocation
Block 0 Block 1 Block 2 Block 3 Block 4 Block 5

FileA[0] FileA[1] FileA[2] FileB[0] FileB[1] (free)

Linked Allocation
Block Data Next →

4 FileA[0] →7

7 FileA[1] → 11

11 FileA[2] → NULL

Indexed Allocation
Index Block Points To Block

[0] 4

[1] 7

[2] 11

[3] 15

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 13

7.3 Comparison Table


Feature Contiguous Linked Indexed

Random Access Fast (start + offset) Slow (traverse list) Fast (index lookup)

Sequential Access Fast Moderate Fast

External Fragmentation High None None

Space Overhead None One pointer/block One index block

Reliability Loses data if start lost Loses rest if pointer lost Loses all if index lost

Flexibility Low (fixed size) High High

Used In CD-ROM, simple FS FAT (Windows 9x) Unix/Linux (ext2/3/4)

7.4 Contiguous — Advantages, Disadvantages & Applications


✔ Advantages
✔ Simple to implement; directory needs only start address and length.

✔ Excellent sequential read performance — all blocks are adjacent.

✔ Fast random access: block n = start + n.

✘ Disadvantages
✘ Severe external fragmentation over time.

✘ File size must be known in advance — difficult for dynamic files.

✘ Compaction needed periodically, which is time-consuming.

★ Applications
★ CD-ROM and DVD file systems (ISO 9660) use contiguous allocation.

★ Embedded systems with fixed file sizes.

★ Read-only file systems where fragmentation is not a concern.

7.5 Linked — Advantages, Disadvantages & Applications


✔ Advantages
✔ No external fragmentation — blocks placed anywhere on disk.

✔ Files can grow dynamically without pre-allocation.

✔ Simple directory entry — only start block address needed.

✘ Disadvantages
✘ Very slow random access — must traverse entire chain.

✘ Pointer overhead wastes space in each block.

✘ Pointer corruption anywhere in chain loses the rest of the file.

★ Applications
★ FAT12/FAT16/FAT32 file systems used in Windows 9x and USB drives.

★ Simple embedded file systems with small files.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 14

★ Early Unix systems before indexed allocation was developed.

7.6 Indexed — Advantages, Disadvantages & Applications


✔ Advantages
✔ Supports fast direct access without traversal.

✔ No external fragmentation.

✔ Handles large files with multi-level indexing (single, double, triple indirect).

✘ Disadvantages
✘ Index block itself requires storage space overhead.

✘ For very small files, index block wastes more space than the file content.

✘ Multi-level indexing adds complexity and extra disk accesses.

★ Applications
★ Unix/Linux ext2, ext3, ext4 file systems use inode-based indexing.

★ NTFS (Windows) uses a Master File Table with indexed records.

★ Database management systems for fast random record access.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 15

UNIT 8: File Directories — Structure & Management

Q: Explain the structure and management of file directories, including hierarchical and
flat directory structures.

8.1 Definitions
Directory A special file that stores a list of file names and their associated metadata (attributes,
location) in a file system.

Single-Level (Flat) All files reside in one global directory; simple but causes naming conflicts in
Directory multi-user systems.

Two-Level Directory Separate directory per user under a master root directory; eliminates user-level
naming conflicts.

Tree-Structured Directories can contain subdirectories forming a tree; most modern OS use this
(Hierarchical) Directory structure.

Acyclic-Graph Directory Allows shared files/directories via links; a file can have multiple directory entries
pointing to it.

Absolute Path Full path from the root directory to a file, e.g., /home/alice/docs/[Link]

Relative Path Path relative to the current working directory, e.g., docs/[Link]

Mount Point A directory in the tree where another file system is attached (mounted), extending the
hierarchy.

8.2 Directory Structure Diagram


ROOT /
■■■■■■■■■■■■■■■■■■■■■■■
home/ etc/ usr/
■■■■■■■■■■■ ■■■■■■■■■■■ ■■■■■■■■■■■
alice/ bob/ passwd hosts bin/ lib/
■■■■■■■■ ■■■■■■■■ ls cp mv grep
docs/ pics/ music/ docs/
report photo song notes

FLAT DIRECTORY (Single Level):


■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
■ file1 file2 file3 file4 file5 file6 ■
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

TWO-LEVEL DIRECTORY:
Root ■■■ User_A ■■■ fileA1, fileA2
■■■ User_B ■■■ fileB1, fileB2

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 16

8.3 Directory Operations


• Search: Locate a file by name within a directory.
• Create: Add a new entry to the directory for a new file.
• Delete: Remove a file entry from the directory and free its blocks.
• List: Display all entries in a directory with their attributes.
• Rename: Change a file's name within or across directories.
• Traverse: Walk through the directory tree to reach a specific file.

8.4 Flat (Single-Level) Directory


✔ Advantages
✔ Simple implementation — one table of all files.

✔ Fast lookup in very small single-user systems.

✔ Minimal overhead — no tree traversal needed.

✘ Disadvantages
✘ All file names must be unique globally — causes conflicts in multi-user systems.

✘ Poor organization — no grouping of related files.

✘ Unscalable — performance degrades with many files.

★ Applications
★ Early single-user OS (CP/M, MS-DOS without subdirectories).

★ Simple embedded file systems on microcontrollers.

★ Flash drives using FAT with only root directory.

8.5 Hierarchical (Tree-Structured) Directory


✔ Advantages
✔ Users can have same file names in different directories — no conflict.

✔ Logical grouping of files into directories and subdirectories.

✔ Supports absolute and relative paths for flexible navigation.

✔ Scales to millions of files efficiently.

✔ Supports file sharing via links (symbolic and hard links).

✘ Disadvantages
✘ More complex implementation than flat directory.

✘ Path traversal adds disk accesses — can slow lookups.

✘ Cyclic links (in graph directories) require garbage collection for deletion.

✘ Deep nesting creates long paths that are difficult to manage.

★ Applications
★ Linux/Unix file system hierarchy (/home, /etc, /usr, /var).

★ Windows NTFS directory structure (C:\Users\, C:\Program Files\).

★ macOS HFS+/APFS directory tree.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 17

★ Network file systems (NFS, SMB) exposing hierarchical directory trees.

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 18

UNIT 9: File Sharing, Implementation & Protection

9.1 File Sharing Definitions


File Sharing Allowing multiple users or processes to access the same file simultaneously,
managed by the OS for consistency.

Hard Link A directory entry that points directly to the inode of a file; the file exists as long as at
least one hard link exists.

Symbolic (Soft) Link A special file containing the path of another file; can cross file systems; breaks if the
target is deleted.

File Lock A mechanism preventing conflicting access; advisory locks warn processes,
mandatory locks are enforced by the OS.

Owner The user who created the file and has full control over access permissions.

Group A set of users who share the same access rights to a file as defined by the owner.

9.2 File System Implementation


• Boot Block: The very first block of a partition; contains bootstrap code to start the OS.
• Superblock: Stores critical metadata about the file system — total blocks, free blocks, inode count, block size.
• Inode Table: Array of inodes, each representing one file; stores file attributes and block pointers.
• Data Blocks: The actual storage blocks where file content is kept.
• Free Space Management: Bitmap or linked list tracks which blocks are free; bitmap is faster for large file
systems.
• Open File Table: Maintained by the OS in memory; tracks all currently opened files with their read/write
pointers.
• Buffer Cache: OS maintains a cache of recently used disk blocks in RAM to reduce disk accesses.

9.3 File System Protection & Security


Access Control List A list attached to each file specifying which users/groups have which permissions
(ACL) (read, write, execute).

Unix Permission Bits 9-bit scheme: 3 bits each for owner, group, and others — read (r), write (w), execute
(x).

Capability A token held by a process that grants specific access rights to a file or object.

Encryption File content is encrypted at rest so unauthorized users cannot read data even with
physical disk access.

Journaling A log of upcoming changes; if a crash occurs mid-write, the journal allows the FS to
recover to a consistent state.

9.4 Unix Permission Example

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection
Operating Systems — Complete Notes Page 19

Symbol Who Read (4) Write (2) Execute (1) Octal

rwxr-xr-- Owner ✔ ✔ ✔ 7

Group ✔ ✘ ✔ 5

Others ✔ ✘ ✘ 4

✔ Advantages
✔ ACLs provide fine-grained per-user access control.

✔ Journaling protects file system integrity after crashes.

✔ Encryption ensures data confidentiality on stolen or lost disks.

✔ File locking prevents race conditions in concurrent access.

✘ Disadvantages
✘ ACLs can grow large and complex in systems with many users.

✘ Encryption adds CPU overhead for read/write operations.

✘ Journaling requires extra disk writes for the journal log.

✘ Mandatory locking can cause deadlocks if not managed carefully.

★ Applications
★ Linux ext4, XFS, Btrfs use journaling for crash consistency.

★ Windows NTFS uses ACLs and EFS (Encrypting File System) for protection.

★ macOS APFS uses per-file encryption and snapshots.

★ Enterprise NAS systems use ACLs to restrict departmental file access.

Notes prepared for academic study | All Units: I/O Devices · Buffering · Disk Storage · RAID · File Systems

I/O Devices | I/O Buffering | HDD vs SSD | Disk Scheduling | RAID | File Concept | File Allocation | Directories | Protection

You might also like