Operating Systems

Unit 8: File Management & Device Management

From file allocation strategies to disk scheduling algorithms โ€” master storage management with full numerical problems and start earning through Linux administration.

โฑ๏ธ Time to Complete: 7 hrs theory + 5 hrs lab  |  ๐Ÿ’ฐ Earning Potential: โ‚น5,000โ€“โ‚น15,000/month  |  ๐Ÿ“ 30 MCQs (Bloom's Mapped)

๐Ÿ’ผ Jobs this unlocks: Linux Admin (โ‚น4โ€“8 LPA)  |  Storage Engineer (โ‚น6โ€“12 LPA)

Section A

Opening Hook โ€” How IRCTC Handles 30 Million Ticket Records Daily

๐Ÿš‚ When Disk Scheduling Goes Wrong During Tatkal

IRCTC stores 30 million ticket records daily across distributed file systems. During the Tatkal rush window, up to 15 lakh tickets are booked within 30 minutes. That's 8,333 bookings per second, each requiring multiple disk reads and writes โ€” checking seat availability, updating reservation charts, generating PNR numbers, and logging transactions.

When disk scheduling goes wrong during Tatkal, the entire booking system slows down. Queues pile up, users get timeout errors, and thousands of passengers miss their train bookings. The difference between a well-optimised SSTF scheduler and a naive FCFS approach? Up to 10ร— difference in response time.

Behind the scenes, IRCTC's storage engineers use optimised file allocation strategies and disk scheduling algorithms to ensure data is read and written at maximum speed. Every millisecond of disk head movement matters when 25,000 concurrent users are hitting the server simultaneously.

Could YOU optimise IRCTC's disk access? Could you calculate the exact seek time for different scheduling algorithms and choose the best one? That's exactly what this unit teaches you โ€” with full worked numericals you'll see in your exams.

๐Ÿ‡ฎ๐Ÿ‡ณ IRCTC๐Ÿ‡ฎ๐Ÿ‡ณ TCS๐Ÿ‡ฎ๐Ÿ‡ณ Infosys๐Ÿ‡ฎ๐Ÿ‡ณ Google IndiaNetAppDell EMC
A single enterprise hard disk can have over 500 billion sectors. The disk scheduling algorithm decides which sector to read next โ€” a wrong choice can make the system 10ร— slower. The Linux kernel's default I/O scheduler has changed 4 times in 20 years, from Linus Elevator โ†’ Deadline โ†’ CFQ โ†’ mq-deadline, each time optimising disk head movement patterns.
Section B

Learning Outcomes โ€” Bloom's Taxonomy Mapped

Bloom's LevelLearning Outcome
๐Ÿ”ต RememberList file attributes, operations, and types; define contiguous, linked, and indexed allocation methods
๐Ÿ”ต UnderstandExplain how directory structures differ and why tree-structured is most common in modern operating systems
๐ŸŸข ApplyCalculate total seek time for FCFS, SSTF, SCAN, C-SCAN, LOOK, and C-LOOK disk scheduling algorithms
๐ŸŸข AnalyzeCompare allocation methods and determine which suits SSD vs HDD storage scenarios
๐ŸŸ  EvaluateAssess disk scheduling algorithms for fairness, throughput, and starvation; recommend the best for given workloads
๐ŸŸ  CreateDesign a Python-based disk scheduling simulator that visualises head movement and compares algorithms
Section C

Concept Explanation โ€” File Management & Device Management

โ”โ”โ” PART A: FILE MANAGEMENT โ”โ”โ”

1. File Concepts โ€” Attributes, Operations & Types

A file is a named collection of related information stored on secondary storage. Think of it as a container โ€” like a file folder in a physical office cabinet. The operating system manages how these files are created, stored, accessed, and deleted.

๐Ÿ“ File Attributes

Every file has metadata (data about data) that the OS maintains:

AttributeDescriptionExample
NameHuman-readable identifierreport.pdf
TypeFile format/extension.txt, .exe, .jpg
LocationPointer to file's position on diskBlock 1024 on /dev/sda1
SizeCurrent size in bytes4,096 bytes
ProtectionAccess control (read/write/execute)rwxr-xr--
TimestampsCreation, modification, last accessed2024-01-15 10:30:00
OwnerUser who created the fileuid=1000 (student)

File Operations

The OS provides a set of system calls to manipulate files:

OperationWhat It DoesSystem Call (Linux)
CreateAllocate space, add directory entrycreat(), open(O_CREAT)
OpenLoad file metadata into memory, return file descriptoropen()
ReadTransfer data from disk to memory bufferread()
WriteTransfer data from memory to diskwrite()
Reposition (Seek)Move the read/write pointer to a specific positionlseek()
DeleteRemove directory entry, free allocated spaceunlink()
TruncateErase contents but keep attributestruncate()

File Types

TypeDescriptionExamples
RegularContains user data (text/binary).txt, .doc, .c, .jpg
DirectoryContains list of files and subdirectories/home, /etc
Character SpecialCharacter-based device access/dev/tty, /dev/null
Block SpecialBlock-based device access/dev/sda, /dev/hda
ExecutablePrograms that can be run.exe, .out, .sh
ArchivedCompressed collection of files.zip, .tar, .gz

File Structure

None (Byte Sequence): File is just a stream of bytes. OS doesn't care about internal structure. Used in Unix/Linux โ€” maximum flexibility.

Simple Record Structure: File is a sequence of fixed-length or variable-length records. Used in old mainframe systems.

Complex Structure (Indexed): File has an internal index for fast searching. Used in databases.

2. Access Methods

How does the OS read data from a file? There are three fundamental methods:

MethodHow It WorksAnalogyBest For
Sequential AccessRead one record after another, in order. Can't jump. Pointer moves forward automatically after each read.Like a cassette tape โ€” play from start, can't skipBatch processing, log files
Direct (Relative) AccessJump to any block using block number. No need to read preceding blocks. read(block_n)Like a DVD โ€” skip to any scene instantlyDatabases, random queries
Indexed SequentialAn index maps key values to block positions. Search index first, then read sequentially within the target block.Like a book's index โ€” find chapter, then read within itMainframe databases (ISAM, VSAM)
Indian analogy: Sequential = Reading a novel page by page. Direct = Searching a word in a dictionary by jumping to the right letter section. Indexed Sequential = Using a book's index to find the chapter number, then reading pages within that chapter.

3. Directory Structures

A directory is a special file that contains a list of files and other directories. How we organise directories determines how efficiently we can find, create, and manage files.

3.1 Single-Level Directory

All files in one directory. Simplest possible structure.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  cat.txt  dog.jpg  report.pdf  main.c  a.out โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        (All files in one flat directory)

โœ… Pros: Simple to implement, fast search (small systems).

โŒ Cons: Name collision โ€” two users can't have test.txt. No grouping. Unusable for large systems.

3.2 Two-Level Directory

Separate directory for each user. Master File Directory (MFD) โ†’ User File Directory (UFD).

              โ”Œโ”€โ”€โ”€ MFD โ”€โ”€โ”€โ”
              โ”‚            โ”‚
          โ”Œโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
          โ”‚ User1 โ”‚   โ”‚ User2 โ”‚
          โ”‚  UFD  โ”‚   โ”‚  UFD  โ”‚
          โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
          โ”‚ f1.txtโ”‚   โ”‚ f1.txtโ”‚  โ† Same name, no conflict!
          โ”‚ f2.c  โ”‚   โ”‚ f3.py โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœ… Pros: Name isolation per user. Different users can have same filename.

โŒ Cons: No subdirectories within a user's space. Can't group related files.

3.3 Tree-Structured Directory

Hierarchical structure with unlimited nesting. The most common in modern OS (Linux, Windows, macOS).

                    / (root)
                 /  |   \
              bin  home   etc
                   / \
                 u1    u2
                / \      \
             docs code   pics
             /      \
         report.pdf  main.c

โœ… Pros: Hierarchical organisation, scalable, efficient searching, natural grouping.

โŒ Cons: No file sharing between directories.

Indian analogy: Tree = Indian postal system โ€” Country โ†’ State โ†’ District โ†’ Town โ†’ Street โ†’ House. Each level narrows down the location, just like /home/rahul/documents/resume.pdf narrows down to a specific file.

3.4 Acyclic Graph Directory

Like tree, but allows shared files/directories through links (hard links, soft links). Two directory entries can point to the same file.

              / (root)
            /    \
         home     shared
         /  \       |
       u1    u2     |
        \    /      |
         project โ†โ”€โ”€โ”˜  (shared by u1, u2, and /shared)

โœ… Pros: File sharing without duplication.

โŒ Cons: Dangling pointer problem โ€” if original file is deleted, links point to nothing. Need reference counting.

3.5 General Graph Directory

Allows cycles (directory A can contain B, and B can contain A). Most flexible but most complex.

โœ… Pros: Maximum flexibility.

โŒ Cons: Cycles can cause infinite loops during traversal. Needs garbage collection to reclaim space. Most complex to implement.

Directory Structure Comparison

StructureGroupingName IsolationSharingCyclesComplexity
Single-LevelโŒ NoโŒ NoโŒ NoโŒ NoVery Low
Two-LevelโŒ Noโœ… Per userโŒ NoโŒ NoLow
Treeโœ… Yesโœ… FullโŒ NoโŒ NoMedium
Acyclic Graphโœ… Yesโœ… Fullโœ… YesโŒ NoHigh
General Graphโœ… Yesโœ… Fullโœ… Yesโœ… YesVery High

4. File System Mounting & Sharing

Mounting is the process of making a file system accessible at a certain point in the directory tree. When you plug in a USB drive in Linux, it gets "mounted" at a mount point like /mnt/usb.

Mounting = plugging a pen drive into your laptop. Before mounting, the files exist on the drive but aren't visible. After mounting, they become part of your directory tree. The command mount /dev/sdb1 /mnt/pendrive makes the pen drive accessible at /mnt/pendrive.

File Sharing across networks is done through NFS (Network File System) in Linux and SMB/CIFS in Windows. Multiple machines can access the same files over a network.

5. File Protection & Access Control

File protection ensures that only authorised users can access files in specific ways.

Access Control Methods:

1. Access Matrix: A table with rows = users, columns = files, entries = permissions (read, write, execute). Conceptually complete but impractical for large systems.

2. Access Control List (ACL): Each file stores a list of users and their permissions. Column-wise view of access matrix.

3. Capability List: Each user stores a list of files they can access. Row-wise view of access matrix.

Linux Permission System (chmod):

Shell
# Permission format: rwx r-x r--
#                   Owner Group Others

chmod 755 myfile.txt    # Owner=rwx, Group=r-x, Others=r-x
chmod 644 readme.md     # Owner=rw-, Group=r--, Others=r--
chmod u+x script.sh     # Add execute permission for owner
ls -la myfile.txt       # View permissions
# Output: -rwxr-xr-x 1 student staff 4096 Jan 15 10:30 myfile.txt

6. File Allocation Methods

When a file is stored on disk, the OS must decide which blocks on the disk to use. This is the file allocation problem. There are three major methods:

6.1 Contiguous Allocation

Each file occupies a set of contiguous (adjacent) blocks on disk. The directory entry stores the starting block and the length.

Block:   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14
       โ”Œโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”
       โ”‚ A โ”‚ A โ”‚ A โ”‚ A โ”‚ A โ”‚ B โ”‚ B โ”‚ B โ”‚ B โ”‚   โ”‚   โ”‚   โ”‚ C โ”‚ C โ”‚ C โ”‚
       โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”˜
File A: start=0, length=5        โ†‘ gap (external fragmentation)
File B: start=5, length=4
File C: start=12, length=3

โœ… Pros: Fast sequential access (blocks are adjacent). Fast direct access (start + offset). Simple directory entry (just start + length).

โŒ Cons: External fragmentation (gaps between files after deletions). File size must be known at creation. Files cannot grow easily.

Analogy: Like reserving 5 consecutive seats in a cinema โ€” easy to find your group, but if the movie is full and only scattered single seats are left, you can't sit together. That's external fragmentation.

6.2 Linked Allocation

Each file is a linked list of disk blocks. Each block contains a pointer to the next block. Blocks can be scattered anywhere on disk.

Directory:  File A โ†’ start: block 9

Block 9    Block 16    Block 1    Block 10    Block 25
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ data โ”‚โ”€โ”€โ†’โ”‚ data โ”‚โ”€โ”€โ†’โ”‚ data โ”‚โ”€โ”€โ†’โ”‚ data โ”‚โ”€โ”€โ†’โ”‚ data โ”‚โ”€โ”€โ†’ null
โ”‚ โ†’16  โ”‚   โ”‚ โ†’1   โ”‚   โ”‚ โ†’10  โ”‚   โ”‚ โ†’25  โ”‚   โ”‚ โ†’nil โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

FAT (File Allocation Table): A centralised table that stores all the "next pointers" in one place, rather than inside each data block. Used in FAT12, FAT16, FAT32 (pen drives, SD cards).

โœ… Pros: No external fragmentation. Files can grow dynamically โ€” just add a new block anywhere and link it.

โŒ Cons: No direct access โ€” must traverse from start to reach block N (slow for random access). Pointer overhead in each block. If one pointer is corrupted, rest of file is lost.

Analogy: Like a treasure hunt โ€” each clue leads to the next location. You can start easily, but to reach clue #5, you MUST follow clues 1โ†’2โ†’3โ†’4 first. You can't jump directly.

6.3 Indexed Allocation

An index block stores all the pointers to data blocks. The directory points to the index block. Like a table of contents for the file.

Directory:  File A โ†’ index block: 14

Index Block [14]:        Data Blocks:
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”
โ”‚  0 โ†’ block 9 โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚  9  โ”‚
โ”‚  1 โ†’ block 16โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚ 16  โ”‚
โ”‚  2 โ†’ block 1 โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚  1  โ”‚
โ”‚  3 โ†’ block 10โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚ 10  โ”‚
โ”‚  4 โ†’ block 25โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚ 25  โ”‚
โ”‚  5 โ†’ -1 (end)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœ… Pros: Supports direct access (go to index, find block number, read). No external fragmentation.

โŒ Cons: Index block overhead โ€” wastes space for small files. Limited file size per index block (solved with multilevel/linked index schemes in Unix i-nodes).

Analogy: Like a Table of Contents in a textbook โ€” go to the index, find the page number for "Disk Scheduling," jump directly to page 142. No need to read pages 1โ€“141.

Allocation Methods โ€” Comparison Table

FeatureContiguousLinkedIndexed
Direct Accessโœ… Yes (start + offset)โŒ No (must traverse)โœ… Yes (via index)
External FragmentationโŒ Highโœ… Noneโœ… None
Sequential Accessโœ… Very fastโš ๏ธ Slow (random blocks)โœ… Moderate
File GrowthโŒ Difficultโœ… Easyโœ… Easy
Overheadโœ… Noneโš ๏ธ Pointer per blockโš ๏ธ Index block
Reliabilityโœ… GoodโŒ One bad pointer = data lossโœ… Good
Used InCD-ROM, DVDFAT16/32 (pen drives)Unix/Linux (i-node), NTFS
Students confuse linked allocation with indexed allocation. Key difference: In linked allocation, pointers are stored INSIDE each data block (distributed). In indexed allocation, ALL pointers are stored in a SEPARATE index block (centralised). This is the #1 exam question on allocation methods.

7. Free-Space Management

When files are deleted, blocks become free. The OS must track which blocks are free so they can be allocated to new files. Four methods:

7.1 Bit Vector (Bitmap)

Each block is represented by one bit: 0 = free, 1 = occupied (convention varies).

Block:     0  1  2  3  4  5  6  7
Bitmap:    0  0  1  1  1  1  0  0
           โ†‘  โ†‘                โ†‘  โ†‘
         free free           free free

Free blocks: 0, 1, 6, 7 โ†’ 4 free blocks

โœ… Pros: Simple, efficient for finding contiguous free blocks (just scan for consecutive 0s). Fast with hardware support.

โŒ Cons: Requires extra space. A 1TB disk with 4KB blocks = 256 million bits = 32 MB bitmap.

7.2 Linked List

All free blocks are linked together in a list. First free block is pointed to by a head pointer.

โœ… Pros: No wasted space for bitmap.

โŒ Cons: Very slow traversal to find free blocks. Finding contiguous free blocks is difficult.

7.3 Grouping

First free block stores addresses of n free blocks. The last of those n blocks stores addresses of the next n free blocks, and so on.

โœ… Pros: Faster than linked list โ€” get n free blocks in one read.

โŒ Cons: More complex to implement.

7.4 Counting

Store pairs: (starting block, count). If blocks 10โ€“14 are free, store (10, 5). Efficient when free blocks are contiguous.

โœ… Pros: Very compact for contiguous free regions.

โŒ Cons: Inefficient when free blocks are scattered.

Free-Space Management โ€” Comparison

MethodSpace EfficiencySpeedContiguous FindingBest For
Bit Vectorโš ๏ธ Extra space neededโœ… Fastโœ… ExcellentGeneral purpose (most common)
Linked Listโœ… No extra spaceโŒ SlowโŒ PoorSmall disks
Groupingโœ… Goodโœ… Moderateโš ๏ธ ModerateMedium systems
Countingโœ… Very compactโœ… Fastโœ… GoodDisks with large contiguous free regions

8. Directory Implementation

MethodHow It WorksSearch TimeProsCons
Linear ListDirectory is a list of (filename, pointer) entriesO(n)Simple to implementSlow for large directories
Hash TableHash function maps filename to list entryO(1) averageVery fast lookupCollision handling needed, fixed size
Linux ext4 uses HTree (hash tree) for directory indexing โ€” a combination of hash table and B-tree. This gives O(1) average lookup even in directories with millions of files.

โ”โ”โ” PART B: DEVICE MANAGEMENT โ”โ”โ”

9. Device Types

TypeDescriptionExamples
DedicatedAssigned to one process at a time. No sharing.Printer, tape drive, plotter
SharedMultiple processes can use simultaneously.Hard disk, SSD (via I/O scheduling)
VirtualSimulated device that doesn't physically exist.Virtual printer (print to PDF), RAM disk, virtual terminal

10. Serial vs Direct Access Devices

FeatureSerial (Sequential) AccessDirect (Random) Access
Data AccessMust read in order, from beginningCan jump to any location
ExampleMagnetic tapeHard disk, SSD, CD-ROM
SpeedSlow for random accessFast for any access pattern
Use CaseBackups, archivalOS, databases, applications

11. Disk Structure

A hard disk drive (HDD) is made up of several physical components:

      Top View of a Disk Platter:

         Track 0 (outermost)
        โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
       โ•‘  Track 1            โ•‘
      โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ•‘
     โ•‘  โ”‚  Track 2      โ”‚     โ•‘
     โ•‘  โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚     โ•‘
     โ•‘  โ”‚ โ”‚  Spindle   โ”‚ โ”‚     โ•‘    โ† Platters rotate around spindle
     โ•‘  โ”‚ โ”‚   (center) โ”‚ โ”‚     โ•‘
     โ•‘  โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚     โ•‘
      โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ•‘
       โ•‘                     โ•‘
        โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

      Each track is divided into SECTORS (smallest unit of data, usually 512 bytes)
      
      โ”Œโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”
      โ”‚ S1 โ”‚ S2 โ”‚ S3 โ”‚ S4 โ”‚ S5 โ”‚  โ† Sectors on one track
      โ””โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”˜

      CYLINDER = Same track number across ALL platters

      Platter 1:  Track 5  โ”€โ”€โ”
      Platter 2:  Track 5  โ”€โ”€โ”ผโ”€โ”€ Cylinder 5
      Platter 3:  Track 5  โ”€โ”€โ”˜

โฑ๏ธ Disk Access Time Formula

Disk Access Time = Seek Time + Rotational Latency + Transfer Time

Seek Time: Time for the disk arm to move to the correct track/cylinder. This is the LARGEST component and what disk scheduling algorithms try to minimise.

Rotational Latency: Time for the disk to rotate until the desired sector is under the read/write head. Average = ยฝ ร— (1/RPM) ร— 60 seconds.

Transfer Time: Time to actually read/write the data. Usually very small compared to seek time.

12. Disk Scheduling Algorithms โ€” Full Numericals

๐Ÿ“‹ GIVEN DATA (Same for ALL algorithms)

Initial Head Position: 53

Request Queue: [98, 183, 37, 122, 14, 124, 65, 67]

Disk Size: 0 to 199 (200 cylinders)

Direction: Towards 0 (left) โ€” for SCAN, C-SCAN, LOOK, C-LOOK

12.1 FCFS (First Come, First Served)

Algorithm: Process requests in the exact order they arrive in the queue. No reordering.

๐Ÿ”ข FCFS โ€” Worked Solution

Head movement sequence:

53 โ†’ 98 โ†’ 183 โ†’ 37 โ†’ 122 โ†’ 14 โ†’ 124 โ†’ 65 โ†’ 67

Seek distance calculation:

MoveFrom โ†’ ToDistance
153 โ†’ 98|53 โˆ’ 98| = 45
298 โ†’ 183|98 โˆ’ 183| = 85
3183 โ†’ 37|183 โˆ’ 37| = 146
437 โ†’ 122|37 โˆ’ 122| = 85
5122 โ†’ 14|122 โˆ’ 14| = 108
614 โ†’ 124|14 โˆ’ 124| = 110
7124 โ†’ 65|124 โˆ’ 65| = 59
865 โ†’ 67|65 โˆ’ 67| = 2

Total Seek Time = 45 + 85 + 146 + 85 + 108 + 110 + 59 + 2 = 640 cylinders

FCFS Head Movement Diagram:
Position: 0    14   37  53  65 67   98   122 124      183    199
          |     |    |   โ†“   | |    |     |   |        |      |
     โ‘     |     |    |   โ—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ†’โ—     |   |        |      |
     โ‘ก    |     |    |   |   | |    โ—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ†’โ—      |
     โ‘ข    |     |    โ—โ†โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—      |
     โ‘ฃ    |     |    โ—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ†’โ—     |   |        |      |
     โ‘ค    |     โ—โ†โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—   |        |      |
     โ‘ฅ    |     โ—โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ†’โ—        |      |
     โ‘ฆ    |     |    |   |   | |    |     |   โ—โ”โ”โ”โ†’โ—   |      |
     โ‘ง    |     |    |   |   | โ—โ†โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—   |      |
          Wait โ€” let me fix โ‘ฆ and โ‘ง:
     โ‘ฆ    |     |    |   |   โ—โ†โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ—   |      |
     โ‘ง    |     |    |   |   โ—โ†’โ—  |     |   |        |      |
FCFS has the highest total seek time (640) among all algorithms in this example, but it is the fairest โ€” no starvation is possible since every request is served in arrival order. Exams love asking: "Which algorithm has no starvation?" โ†’ FCFS, SCAN, C-SCAN, LOOK, C-LOOK.
FCFS is the easiest to calculate. Just add absolute differences of consecutive requests in the given order. No sorting, no direction, no decision-making needed.

12.2 SSTF (Shortest Seek Time First)

Algorithm: From current head position, move to the nearest pending request. Recalculate after each move.

๐Ÿ”ข SSTF โ€” Step-by-Step Solution

Pending queue: {98, 183, 37, 122, 14, 124, 65, 67}

Step 1: Head at 53. Distances: 98(45), 183(130), 37(16), 122(69), 14(39), 124(71), 65(12), 67(14). Nearest = 65. Move to 65.

Step 2: Head at 65. Distances: 98(33), 183(118), 37(28), 122(57), 14(51), 124(59), 67(2). Nearest = 67. Move to 67.

Step 3: Head at 67. Distances: 98(31), 183(116), 37(30), 122(55), 14(53), 124(57). Nearest = 37. Move to 37.

Step 4: Head at 37. Distances: 98(61), 183(146), 122(85), 14(23), 124(87). Nearest = 14. Move to 14.

Step 5: Head at 14. Distances: 98(84), 183(169), 122(108), 124(110). Nearest = 98. Move to 98.

Step 6: Head at 98. Distances: 183(85), 122(24), 124(26). Nearest = 122. Move to 122.

Step 7: Head at 122. Distances: 183(61), 124(2). Nearest = 124. Move to 124.

Step 8: Head at 124. Only 183 left (distance 59). Move to 183.

Sequence: 53 โ†’ 65 โ†’ 67 โ†’ 37 โ†’ 14 โ†’ 98 โ†’ 122 โ†’ 124 โ†’ 183

Total Seek Time = 12 + 2 + 30 + 23 + 84 + 24 + 2 + 59 = 236 cylinders

SSTF can cause STARVATION. If new requests keep arriving near the current head position, requests far from the head may never get served. Example: Head at 50, requests at 48, 52, 49, 51 keep arriving โ€” request at 180 starves forever.
Common exam mistake: Students calculate distances ONCE at the start and sort. Wrong! You must recalculate distances after EACH move because the head position changes. At each step, check ALL remaining requests for the nearest one.

12.3 SCAN (Elevator Algorithm)

Algorithm: The disk arm moves in one direction (like an elevator), serving all requests along the way. When it reaches the end of the disk, it reverses direction and serves remaining requests.

๐Ÿ”ข SCAN โ€” Worked Solution (Direction = Left)

Direction: Left (towards 0)

Requests left of 53: 37, 14 (sorted descending: 37, 14)

Requests right of 53: 65, 67, 98, 122, 124, 183 (sorted ascending)

Sequence: 53 โ†’ 37 โ†’ 14 โ†’ 0 โ†’ 65 โ†’ 67 โ†’ 98 โ†’ 122 โ†’ 124 โ†’ 183

(Head goes left to 0 โ€” the disk boundary โ€” then reverses right)

Seek distances:

MoveFrom โ†’ ToDistance
153 โ†’ 3716
237 โ†’ 1423
314 โ†’ 014
40 โ†’ 6565
565 โ†’ 672
667 โ†’ 9831
798 โ†’ 12224
8122 โ†’ 1242
9124 โ†’ 18359

Total Seek Time = 16 + 23 + 14 + 65 + 2 + 31 + 24 + 2 + 59 = 236 cylinders

SCAN = Delhi Metro elevator. Imagine an elevator going DOWN โ€” it stops at every requested floor on the way down. When it reaches the ground floor, it reverses and goes UP, stopping at every requested floor. It doesn't skip floors or change direction midway.
In SCAN, the head goes to the END of the disk (0 or 199), NOT to the last request. Even if the leftmost request is at 14, the head still goes all the way to 0. This is the KEY difference between SCAN and LOOK. Most students lose marks here!
Quick formula: Sort all requests. Split at head position. For left direction: Total = head_to_0 + 0_to_rightmost_request. Simplified: Total = 53 + 183 = 236. (This only works when direction is left.)

12.4 C-SCAN (Circular SCAN)

Algorithm: Like SCAN, but after reaching the disk end, the head jumps to the other end and scans in the same direction again. It only serves requests in one direction โ€” treating the disk as circular.

๐Ÿ”ข C-SCAN โ€” Worked Solution (Direction = Left)

Direction: Left (towards 0)

Step 1: Move left, serving requests: 53 โ†’ 37 โ†’ 14 โ†’ 0

Step 2: Jump from 0 to 199 (wrap around, no requests served during jump)

Step 3: Continue moving left from 199, serving: 199 โ†’ 183 โ†’ 124 โ†’ 122 โ†’ 98 โ†’ 67 โ†’ 65

Sequence: 53 โ†’ 37 โ†’ 14 โ†’ 0 โ†’ (jump to 199) โ†’ 183 โ†’ 124 โ†’ 122 โ†’ 98 โ†’ 67 โ†’ 65

Seek distances:

MoveFrom โ†’ ToDistance
153 โ†’ 3716
237 โ†’ 1423
314 โ†’ 014
40 โ†’ 199 (wrap)199
5199 โ†’ 18316
6183 โ†’ 12459
7124 โ†’ 1222
8122 โ†’ 9824
998 โ†’ 6731
1067 โ†’ 652

Total Seek Time = 16 + 23 + 14 + 199 + 16 + 59 + 2 + 24 + 31 + 2 = 386 cylinders

The wrap-around jump (0 โ†’ 199) IS counted in total seek time in most exam problems. However, some textbooks treat the jump as "free" (instantaneous head reset). Always check your syllabus/textbook convention. If the question says "ignore wrap-around time," subtract 199 from total.
C-SCAN provides the most UNIFORM wait time among all algorithms. No request at any position waits longer than one full disk sweep. Best for heavy, uniformly distributed workloads like database servers.

12.5 LOOK

Algorithm: Like SCAN, but the head goes only to the last request in each direction, NOT to the disk boundary. It "looks" ahead and reverses when there are no more requests in the current direction.

๐Ÿ”ข LOOK โ€” Worked Solution (Direction = Left)

Direction: Left (towards 0)

Leftmost request: 14 (NOT 0 โ€” this is the key difference from SCAN)

Step 1: Move left to last request: 53 โ†’ 37 โ†’ 14

Step 2: Reverse direction (no need to go to 0)

Step 3: Move right: 14 โ†’ 65 โ†’ 67 โ†’ 98 โ†’ 122 โ†’ 124 โ†’ 183

Sequence: 53 โ†’ 37 โ†’ 14 โ†’ 65 โ†’ 67 โ†’ 98 โ†’ 122 โ†’ 124 โ†’ 183

Seek distances:

MoveFrom โ†’ ToDistance
153 โ†’ 3716
237 โ†’ 1423
314 โ†’ 6551
465 โ†’ 672
567 โ†’ 9831
698 โ†’ 12224
7122 โ†’ 1242
8124 โ†’ 18359

Total Seek Time = 16 + 23 + 51 + 2 + 31 + 24 + 2 + 59 = 208 cylinders

LOOK is the practical version of SCAN. Real disk schedulers use LOOK, not SCAN. SCAN wastes time going to cylinder 0 (or 199) even if there's no request there. LOOK saves those extra cylinders. In this example: SCAN = 236, LOOK = 208 โ€” LOOK saves 28 cylinders!
LOOK saves time vs SCAN by NOT going to disk edges. Quick comparison: LOOK_total = SCAN_total โˆ’ (distance from last request to disk edge on each side visited). Here: 236 โˆ’ (14 โˆ’ 0) = 236 โˆ’ 14 = 222... Wait, the formula is more nuanced. Just calculate directly โ€” it's faster and safer in exams.

12.6 C-LOOK (Circular LOOK)

Algorithm: Like C-SCAN, but head goes only to the last request in each direction. After serving the last request going left, it jumps to the farthest request on the right and continues left.

๐Ÿ”ข C-LOOK โ€” Worked Solution (Direction = Left)

Direction: Left

Step 1: Move left, serving: 53 โ†’ 37 โ†’ 14

Step 2: Jump to the farthest request on right: 14 โ†’ 183

Step 3: Continue left: 183 โ†’ 124 โ†’ 122 โ†’ 98 โ†’ 67 โ†’ 65

Sequence: 53 โ†’ 37 โ†’ 14 โ†’ (jump to 183) โ†’ 124 โ†’ 122 โ†’ 98 โ†’ 67 โ†’ 65

Seek distances:

MoveFrom โ†’ ToDistance
153 โ†’ 3716
237 โ†’ 1423
314 โ†’ 183 (jump)169
4183 โ†’ 12459
5124 โ†’ 1222
6122 โ†’ 9824
798 โ†’ 6731
867 โ†’ 652

Total Seek Time = 16 + 23 + 169 + 59 + 2 + 24 + 31 + 2 = 326 cylinders

C-LOOK is the most efficient practical algorithm for real-world workloads. Linux uses a variant of C-LOOK called the "Deadline" scheduler. The key: C-LOOK = C-SCAN but without wasting time going to disk edges (0 and 199).
C-LOOK jump is from last_request_left โ†’ last_request_right (or vice versa). In C-SCAN, the jump is from disk edge to disk edge (0 โ†’ 199). That's why C-LOOK is always โ‰ค C-SCAN in seek time.

Master Comparison Table โ€” All 6 Disk Scheduling Algorithms

AlgorithmTotal Seek TimeStarvation?FairnessThroughputBest For
FCFS640โŒ Noโœ… HighโŒ LowLight loads, simplicity
SSTF236โš ๏ธ PossibleโŒ Lowโœ… GoodRandom access patterns
SCAN236โŒ Noโœ… Goodโœ… GoodGeneral purpose
C-SCAN386โŒ Noโœ… Very Highโœ… GoodHeavy uniform loads
LOOK208โŒ Noโœ… Goodโœ… HighMost common practical choice
C-LOOK326โŒ Noโœ… Very Highโœ… HighServer workloads
Exam memory trick: Remember the seek times for this standard example: FCFS(640) > C-SCAN(386) > C-LOOK(326) > SCAN(236) = SSTF(236) > LOOK(208). LOOK gives the least seek time in this case. But in general, the "best" algorithm depends on the workload pattern.

13. DASD (Direct Access Storage Devices)

DASD refers to any storage device where data can be accessed directly (randomly) without reading through preceding data.

DASD (Direct Access)SASD (Sequential Access)
Hard disks, SSDs, CD-ROMs, USB drivesMagnetic tapes
Can jump to any block/sectorMust read from beginning
Used for OS, databases, applicationsUsed for backups, archival storage
Faster for random workloadsCheaper per GB, good for sequential reads

14. Channels and Control Units

In mainframe systems, I/O devices communicate with the CPU through channels and control units:

Channel: A specialised hardware pathway (independent processor) that manages data transfer between memory and I/O devices, freeing the CPU for other work.

Channel TypeDescriptionUsed For
Multiplexor ChannelHandles many slow devices simultaneouslyPrinters, card readers, terminals
Selector ChannelHandles one fast device at a time (full speed)Disk drives, tape drives
Block MultiplexorHybrid โ€” interleaves blocks from multiple fast devicesMultiple disk drives

Control Unit: Sits between the channel and the device. Manages device-specific operations and translates channel commands into device commands.

Section D

Learn by Doing โ€” 3-Tier Lab Structure

๐ŸŸข Tier 1 โ€” GUIDED: File System Exploration with Linux Shell

โฑ๏ธ 60โ€“90 minutesBeginnerZero prior knowledge assumed

Step 1: View Inode Information

Every file in Linux has an inode โ€” a data structure storing file metadata.

Bash
# List files with inode numbers
ls -i

# Detailed file metadata
stat filename.txt
$ stat myfile.txt File: myfile.txt Size: 26 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d Inode: 131074 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ student) Gid: ( 1000/ student) Access: 2024-01-15 10:30:00.000000000 +0530 Modify: 2024-01-15 10:28:00.000000000 +0530 Change: 2024-01-15 10:28:00.000000000 +0530

Step 2: Disk Space Analysis

Bash
# Disk space usage (human-readable)
df -h

# Directory size
du -sh /home
du -sh /var/log
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 50G 22G 26G 46% / /dev/sda2 200G 85G 105G 45% /home tmpfs 3.9G 0 3.9G 0% /dev/shm

Step 3: Block Device Listing

Bash
# List all block devices
lsblk

# Detailed partition info (requires sudo)
sudo fdisk -l
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 256G 0 disk โ”œโ”€sda1 8:1 0 50G 0 part / โ”œโ”€sda2 8:2 0 200G 0 part /home โ””โ”€sda3 8:3 0 6G 0 part [SWAP]

Step 4: File Operations

Bash
# Create a file
touch myfile.txt

# Write to file
echo "Hello IRCTC - File Management Lab" > myfile.txt

# Read file contents
cat myfile.txt

# Copy file
cp myfile.txt backup.txt

# Move/rename file
mv backup.txt backup_old.txt

# Delete file
rm backup_old.txt

Step 5: Directory Operations

Bash
# Create nested directories
mkdir -p projects/os/unit8

# List recursively with details
ls -laR projects/

# Tree view (install: sudo apt install tree)
tree projects/
$ tree projects/ projects/ โ””โ”€โ”€ os โ””โ”€โ”€ unit8 2 directories, 0 files

Step 6: File Permissions

Bash
# Set permissions (rwxr-xr-x)
chmod 755 myfile.txt

# Add execute for owner
chmod u+x myfile.txt

# View permissions
ls -la myfile.txt
$ ls -la myfile.txt -rwxr-xr-x 1 student student 34 Jan 15 10:30 myfile.txt

Step 7: File System Info

Bash
# Detect file type
file myfile.txt

# Count lines
wc -l myfile.txt

# View first/last lines of system files
head -5 /etc/passwd
tail -5 /etc/passwd

๐ŸŽ‰ Congratulations! You've explored the Linux file system hands-on. Take screenshots of your terminal โ€” these are portfolio evidence of your Linux skills.

๐ŸŸก Tier 2 โ€” SEMI-GUIDED: Build a Disk Scheduling Calculator in Python

โฑ๏ธ 90โ€“120 minutesIntermediateHints provided, you fill the gaps

Your Mission:

Build a Python program that takes a head position and request queue, then calculates total seek time for FCFS, SSTF, SCAN, and LOOK algorithms.

Starter Code โ€” FCFS (complete):

Python
def fcfs(head, requests):
    seek = 0
    current = head
    sequence = [current]
    for r in requests:
        seek += abs(current - r)
        current = r
        sequence.append(current)
    return seek, sequence

# Test
head = 53
queue = [98, 183, 37, 122, 14, 124, 65, 67]
total, seq = fcfs(head, queue)
print(f"FCFS: Total Seek = {total}, Sequence = {seq}")

Hints for SSTF:

Python
def sstf(head, requests):
    pending = requests.copy()
    seek = 0
    current = head
    sequence = [current]
    while pending:
        # Find nearest request
        nearest = min(pending, key=lambda x: abs(x - current))
        seek += abs(current - nearest)
        current = nearest
        sequence.append(current)
        pending.remove(nearest)
    return seek, sequence

Hints for SCAN:

  1. Sort the requests
  2. Split into two lists: left of head and right of head
  3. If going left: serve left list (descending) โ†’ go to 0 โ†’ serve right list (ascending)
  4. Sum all seek distances

Hints for LOOK:

  1. Same as SCAN, but DON'T go to 0 or 199
  2. After serving leftmost request, reverse immediately
Stretch Goal: Implement C-SCAN and C-LOOK as well. Print a comparison table of all 6 algorithms with seek times.

๐Ÿ”ด Tier 3 โ€” OPEN CHALLENGE: Disk Scheduling Visualizer with matplotlib

โฑ๏ธ 2โ€“3 hoursAdvancedNo instructions โ€” real-world mini-project

The Brief:

Create a Python program using matplotlib that:

  1. Plots head movement for all 6 algorithms as line charts (X = step, Y = cylinder position)
  2. Bar chart comparison of total seek times for all 6 algorithms
  3. Animates the disk head movement using matplotlib.animation
  4. Exports all charts as PNG files for your portfolio

Deliverable: Python script + 6 PNG charts. Upload to GitHub as "Disk Scheduling Visualizer." This is a strong portfolio project for Linux Admin and Storage Engineer roles.

This project can be turned into a teaching tool. Coaching centres and YouTube educators pay โ‚น3,000โ€“โ‚น10,000 for interactive algorithm visualisers. Polish this into a web app using Streamlit and sell it on Gumroad.
Section E

Industry Spotlight โ€” A Day in the Life

๐Ÿ‘จโ€๐Ÿ’ป Suresh Patel, 32 โ€” Storage Engineer at TCS, Mumbai

Background: BCA from Mumbai University. Started as a junior Linux admin at a small IT services company in Andheri. Learned storage management, RAID configurations, and backup automation on the job. After 3 years, cracked the TCS lateral entry interview and joined their Infrastructure team.

A Typical Day:

9:00 AM โ€” Check Nagios and Zabbix monitoring dashboards for overnight storage alerts. One client's disk usage hit 92% โ€” needs immediate attention.

10:00 AM โ€” Analyse disk I/O patterns on a banking client's production servers. Their database queries are causing excessive random I/O โ€” recommend switching from CFQ to Deadline scheduler.

11:30 AM โ€” Configure a RAID-5 array for a new e-commerce client deployment. 6 disks ร— 2TB each, with one disk for parity.

1:00 PM โ€” Lunch at TCS cafeteria in Airoli.

2:00 PM โ€” Troubleshoot a slow database issue. Run iostat and iotop โ€” discover the I/O scheduler is suboptimal. Change from CFQ to Deadline. Response time improves by 40%.

4:00 PM โ€” Write Bash + Python automation scripts for disk space monitoring across 200+ servers. Script sends Slack alerts when usage exceeds 85%.

5:30 PM โ€” Team meeting to plan SAN (Storage Area Network) migration for a banking client. Discussing NetApp ONTAP vs Dell EMC PowerStore.

DetailInfo
Tools Used DailyLinux CLI, Nagios, Zabbix, NetApp ONTAP, Bash, Python, iostat, iotop
Entry Salary (2024)โ‚น4โ€“6 LPA + benefits
Mid-Level (3โ€“5 yrs)โ‚น8โ€“12 LPA
Senior (7+ yrs)โ‚น15โ€“25 LPA
Companies HiringTCS, Infosys, HCL, NetApp, Dell EMC, IBM, Pure Storage, HPE
Section F

Earn With It โ€” Freelance & Income Roadmap

๐Ÿ’ฐ Your Earning Path After This Unit

Portfolio Piece: "Disk Scheduling Algorithm Simulator" โ€” a Python tool that calculates and visualises seek time for all 6 algorithms. Upload to GitHub.

Beginner Gig Ideas:

โ€ข Shell scripting automation bundles for small IT firms โ€” โ‚น2,000โ€“โ‚น5,000/bundle

โ€ข Linux server monitoring setup (Nagios/Zabbix basic config) โ€” โ‚น5,000โ€“โ‚น8,000/project

โ€ข Backup automation scripts (cron + rsync + email alerts) โ€” โ‚น3,000โ€“โ‚น6,000/project

โ€ข Disk usage report scripts for sysadmins โ€” โ‚น2,000โ€“โ‚น4,000/script

PlatformBest ForTypical Rate
InternshalaIndian student internships & freelanceโ‚น2,000โ€“โ‚น8,000/project
FiverrShell scripting & automation gigs$10โ€“$50/gig (โ‚น800โ€“โ‚น4,000)
UpworkLinux admin tasks, longer projects$15โ€“$40/hour
LinkedInDirect outreach to IT companiesโ‚น5,000โ€“โ‚น15,000/project
Local IT shopsServer setup, backup automationโ‚น3,000โ€“โ‚น10,000/project

โฑ๏ธ Time to First Earning: 3โ€“4 weeks (complete Tier 1 lab + create 2 automation scripts + set up Internshala profile)

Start with backup scripts. Every small IT company in India needs automated backup solutions. A simple cron + rsync + email notification script takes 2 hours to write and you can charge โ‚น3,000โ€“โ‚น5,000. Bundle 3 scripts (backup + disk monitor + log rotation) for โ‚น8,000.
Section G

MCQ Assessment Bank โ€” 30 Questions (Bloom's Mapped)

Remember / Identify (Q1โ€“Q5)

Q1

Which file allocation method stores all block pointers in a separate index block?

  1. Contiguous
  2. Linked
  3. Indexed
  4. Hashed
Remember
โœ… Answer: (C) Indexed โ€” In indexed allocation, a dedicated index block stores pointers to all data blocks of the file. This allows direct access without traversing through data blocks.
Q2

In a bitmap for free-space management, a '0' typically represents:

  1. An occupied block
  2. A free block
  3. A bad sector
  4. A reserved block
Remember
โœ… Answer: (B) A free block โ€” In the standard bitmap convention, 0 = free and 1 = occupied (allocated). Some systems reverse this, so always check the convention stated in the question.
Q3

Which directory structure allows file sharing through links?

  1. Single-level
  2. Two-level
  3. Tree-structured
  4. Acyclic graph
Remember
โœ… Answer: (D) Acyclic graph โ€” Acyclic graph directories allow shared files/subdirectories through hard links and symbolic links. Tree structures don't support sharing.
Q4

The method of accessing data one record after another, in order, is called:

  1. Direct access
  2. Sequential access
  3. Indexed access
  4. Random access
Remember
โœ… Answer: (B) Sequential access โ€” Data is read in order, one record after another. The read pointer advances automatically. Like reading a book page by page.
Q5

SSTF stands for:

  1. Shortest Seek Time First
  2. Simple Seek Transfer First
  3. Sequential Seek Time Fast
  4. Shortest Sector Time First
Remember
โœ… Answer: (A) Shortest Seek Time First โ€” SSTF selects the disk request nearest to the current head position, minimising seek distance for each individual move.

Understand / Explain (Q6โ€“Q10)

Q6

Why does contiguous allocation suffer from external fragmentation?

  1. Files are too large for the disk
  2. Files are deleted leaving scattered free spaces between allocated files
  3. Index blocks overflow and waste space
  4. Pointers inside blocks break the chain
Understand
โœ… Answer: (B) โ€” When files are deleted, gaps appear between remaining files. New files may not fit in any single gap even though total free space is sufficient. This is external fragmentation โ€” the bane of contiguous allocation.
Q7

How does SCAN differ from LOOK?

  1. SCAN serves requests in FCFS order
  2. SCAN goes to the disk boundary even if no request exists there; LOOK stops at the last request
  3. LOOK is always slower than SCAN
  4. There is no difference between them
Understand
โœ… Answer: (B) โ€” SCAN always goes to cylinder 0 (or 199) before reversing, even if no request exists there. LOOK "looks ahead" and reverses at the last pending request. This saves unnecessary head movement.
Q8

Why is linked allocation unsuitable for direct (random) access?

  1. Blocks are too large to seek efficiently
  2. The file system lacks an index
  3. You must traverse each block's pointer sequentially to reach the desired block
  4. Files cannot grow beyond one block
Understand
โœ… Answer: (C) โ€” In linked allocation, each block contains a pointer to the next block. To reach block N, you must follow the chain: block 1 โ†’ block 2 โ†’ ... โ†’ block N. There's no way to jump directly. This makes random access O(n) โ€” very slow.
Q9

What is the purpose of FAT (File Allocation Table)?

  1. To store file names and their creation dates
  2. To manage CPU scheduling queues
  3. To store block pointers for linked allocation in a centralised table
  4. To encrypt file contents for security
Understand
โœ… Answer: (C) โ€” FAT is a table that centralises all "next block" pointers. Instead of storing the next-pointer inside each data block (wasting space and risking data loss), FAT keeps all pointers in one table at the start of the disk. Used in FAT16, FAT32 file systems (pen drives, SD cards).
Q10

Why might C-SCAN provide more uniform wait times than SCAN?

  1. C-SCAN uses less memory than SCAN
  2. C-SCAN only serves requests in one direction, then wraps around, so no request at one end waits for a full back-and-forth sweep
  3. C-SCAN is inherently faster
  4. C-SCAN uses SSTF internally for each direction
Understand
โœ… Answer: (B) โ€” In SCAN, requests at one end may have just been passed and must wait for the entire back-and-forth sweep. C-SCAN treats the disk as circular โ€” after reaching one end, it wraps to the other end and continues in the same direction, ensuring every cylinder gets approximately equal wait time.

Apply / Calculate (Q11โ€“Q20) โ€” Numerical Problems

Q11

Given head=53, queue=[98,183,37,122,14,124,65,67]. What is the total seek time using FCFS?

  1. 236
  2. 640
  3. 208
  4. 386
ApplyNumerical
โœ… Answer: (B) 640 โ€” FCFS serves in arrival order: 53โ†’98(45) + 98โ†’183(85) + 183โ†’37(146) + 37โ†’122(85) + 122โ†’14(108) + 14โ†’124(110) + 124โ†’65(59) + 65โ†’67(2) = 640 cylinders.
Q12

Using SSTF with head=53 and queue=[98,183,37,122,14,124,65,67], what is the FIRST request served?

  1. 98
  2. 37
  3. 65
  4. 67
ApplyNumerical
โœ… Answer: (C) 65 โ€” From head=53, distances are: 98(45), 183(130), 37(16), 122(69), 14(39), 124(71), 65(12), 67(14). The nearest request is 65 at distance 12.
Q13

In SCAN (direction=left) with head=53 and same queue, what is the total seek time?

  1. 640
  2. 236
  3. 208
  4. 386
ApplyNumerical
โœ… Answer: (B) 236 โ€” SCAN left: 53โ†’37(16) + 37โ†’14(23) + 14โ†’0(14) + 0โ†’65(65) + 65โ†’67(2) + 67โ†’98(31) + 98โ†’122(24) + 122โ†’124(2) + 124โ†’183(59) = 236 cylinders.
Q14

In LOOK (direction=left) with head=53 and same queue, what is the total seek time?

  1. 236
  2. 386
  3. 208
  4. 640
ApplyNumerical
โœ… Answer: (C) 208 โ€” LOOK left: 53โ†’37(16) + 37โ†’14(23) + 14โ†’65(51) + 65โ†’67(2) + 67โ†’98(31) + 98โ†’122(24) + 122โ†’124(2) + 124โ†’183(59) = 208. LOOK saves 28 cylinders vs SCAN by not going to 0.
Q15

A disk has 8 blocks. The free-space bitmap is 00111100. How many blocks are FREE?

  1. 4
  2. 2
  3. 6
  4. 3
ApplyNumerical
โœ… Answer: (A) 4 โ€” In bitmap: 0=free, 1=occupied. Bitmap 00111100: positions 0,1=free; 2,3,4,5=occupied; 6,7=free. Total free blocks = 4 (positions 0, 1, 6, 7).
Q16

Using C-SCAN (left direction) with head=53, the head wraps from 0 to 199. What is the total seek time?

  1. 208
  2. 236
  3. 386
  4. 326
ApplyNumerical
โœ… Answer: (C) 386 โ€” C-SCAN left: 53โ†’37(16) + 37โ†’14(23) + 14โ†’0(14) + 0โ†’199(199 wrap) + 199โ†’183(16) + 183โ†’124(59) + 124โ†’122(2) + 122โ†’98(24) + 98โ†’67(31) + 67โ†’65(2) = 386 cylinders.
Q17

In indexed allocation, a file uses index block 20 with entries [4, 7, 2, 11, 15]. To access the 3rd logical data block, the OS reads block number:

  1. 20, then block 2
  2. 20, then block 7
  3. Block 2 directly
  4. Block 7 directly
Apply
โœ… Answer: (A) 20, then block 2 โ€” The OS first reads the index block (20) to get the pointer. The 3rd entry (0-indexed: position 2) is block 2. So it reads index block 20 โ†’ then data block 2. Two disk reads total.
Q18

Head=50, queue=[82,170,43,140,24,16,190]. Using SSTF, the first TWO requests served are:

  1. 82, 170
  2. 43, 24
  3. 43, 16
  4. 82, 140
ApplyNumerical
โœ… Answer: (B) 43, 24 โ€” From 50: distances are 82(32), 170(120), 43(7), 140(90), 24(26), 16(34), 190(140). Nearest=43. From 43: distances are 82(39), 170(127), 140(97), 24(19), 16(27), 190(147). Nearest=24. First two served: 43, 24.
Q19

C-LOOK with head=53, direction=left, same queue. The jump is from 14 to 183. Total seek time?

  1. 208
  2. 326
  3. 386
  4. 640
ApplyNumerical
โœ… Answer: (B) 326 โ€” C-LOOK: 53โ†’37(16) + 37โ†’14(23) + 14โ†’183(169 jump) + 183โ†’124(59) + 124โ†’122(2) + 122โ†’98(24) + 98โ†’67(31) + 67โ†’65(2) = 326 cylinders.
Q20

In contiguous allocation, a file starts at block 10 and has length 5 blocks. To access the 4th logical block (0-indexed: block 3), the physical block number is:

  1. 10
  2. 13
  3. 14
  4. 15
ApplyNumerical
โœ… Answer: (B) 13 โ€” In contiguous allocation, physical block = start + offset. Block 0=10, Block 1=11, Block 2=12, Block 3=13, Block 4=14. The 4th block (index 3) is at physical block 10+3=13.

Analyze / Compare (Q21โ€“Q25)

Q21

Which allocation method would be BEST for a read-only CD-ROM file system?

  1. Linked
  2. Indexed
  3. Contiguous
  4. Hashed
Analyze
โœ… Answer: (C) Contiguous โ€” CD-ROMs are read-only, so files never change size. Contiguous allocation gives the best sequential read performance (no head seeking between scattered blocks) and fast direct access. No fragmentation concern since files are never deleted or modified.
Q22

A sysadmin notices that disk I/O requests at cylinders 1 and 199 are always served last, regardless of arrival time. Which scheduling algorithm is most likely in use?

  1. FCFS
  2. SSTF
  3. SCAN
  4. C-LOOK
Analyze
โœ… Answer: (B) SSTF โ€” SSTF always picks the nearest request, which naturally favours middle cylinders. Requests at extreme edges (1 or 199) are always farther than middle requests, so they get continuously pushed back โ€” a classic starvation scenario.
Q23

Compare SCAN and C-SCAN. In which scenario is C-SCAN clearly better?

  1. Very few requests on the disk
  2. Requests clustered in the centre of the disk
  3. Heavy, uniformly distributed requests across all cylinders
  4. All requests on one side of the disk
Analyze
โœ… Answer: (C) โ€” C-SCAN is best when requests are uniformly distributed across all cylinders. It provides the most uniform wait time because it treats the disk as circular โ€” every cylinder gets served within one sweep. SCAN can make cylinders just passed wait for a full back-and-forth sweep.
Q24

A file system uses linked allocation with 512-byte blocks and 4-byte pointers. What is the effective data capacity per block?

  1. 512 bytes
  2. 508 bytes
  3. 516 bytes
  4. 256 bytes
AnalyzeNumerical
โœ… Answer: (B) 508 bytes โ€” Each block must reserve space for the next-block pointer. Effective data = 512 - 4 = 508 bytes. This is why linked allocation has pointer overhead โ€” roughly 0.78% of disk space is wasted on pointers.
Q25

Why do modern operating systems prefer tree-structured directories over single-level?

  1. Tree structures require less memory
  2. Tree structures have faster access times
  3. Hierarchical organisation, name isolation, and scalability for millions of files
  4. Tree structures support file encryption natively
Analyze
โœ… Answer: (C) โ€” Tree directories allow logical grouping (/home, /etc, /var), prevent name collisions (different users can have the same filename), and scale to millions of files. Single-level would be chaos โ€” imagine all files on your computer in one folder!

Evaluate / Justify (Q26โ€“Q28)

Q26

A database server has random I/O pattern with thousands of concurrent queries. Which disk scheduling algorithm should the admin choose and why?

  1. FCFS โ€” simplest to implement
  2. SSTF โ€” gives best individual response time
  3. C-LOOK โ€” uniform wait time, no starvation, practical
  4. SCAN โ€” goes both ways for coverage
Evaluate
โœ… Answer: (C) C-LOOK โ€” For heavy random workloads, C-LOOK provides uniform wait times (no cylinder starves), prevents starvation (unlike SSTF), and is more efficient than C-SCAN (doesn't waste time going to disk edges). Linux's Deadline scheduler is based on C-LOOK principles.
Q27

An admin is choosing between bitmap and linked list for free-space management on a 2TB disk with 4KB blocks. Which is better and why?

  1. Linked list โ€” simpler implementation
  2. Bitmap โ€” compact representation, fast contiguous block finding
  3. Both are equally efficient at this scale
  4. Neither works for disks larger than 1TB
Evaluate
โœ… Answer: (B) Bitmap โ€” A 2TB disk with 4KB blocks has 512 million blocks. A bitmap needs 512M bits = 64 MB (tiny compared to 2TB). Finding contiguous free blocks is fast with bit operations. Linked list would require traversing millions of blocks to find free space โ€” extremely slow.
Q28

Evaluate why indexed allocation with multilevel index is used in Unix/Linux ext4 instead of contiguous allocation.

  1. Easier to implement than contiguous
  2. No fragmentation, supports large files, allows direct access; contiguous can't grow files easily
  3. Better security features
  4. Faster for small files under 1KB
Evaluate
โœ… Answer: (B) โ€” Indexed allocation eliminates external fragmentation, supports very large files through multilevel indexing (direct + single indirect + double indirect + triple indirect blocks in ext4), and allows files to grow dynamically. Contiguous allocation can't grow files without relocating them โ€” impractical for a general-purpose OS.

Create / Design (Q29โ€“Q30)

Q29

Design a scenario where SSTF performs WORSE than FCFS in terms of total response time for all requests.

  1. A large queue with the head positioned at the centre of the disk
  2. A small queue with all requests near the head position
  3. New requests continuously arriving near the current head while old far-away requests starve indefinitely
  4. A completely random queue with no pattern
Create
โœ… Answer: (C) โ€” If new nearby requests keep arriving, SSTF serves them immediately while far-away requests wait forever (starvation). The total response time across ALL requests becomes worse because some requests wait indefinitely. FCFS, being fair, serves everyone in order โ€” no request waits disproportionately long.
Q30

A student proposes a "Priority SCAN" algorithm that serves high-priority I/O requests first within the SCAN sweep. What is the main potential drawback?

  1. Too complex to implement in kernel space
  2. High-priority request flood could starve low-priority requests indefinitely
  3. Uses too much memory for the priority queue
  4. Always slower than plain FCFS
Create
โœ… Answer: (B) โ€” If high-priority I/O requests keep arriving (e.g., from a critical database), low-priority requests (e.g., background backups) may never be served โ€” classic priority-based starvation. This is why real OS schedulers like Linux's Deadline scheduler use a timeout mechanism: even low-priority requests get served after a deadline expires.
Section H

Short Answer Questions (5 Questions)

Q1. Explain the three file allocation methods with one advantage and one disadvantage of each.

Contiguous Allocation: Each file occupies consecutive blocks on disk. Advantage: Fast sequential and direct access since blocks are adjacent. Disadvantage: Suffers from external fragmentation โ€” deleted files leave gaps that may not fit new files.

Linked Allocation: Each block contains a pointer to the next block, forming a chain. Advantage: No external fragmentation โ€” any free block can be used. Disadvantage: No direct access โ€” must traverse the entire chain to reach a specific block, making random reads very slow.

Indexed Allocation: A separate index block stores pointers to all data blocks. Advantage: Supports both sequential and direct access efficiently. Disadvantage: The index block itself wastes space, especially for small files that don't need many pointers.

Q2. Describe the SCAN disk scheduling algorithm with an example. Why is it called the "elevator algorithm"?

SCAN moves the disk head in one direction (e.g., left), serving all pending requests along the way. When it reaches the end of the disk (cylinder 0), it reverses direction and serves remaining requests going right. Example: Head=53, direction=left, queue=[98,183,37,122,14,124,65,67]. Sequence: 53โ†’37โ†’14โ†’0โ†’65โ†’67โ†’98โ†’122โ†’124โ†’183. Total seek = 236 cylinders.

It is called the "elevator algorithm" because it behaves exactly like an elevator in a building โ€” the elevator goes down, stopping at every requested floor, then reverses and goes up, stopping at every requested floor. It doesn't change direction midway just because someone on a higher floor pressed the button.

Q3. Compare bitmap and linked list methods of free-space management.

Bitmap: Uses one bit per block (0=free, 1=occupied). It requires extra space (e.g., 64MB for a 2TB disk with 4KB blocks) but allows very fast identification of contiguous free blocks using bit operations. Most modern file systems (ext4, NTFS) use bitmaps.

Linked List: All free blocks are linked together, with each free block pointing to the next free block. It doesn't require extra space (uses the free blocks themselves) but is very slow for traversal โ€” finding free blocks requires following the chain. Finding contiguous free blocks is extremely difficult. Suitable only for small file systems.

Q4. What is the difference between SCAN and LOOK? Why is LOOK preferred in practice?

SCAN moves the head to the physical end of the disk (cylinder 0 or the last cylinder) before reversing, even if there are no pending requests beyond the last served request. LOOK reverses direction at the last pending request โ€” it "looks" ahead and turns back when there are no more requests in the current direction.

LOOK is preferred because it avoids unnecessary head movement to disk edges. In our example, SCAN goes to cylinder 0 (14 extra cylinders of wasted movement), while LOOK reverses at cylinder 14. This saves seek time: SCAN=236, LOOK=208 โ€” a 12% improvement. All practical disk schedulers use LOOK variants, not pure SCAN.

Q5. Explain the concept of an acyclic graph directory. What is the dangling pointer problem?

An acyclic graph directory extends the tree structure by allowing shared files and subdirectories through links (hard links and symbolic links). Multiple directory entries can point to the same file, enabling collaboration without file duplication. The "acyclic" constraint means no cycles are allowed โ€” directory A cannot be a child of directory B if B is already a child of A.

The dangling pointer problem occurs when the original file is deleted but links still point to it. For example, User1 creates report.pdf and User2 creates a link to it. If User1 deletes the file, User2's link now points to a non-existent file โ€” a "dangling" pointer. Solutions include reference counting (track how many links exist; only delete when count reaches 0) and using symbolic links that gracefully report "file not found."

Section I

Case Studies

๐Ÿ“‹ Case Study 1: IRCTC Storage Architecture During Tatkal

Scenario: IRCTC handles 30 million ticket bookings daily. During the Tatkal window (10:00โ€“10:30 AM), over 15 lakh bookings happen in 30 minutes. Their storage infrastructure uses:

  • Indexed allocation for ticket records (each ticket = one record with PNR, passenger details, status)
  • RAID-5 arrays for redundancy (data survives single disk failure)
  • C-LOOK disk scheduling for uniform I/O response times
  • Bitmap free-space management for fast block allocation during peak load

Questions:

1. Why is indexed allocation preferred over linked allocation for ticket records?

Model Answer: IRCTC needs to retrieve individual tickets instantly by PNR number โ€” this requires direct/random access. Indexed allocation supports direct access (read index block โ†’ jump to data block). Linked allocation would require traversing the chain from the start of each file, making PNR lookups unacceptably slow during Tatkal when 8,333 lookups happen per second.

2. What would happen if FCFS disk scheduling was used during Tatkal?

Model Answer: FCFS would cause severe performance degradation. With 25,000 concurrent users, disk requests would arrive for random cylinders. FCFS processes them in arrival order, causing the head to thrash across the entire disk โ€” our example showed FCFS gives 640 cylinders vs LOOK's 208. During Tatkal, this would mean 3ร— longer disk access times, leading to timeout errors, booking failures, and angry passengers.

3. Calculate: If Tatkal generates 1500 disk requests/second and the first 5 requests from head=100 are [45, 130, 20, 150, 80], find total seek time using SSTF.

Model Answer:

From 100: distances = 45(55), 130(30), 20(80), 150(50), 80(20). Nearest = 80. Move to 80. Seek = 20.

From 80: distances = 45(35), 130(50), 20(60), 150(70). Nearest = 45. Move to 45. Seek = 35.

From 45: distances = 130(85), 20(25), 150(105). Nearest = 20. Move to 20. Seek = 25.

From 20: distances = 130(110), 150(130). Nearest = 130. Move to 130. Seek = 110.

From 130: remaining = 150(20). Move to 150. Seek = 20.

SSTF sequence: 100โ†’80โ†’45โ†’20โ†’130โ†’150. Total = 20+35+25+110+20 = 210 cylinders.

๐Ÿ“‹ Case Study 2: Google India Data Center File Systems

Scenario: Google's data center in Mumbai uses GFS (Google File System), a distributed file system designed for large-scale data processing:

  • Files are split into 64 MB chunks, each replicated 3 times across different servers
  • A Master server maintains the fileโ†’chunk mapping (metadata), similar to indexed allocation at massive scale
  • Chunk servers use contiguous allocation locally for each 64 MB chunk
  • Disk scheduling: Modified C-SCAN optimised for sequential reads (Google's workloads are primarily large sequential reads)

Questions:

1. Why does GFS use large 64 MB chunks instead of standard 4 KB blocks?

Model Answer: Google processes massive files (multi-GB web crawl data, YouTube video files). Using 4KB blocks would create billions of entries in the metadata server, overwhelming it. 64MB chunks reduce metadata by 16,000ร—. Also, larger chunks mean fewer seeks โ€” the disk head seeks once and reads 64MB sequentially, which is far more efficient for throughput-oriented workloads than many small random reads.

2. How is GFS's chunkโ†’server mapping similar to indexed allocation?

Model Answer: In indexed allocation, an index block stores pointers to all data blocks of a file. Similarly, the GFS Master server maintains a mapping table: for each file, it stores which chunk servers hold each chunk (like an index block pointing to data blocks on different "disks"/servers). To read a file, the client first contacts the Master (like reading the index block), gets chunk locations, then reads directly from chunk servers (like reading data blocks).

3. Why replicate each chunk 3 times? What's the trade-off?

Model Answer: Replication provides fault tolerance โ€” if one server fails, data is still available on two others. Three copies ensure data survives even two simultaneous failures. The trade-off is storage cost: 3ร— replication means 1 PB of data requires 3 PB of disk space. Google accepts this because data availability is worth more than storage cost. Additionally, replicas can serve parallel read requests, improving read throughput.

Section J

Chapter Summary

๐Ÿ“ Unit 8 โ€” Key Takeaways

1. A file has attributes (name, type, size, location, protection, timestamps) and supports operations like create, open, read, write, seek, delete, and truncate.

2. Access methods: Sequential (read in order), Direct (jump to any block), Indexed Sequential (index + sequential within blocks).

3. Directory structures evolve from single-level (flat) โ†’ two-level (per user) โ†’ tree (hierarchical) โ†’ acyclic graph (sharing via links) โ†’ general graph (cycles allowed). Tree-structured is the standard in modern OS.

4. Allocation methods: Contiguous (fast but fragmentation), Linked (flexible but no random access), Indexed (best of both โ€” used in Unix/Linux i-nodes).

5. Free-space management: Bitmap (most common, fast), Linked list (simple but slow), Grouping (batch), Counting (compact for contiguous regions).

6. Disk structure: Platters โ†’ Tracks โ†’ Sectors โ†’ Cylinders. Disk access time = Seek time + Rotational latency + Transfer time.

7. 6 Disk Scheduling Algorithms (with our example โ€” Head=53, Queue=[98,183,37,122,14,124,65,67]): FCFS(640), SSTF(236), SCAN(236), C-SCAN(386), LOOK(208), C-LOOK(326).

8. LOOK/C-LOOK are the most practical algorithms โ€” used in real OS schedulers. They save unnecessary movement to disk edges.

9. File protection uses access control lists (ACL), capability lists, and the Linux chmod permission system (rwx for owner/group/others).

10. Device types: Dedicated (printer), Shared (disk), Virtual (RAM disk). Channels (multiplexor, selector, block multiplexor) connect devices to the CPU in mainframe systems.

Section K

Earning Checkpoint

SkillTool / MethodPortfolio OutputEarning Ready?
File System ConceptsConceptualโ€”โœ… Yes โ€” interview ready
Shell ScriptingBash / Linux CLILab Screenshots + Scriptsโœ… Yes โ€” โ‚น2Kโ€“โ‚น5K/automation bundle
Disk Scheduling NumericalsPython CalculatorSimulator Outputโœ… Yes โ€” tuition/tutoring content
Storage ManagementLinux CLI + PythonMonitoring Scriptsโœ… Yes โ€” โ‚น5Kโ€“โ‚น8K/project
Disk Scheduling VisualizerPython + matplotlibAlgorithm Comparison Chartsโฌœ Not yet โ€” need matplotlib practice
Minimum Viable Earning Setup after this unit: Linux shell scripting skills + Python disk scheduling calculator + Internshala/Fiverr profile with clear gig descriptions = you can earn โ‚น5,000โ€“โ‚น15,000/month from automation gigs and tutoring while still in college.

โœ… Unit 8 complete. Numerical problems: 8+. MCQs: 30. Ready for Unit 9!

[QR: Link to EduArtha video tutorial โ€” File & Device Management]