GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 25(a)

Free-list versus bitmap storage

Operating Systems · File Systems · Full GATE CSE 1998 paper

GATE 1998, Q25(a) Descriptive
Report issue

File Systems

Question 25(a), GATE 1998: Disk addresses take d bits; a disk has B blocks, F free. When does a free list occupy less storage than a bitmap?
Question 25(a), GATE 1998: Disk addresses take d bits; a disk has B blocks, F free. When does a free list occupy less storage than a bitmap?
Tap to enlarge
Answer & solution

Answer: Fd<B in the conventional address-list accounting. (no official key was published)

A bitmap uses one bit for every disk block, allocated or free, so its size is B bits. An explicit list storing one d-bit address per free block uses Fd bits. Thus the list is smaller precisely when Fd<B, or F/B<1/d. Equality is a tie, not a reduction. For example d=32 means the list wins below a free-block fraction of 1/32 under this model.

This compares payload metadata. An additional list-head pointer, count or alignment changes the inequality by the corresponding overhead, for example (F+1)d<B if one extra d-bit head is counted only for the list. A linked free list may store next pointers inside otherwise free blocks; in that implementation physical placement and reserved-memory costs differ from an external address array. The simple condition requested assumes the conventional one-address-per-free-block versus one-bit-per-total-block accounting.

Original paper, page 8