Crack
GATE
C
G
Topic
File Systems
Operating System
0
/ 5 done
Questions per paper
All
MCQ
MSQ
NAT
2015 to 2026. Point at a year to read it.
0
1
2015
2019
2021
2023
2025
2026
Show as a table
Year
All
MCQ
MSQ
NAT
2015
0
0
0
0
2018
0
0
0
0
2019
1
0
0
1
2020
0
0
0
0
2021
0.5
0
0.5
0
2022
1
0
0
1
2023
0
0
0
0
2024
0
0
0
0
2025
0.5
0
0
0.5
2026
0.5
0
0
0.5
1
CS 2026 Set 2 · 2 marks · NAT · Moderate
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
G
B
16\,\mathrm{GB}
16
GB
, block size is
2
K
B
2\,\mathrm{KB}
2
KB
, and block numbers used are 32-bit long. A single pointer of size
4
b
y
t
e
s
4\,\mathrm{bytes}
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)
2
CS 2025 Set 1 · 2 marks · NAT · Moderate
A disk of size
512
M
512\,\mathrm{M}
512
M
bytes is divided into blocks of
64
K
64\,\mathrm{K}
64
K
bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves
4
4
4
bytes to store the pointer to the next data block. The link part of the last data block contains a
N
U
L
L
NULL
N
U
LL
pointer (also of
4
4
4
bytes). Suppose a file of
1
M
1\,\mathrm{M}
1
M
bytes needs to be stored in the disk. Assume,
1
K
=
2
10
1\,\mathrm{K} = 2^{10}
1
K
=
2
10
and
1
M
=
2
20
1\,\mathrm{M} = 2^{20}
1
M
=
2
20
. The amount of space in bytes that will be wasted due to internal fragmentation is _____ (Answer in integer)
3
CS 2022 · 2 marks · NAT · Moderate
Consider two file systems
A
A
A
and
B
B
B
, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in
A
A
A
and also in
B
B
B
. Now, consider inserting a new block in the middle of the file (between 50th and 51st 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
A
A
A
and
B
B
B
are
n
A
n_A
n
A
and
n
B
n_B
n
B
, respectively, then the value of
n
A
+
n
B
n_A+n_B
n
A
+
n
B
is ____.
4
CS 2021 Set 1 · 1 mark · MSQ · Moderate
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.
5
CS 2019 · 2 marks · NAT · Moderate
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
k
B
4\,\mathrm{kB}
4
kB
, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) ____
G
B
\mathrm{GB}
GB
.