Given: System address space (\(VA\)) = \(32 \, \text{bits}\) Page size (\(PS\)) = \(4 \, \text{KB}\) Total pages used by a process (\(N\)) = \(2000 \, \text{pages}\) Page table entry size (\(PTE\)) = \(4 \, \text{B}\) It is given in the question that the OS allocates a page (means single page) for the outer page directory upon process creation.
Step 1: Calculate the total number of bits needed for the outer page table.
The total number of bits needed to represent entries in the outer page table is: \[ \log \left(\frac{PS}{PTE}\right) = \log \left(\frac{2^{12}}{2^2}\right) = \log(2^{10}) = 10 \, \text{bits}. \]
Step 2: Calculate the total number of bits needed for the inner page table.
The total number of bits needed to represent entries in the inner page table is: \[ 32 \, (\text{total VA bits}) - 10 \, (\text{outer PT bits}) - 12 \, (\text{page offset bits}) = 10 \, \text{bits}. \]
Step 3: Calculate \(X\).
In each inner page table, we can store \(2^{10}\) entries. The minimum number of page tables (\(PT\)) needed to store \(2000\) pages will be: \[ \lceil \frac{2000}{2^{10}} \rceil = 2 \, PT. \] Thus: \[ X = 2 + 1 \, (\text{for the outer PT}) = 3. \]
Step 4: Calculate \(Y\).
For occupying the maximum pages in a 2-level page table, we need to place at least one \(PTE\) from \(2000\) pages in every page of the inner page table. This equates to \(2^{10}\) \(PT\). Thus: \[ Y = 2^{10} + 1 \, (\text{for the outer PT}) = 1025. \]
Step 5: Calculate \(X + Y\).
The value of \(X + Y\) is: \[ X + Y = 3 + 1025 = 1028. \]
Final Answer: \[ \boxed{1028}. \]
According to the map shown in the figure, which one of the following statements is correct?
Note: The figure shown is representative.
In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and the line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT?
Note: The figure shown is representative
A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, 1K = \(2^{10}\) and 1M = \(2^{20}\). The amount of space in bytes that will be wasted due to internal fragmentation is ___________. (Answer in integer)