OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

The block size of a file is 32 KB and its disk size is 1 Terabyte.

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

The block size of a file is 32 KB and its disk size is 1 Terabyte. What is the extra space needed for the bitmap in order to find the free space management for the contiguous files?

Choose one option.
Show answer & explanation
Answer: D. 2^25 bits

A bitmap for free space management requires one bit per disk block. With a 1 TB disk and 32 KB blocks, the total number of blocks is 2^40 / 2^15 = 2^25. Therefore, a bitmap needs exactly 2^25 bits to track the allocation status of all blocks on the disk.

Step-by-step Derivation:
Step 1: Convert disk size to bits.
1 TB = 2^40 bytes = 2^40 × 8 bits

Step 2: Convert block size to bits.
32 KB = 2^15 bytes = 2^15 × 8 bits

Step 3: Calculate the number of blocks on the disk.
Number of blocks = Total disk size / Block size
= 2^40 bytes / 2^15 bytes
= 2^(40-15) blocks
= 2^25 blocks

Step 4: Determine bitmap size.
In a bitmap-based free space management scheme, each block requires exactly 1 bit to track whether it is free (0) or allocated (1).
Bitmap size = Number of blocks × 1 bit per block
= 2^25 bits

Therefore, the answer is 2^25 bits.