GATE - 2019 | The index node (inode) of a Unix-like file system has 12 direct, one single-indirect

The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB,
Posted on 02-02-2022

GATE - 2019 [Operating System]

Question:

The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ______ GB.

A

7.0

B

9.0

C

2.0

D

4.0

   

Solution 1:

No. of Disk block pointers = 4kB/32bits = 1k
Max. file size
= (12 × 1k + 1k × 1k) × 4kB

≈ (1024 × 12 + 1024 × 1024) × 4 × 1024 bytes
≈ 4GB

-------------------------------------------------------------

Solution 2: 

Data:

Direct Block Pointer = 12

Single Indirect Block Pointer = 1

Double Indirect Block Pointer = 1

Disk block address = disk block entries size = 32 bit =  4 bytes

Disk Block size = 4 KB

The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ______ GB.

 

 

 

Thank You
  1. GATE - 2019 | The following C program is executed on a Unix/Linux system:
  2. GATE - 2019 | Assume that in a certain computer, the virtual addresses are 64 bits long
  3. GATE - 2019 | Consider the following four processes with arrival times (in milliseconds)

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh