---
title: "File system layout; interface vs implementation"
subject: "Operating System"
chapter: 5
key: "semester_6/operating_system:fs-layout-interface-vs-implementation"
source: https://www.bctengineer.com/q/semester_6/operating_system/fs-layout-interface-vs-implementation
site: BCT Engineering
---

# File system layout; interface vs implementation

Operating System · Chapter 5: File Systems

- Asked in: 2070 Bhadra, 6+4 marks
- Video: [File System Implementation | operating systems | file system | file management | file control block](https://www.youtube.com/watch?v=t8Rs9AbqHUc) — Sudhakar Atchala
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/fs-layout-interface-vs-implementation
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-5

## Question

Explain file system layout in detail. What are the major differences between file system interfaces and file system implementation?

## Short answer

File system layout: MBR, partition with boot block, superblock, free-space mgmt, i-nodes, root dir, data area. Interface defines user view (naming, operations, directory structure); implementation handles disk allocation, caching, i-nodes. Interface is stable via syscalls, implementation hidden.

## Answer

#### File system layout
A **file system layout** is the way the disk is organised to store the file system. A disk is divided into partitions; each partition holds an independent file system.

```text
 Sector 0                      whole disk
 +-----+-----------+-------------+-------------+
 | MBR | Partition | Partition 1 | Partition 2 |
 |     |   table   |             |   ...       |
 +-----+-----------+-------------+-------------+

 One partition:
 +------+-------+----------+---------+------+----------------+
 | Boot | Super | Free-    | I-nodes | Root | Files and      |
 | block| block | space    |         | dir  | directories    |
 |      |       | mgmt     |         |      |                |
 +------+-------+----------+---------+------+----------------+
```
- **MBR (Master Boot Record):** sector 0; contains boot code and the partition table with start and end of each partition and the active one. The BIOS reads and runs it, which loads the boot block of the active partition.
- **Boot block:** first block of a partition; program that loads the operating system.
- **Superblock:** key information about the file system: type (magic number), number of blocks, block size, number of i-nodes, free-block counts.
- **Free space management:** bit map or list of free blocks.
- **I-nodes:** an array of i-nodes, one per file (attributes and block addresses).
- **Root directory:** top of the directory tree.
- **Data area:** all the other files and directories.

#### File system interface versus implementation
| Point | File system interface | File system implementation |
|---|---|---|
| Concern | How users and programs **see and use** files | How files are **stored and managed** on the disk |
| Viewpoint | User's / programmer's view | Designer's / OS view |
| Topics | File naming, attributes, types, operations (open, read, write), access methods, directory structure, protection | Disk layout, allocation methods, free-space management, directory implementation, caching, i-nodes, performance, recovery |
| Question answered | What does the file system look like? | How does the file system work? |
| Example | `open("a.txt")`, path names, `chmod` | Contiguous/linked/indexed allocation, bitmap, FAT |
| Interface to | Application programs through system calls | Hardware (disk) via device drivers |
| Changes | Stable, standardised (POSIX) | Can change without affecting user programs |

The interface hides the implementation, so the same programs run on FAT, NTFS or ext4.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which topics belong to file system interface?
   A. Naming, attributes, operations, access methods, directory structure
   B. Allocation methods and free-space management
   C. i-nodes and FAT
   D. Disk caching
   Answer: A. The interface is the user's view; the others are implementation. (Key point: Interface)

2. File system implementation answers which question?
   A. What does the file system look like?
   B. How does the file system work?
   C. Who owns the file?
   D. What is the file name?
   Answer: B. Implementation is about how files are stored and managed. (Key point: Implementation)

3. Why can the same programs run on FAT, NTFS or ext4?
   A. The interface hides the implementation
   B. They share one layout
   C. All use i-nodes
   D. Programs ignore files
   Answer: A. Implementation can change without affecting user programs. (Key point: Hiding)

## Related in Operating System

- [File system layout; i-node vs linked list](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-inode-vs-linked-list) — Operating System, chapter 5
- [File system layout, i-node, backup](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-inode-backup) — Operating System, chapter 5
- [File system layout; free block management](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-free-blocks) — Operating System, chapter 5
- [File attributes; FS implementation ways](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afile-attribute-implementation-best) — Operating System, chapter 5
- [File system layers; linked list vs index](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layers-linked-list-vs-index) — Operating System, chapter 5
- [File system vs virtual memory; contiguous allocation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-vs-virtual-memory-contiguous-tape) — Operating System, chapter 5

## Related in other subjects

- [Interface vs implementation](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Ainterface-vs-implementation) — Object Oriented Analysis and Design, chapter 4, asked 2×
- [Structural model vs implementation model](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Astructural-vs-implementation-model) — Object Oriented Analysis and Design, chapter 1
- [Short note: Distributed system implementation](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Ashort-note-distributed-implementation-issues) — Object Oriented Analysis and Design, chapter 4
- [System implementation and conversion](https://www.bctengineer.com/question.md?key=semester_8%2Finformation_system%3Asystem-implementation-conversion) — Information System, chapter 6
