OS Memory Management
Question 1 |
FIFO | |
LRU | |
Optimal Page Replacement | |
Both LRU and FIFO |
Discuss it
Question 2 |
Saving temporary html pages | |
Saving process data | |
Storing the super-block | |
Storing device drivers |
Discuss it
Question 3 |
Virtual memory increases | |
Larger RAMs are faster | |
Fewer page faults occur | |
Fewer segmentation faults occur |
Discuss it
Question 4 |
Efficient implementation of multi-user support is no longer possible | |
The processor cache organization can be made more efficient now | |
Hardware support for memory management is no longer needed | |
CPU scheduling can be made more efficient now |
Discuss it
Question 5 |
11 bits | |
13 bits | |
15 bits | |
20 bits |
Discuss it
Question 6 |
Large secondary memory | |
Large main memory | |
Illusion of large main memory | |
None of the above |
Discuss it
Question 7 |
Page fault occurs when
When a requested page is in memory | |
When a requested page is not in memory | |
When a page is corrupted | |
When an exception is thrown |
Discuss it
Page fault occurs when a requested page is mapped in virtual address space but not present in memory.
Question 8 |
When a page fault occurs | |
Processes on system frequently access pages not memory | |
Processes on system are in running state | |
Processes on system are in waiting state |
Discuss it
Question 9 |
A computer uses 46–bit virtual address, 32–bit physical address, and a three–level paged page table organization. The page table base register stores the base address of the first–level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second–level table (T2). Each entry of T2 stores the base address of a page of the third–level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16 way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes. What is the size of a page in KB in this computer?
2 | |
4 | |
8 | |
16 |
Discuss it
Let the page size is of 'x' bits Size of T1 = 2 ^ x bytes (This is because T1 occupies exactly one page) Now, number of entries in T1 = (2^x) / 4 (This is because each page table entry is 32 bits or 4 bytes in size) Number of entries in T1 = Number of second level page tables (Because each I-level page table entry stores the base address of page of II-level page table) Total size of second level page tables = ((2^x) / 4) * (2^x) Similarly, number of entries in II-level page tables = Number of III level page tables = ((2^x) / 4) * ((2^x) / 4) Total size of third level page tables = ((2^x) / 4) * ((2^x) / 4) * (2^x) Similarly, total number of entries (pages) in all III-level page tables = ((2^x) / 4) * ((2^x) / 4) * ((2^x) / 4) = 2^(3x - 6) Size of virtual memory = 2^46 Number of pages in virtual memory = (2^46) / (2^x) = 2^(46 - x) Total number the pages in the III-level page tables = Number of pages in virtual memory 2^(3x - 6) = 2^(46 - x) 3x - 6 = 46 - x 4x = 52 x = 13 That means, page size is of 13 bits or Page size = 2^13 bytes = 8 KB
Question 10 |
2 | |
4 | |
8 | |
16 |
Discuss it
1 MB 16-way set associative virtually indexed physically tagged cache(VIPT). The cache block size is 64 bytes. No of blocks is 2^20/2^6 = 2^14. No of sets is 2^14/2^4 = 2^10. VA(46) +-------------------------------+ tag(30) , Set(10) , block offset(6) +-------------------------------+ In VIPT if the no. of bits of page offset = (Set+block offset) then only one page color is sufficient. but we need 8 colors because the number bits where the cache set index and physical page number over lap is 3 so 2^3 page colors is required.(option c is ans).