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

Question 22 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.

Question 22

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 block. With a 1 TB disk and 32 KB block size, there are 2^25 blocks total (1 TB ÷ 32 KB = 2^40 ÷ 2^15 = 2^25 blocks). Therefore, a bitmap needs 2^25 bits to track the free/allocated status of each block.

Step-by-step Derivation:
Step 1: Convert disk size to bits.
1 TB = 10^12 bytes = 2^40 bytes (using binary TB)

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

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

Step 4: Calculate bitmap size.
In a bitmap, each block requires 1 bit to indicate whether it is free (0) or allocated (1).
Bitmap size = Number of blocks × 1 bit per block
= 2^25 bits

Therefore, the answer is D) 2^25 bits.