3 3 votes A disk of size $\textbf{1024 M}$ bytes is divided into blocks of $\textbf{32 K}$ bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves $\textbf{8 bytes}$ to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of $\text{8 bytes}$).Suppose a file of $\mathbf{4 ~M}$ bytes needs to be stored in the disk. Assume, $1 \mathrm{~K}=2^{10}$ and $1 \mathrm{~M}=2^{20}$.The total number of disk blocks that will be allocated to store this file is $\_\_\_\_$ . Answer in integer) Operating System goclasses operating-system goclasses-cs-dpp goclasses-cs-dpp-day-150 goclasses-os-practice-questions numerical-answers + – GO Classes 309 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes The Block Size $(B)$ is $32 ~\text{K}$ bytes, and the Pointer Size $(P)$ is $8$ bytes.Convert 32 K to bytes: $32 \mathrm{~K}=32 \times 2^{10}=32768$ bytes. Usable Data Space ( $D$ ):$$D=B-P=32768 \text { bytes }-8 \text { bytes }=32760 \text { bytes }$$The File Size $(F)$ is 4 M bytes.Convert 4 M to bytes: $4 \mathrm{M}=4 \times 2^{20}=4194304$ bytes. The total number of blocks needed ( $N$ ) is the ceiling of (File Size / Usable Data Space):$$\begin{gathered}N=\left\lceil\frac{F}{D}\right\rceil=\left\lceil\frac{4194304}{32760}\right\rceil \\\\N \approx\lceil 128.0156\rceil \\\\\mathbf{N}=\mathbf{1 2 9} \text { blocks }\end{gathered}$$ GO Classes answered Dec 5, 2025 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.