Read the following and answer the questions : Consider a machine with 16 GB main memory and 32‐bits virtual address space, with page size as 4KB. Frame size and page size is same for the given machine.
For the machine described in the passage, assume byte addressing and a single-level page table containing one 4-byte entry for every virtual page in the complete 32-bit virtual address space. Each entry includes the physical frame number and control bits. What is the page-table storage size, excluding any additional overhead? Use binary units: 1 KB = \(2^{10}\) bytes, 1 MB = \(2^{20}\) bytes, and 1 GB = \(2^{30}\) bytes.
4 MB
The page size is 4 KB = \(2^{12}\) bytes. Hence the number of virtual pages is \(2^{32}/2^{12}=2^{20}\). At 4 bytes per entry, the table occupies \(2^{20}\times4=2^{22}\) bytes = 4 MB.
The physical memory contains \(2^{34}/2^{12}=2^{22}\) frames. A 32-bit entry can hold the required 22-bit frame number and leave 10 bits for control information.
If a process of size 34KB is to be executed on this machine, then what will be the size of internal fragmentation for this process?
Find number of pages required for the given virtual address space