---
title: "File attributes; FS implementation ways"
subject: "Operating System"
chapter: 5
key: "semester_6/operating_system:file-attribute-implementation-best"
source: https://www.bctengineer.com/q/semester_6/operating_system/file-attribute-implementation-best
site: BCT Engineering
---

# File attributes; FS implementation ways

Operating System · Chapter 5: File Systems

- Asked in: 2075 Baisakh, 1+2+6+1 marks
- Video: [L-7.2: File Attributes & Operations in Operating System](https://www.youtube.com/watch?v=q1wGGZbOr4s) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/file-attribute-implementation-best
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-5

## Question

What is File attribute? List the File System performance indicators. Explain all the ways how file system can be implemented and suggest which implementation of file system is better and why?

## Short answer

File attribute: metadata (name, size, owner, permissions, timestamps). Performance indicators: throughput, response time, disk access, cache hit, utilization, fragmentation, reliability. Allocation methods: contiguous, linked, FAT, indexed (i-node). Indexed allocation has no external fragmentation, supports random access, and only keeps open inodes in memory, making it best for general systems.

## Answer

#### File attribute
A **file attribute** is metadata describing a file: name, type, size, location on disk, owner, protection (permissions) and times of creation, modification and last access.

#### File system performance indicators
Throughput (data rate), response time/latency, disk access time (seek + rotational delay + transfer), cache hit ratio, disk space utilization, fragmentation, number of disk accesses per operation and reliability.

#### Ways of implementing a file system (file allocation)
1. **Contiguous allocation:** a file occupies consecutive blocks; directory holds start and length. Very fast access; suffers external fragmentation and is difficult to extend.
2. **Linked-list allocation:** each block points to the next. No external fragmentation; poor random access and pointer overhead.
3. **Linked list with a table in memory (FAT):** pointers kept in a table, which speeds up random access but the table must fit in memory.
4. **Indexed allocation (i-node):** an index block / i-node lists all the blocks of the file (with indirect blocks for big files). Supports direct access with no external fragmentation.

#### Which is better and why
**Indexed allocation (i-nodes)** is generally the best:
- It supports both sequential and direct access efficiently.
- There is no external fragmentation, and files can grow dynamically.
- Only the i-nodes of open files are kept in memory, so memory use is small regardless of disk size (unlike FAT).
- Pointers are collected in one place, improving reliability, and the scheme scales to very large files through indirect blocks.

Contiguous allocation is faster for large read-only files (e.g. CD-ROM), but for general-purpose systems the i-node scheme (used in UNIX, Linux ext2/ext4) gives the best overall balance.

## Check yourself

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

1. What is a main drawback of contiguous allocation?
   A. External fragmentation and difficulty extending the file
   B. Slow direct access
   C. Pointer stored in every block
   D. Large in-memory table
   Answer: A. Contiguous files are fast but leave holes and cannot easily grow. (Key point: Contiguous drawback)

2. What is the constraint of linked allocation with a table in memory (FAT)?
   A. Random access is slower than plain linked
   B. The whole table must fit in memory, so it scales poorly to large disks
   C. Each block loses space to a pointer
   D. Files must be contiguous
   Answer: B. FAT speeds up random access but needs an entry per block in memory. (Key point: FAT constraint)

3. Which allocation scheme is generally best and why?
   A. Contiguous: no seeks and files grow easily
   B. Plain linked: fast random access
   C. Indexed (i-node): direct access, no external fragmentation, and only open files' i-nodes held in memory
   D. FAT: needs no memory
   Answer: C. Indexed allocation balances direct access, growth and low memory use, and scales with indirect blocks. (Key point: Best scheme)

4. When is contiguous allocation still preferred?
   A. Frequently growing log files
   B. General-purpose multi-user systems
   C. Very small files that are often modified
   D. Large read-only files such as CD-ROM
   Answer: D. Contiguous is faster for read-only data of known size. (Key point: Where contiguous wins)

## Related in Operating System

- [File system performance indicators](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-performance-indicators) — Operating System, chapter 5
- [File system layout; interface vs implementation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-layout-interface-vs-implementation) — Operating System, chapter 5
- [File attributes; directory systems; free blocks](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afile-attribute-directory-free-blocks) — Operating System, chapter 5
- [File and attributes; allocation methods](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afile-attributes-allocation-methods) — Operating System, chapter 5
- [File attributes; levels of directories](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afile-attributes-directory-levels) — Operating System, chapter 5
- [Linked list file system; block size impact](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-linked-list-block-size) — Operating System, chapter 5

## Related in other subjects

- [Project attributes; implementation phase activities](https://www.bctengineer.com/question.md?key=semester_7%2Fproject_engineering%3Aproject-attributes-implementation-activities) — Project Engineering, 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
