question archive We assume that we have a 32-bit address space and 8 KB pages
Subject:Computer SciencePrice:2.86 Bought7
We assume that we have a 32-bit address space and 8 KB pages. When a process starts, the page table is copied into main memory, at the rate of one page every 100 ns . If each process runs for 100 ms (including table load time), what fraction of the CPU time is reserved for loading page tables?
The answer is 52.42 %
Step-by-step explanation
First you need to calculate the size of the page table. Once you have that, multiply it times the time it takes to load each table entry. It's not relevant how big a table entry is - only how long it takes to load it.
"32-bit address space and an 8-KB page" means that there is 13 bits(8-KB) for page offset and the rest of 19 bits is for indexing page table entry.
Therefore, there are 2^19 entries in page table. Each entry needs 100 ns to be copied from disk to memory.
Total time for copy one page table needs 2^19 * 100 ns = 52.42 ms.
The total time spending on one process is 100 ms, so the fraction of the CPU time which devoted to loading the page table is (52.42)/(100) = 52.42 %