chapter
    File Systems and Storage Allocation PYQs for GATE CS

    Solve 4+ File Systems and Storage Allocation previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2026 Slot Set2 PYQ
    To keep track of free blocks in a file system, one of the two approaches is generally used – using bitmaps (bit vectors) or using linked lists. Consider that the linked list approach is used to keep track of free blocks in a file system. Assume that the disk size is 16 GB, block size is 2 KB, and block numbers used are 32-bit long. A single pointer of size 4 bytes is used in each block of the list to point to the next block of the list. The number of blocks required to hold the free disk block numbers is ____________. (answer in integer)

    Note: and
    Question 2
    2025 Slot Set1 PYQ

    A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, and . The amount of space in bytes that will be wasted due to internal fragmentation is ______. (Answer in integer)

    Question 3
    2022 PYQ

    Consider two files systems and , that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in and also in . Now, consider inserting a new block in the middle of the file (between and block), whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the middle of the file in and are and , respectively, then the value of is_________.

    Question 4
    2021 Slot Set1 PYQ
    Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo.
    Which of the following operations will necessarily require a full scan of foo for successful completion?
    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    File Systems and Storage Allocation PYQs for GATE CS

    Solve 4+ File Systems and Storage Allocation previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: File Systems and Storage Allocation

    Chapter Journey

    File Systems & Storage Allocation

    1. Contiguous & Linked Allocation

    Mapping logical files to physical disk blocks. Trade-offs between linear and chained storage.

    2. Directory Search & Operations

    Locating files, managing metadata, and analyzing search efficiencies.

    3. Free-Space Management

    Tracking available disk blocks using bitmaps and linked lists.

    Why start here? Understanding how individual files are stored is the foundational step before analyzing directories and free space.

    Hero Concept: The File Allocation Problem

    The File Allocation Problem

    How do we map the logical blocks of a file to the physical blocks on a disk?

    Efficient Access
    Minimize disk head movement
    Space Efficiency
    Minimize fragmentation
    Dynamic Growth
    Expand without moving data

    Foundational Strategies

    Contiguous Allocation

    Blocks are stored in adjacent physical sectors.

    Linked Allocation

    Blocks are scattered, but chained together via pointers.

    File Systems and Storage Allocation: Solved Questions with Step-by-Step Explanations (4 Problems)

    Question 1 · Operating System · 2026_Set2 NAT
    To keep track of free blocks in a file system, one of the two approaches is generally used – using bitmaps (bit vectors) or using linked lists. Consider that the linked list approach is used to keep track of free blocks in a file system. Assume that the disk size is 16 GB, block size is 2 KB, and block numbers used are 32-bit long. A single pointer of size 4 bytes is used in each block of the list to point to the next block of the list. The number of blocks required to hold the free disk block numbers is ____________. (answer in integer)

    Note: and
    Question 2 · Operating System · 2025_Set1 NAT

    A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, and . The amount of space in bytes that will be wasted due to internal fragmentation is ______. (Answer in integer)

    Question 3 · Operating System · 2022 NAT

    Consider two files systems and , that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in and also in . Now, consider inserting a new block in the middle of the file (between and block), whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the middle of the file in and are and , respectively, then the value of is_________.

    Question 4 · Operating System · 2021_Set1 MSQ
    Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo.
    Which of the following operations will necessarily require a full scan of foo for successful completion?
    1. A.

      Creation of a new file in foo

    2. B.

      Deletion of an existing file from foo

    3. C.

      Renaming of an existing file in foo

    4. D.

      Opening of an existing file in foo

    More previous year questions (pyqs) in this unit