Explain the difference between internal and external memory fragmentation.
Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of the First-fit, Bset-fit, and Worst-fit algorithms place processes of size 212K, 417K, 112K, and 426K (in order)? Which algorithm makes the most efficient use of memory?
A compiler must generate addresses that refer to code (e.g., for function calls or for jumps to the beginning of loops) and addresses that refer to data. In a virtual memory system will these addresses be physical addresses or logical addresses?
In a virtual memory system, does the program counter register contain logical addresses or physical addresses of instructions? What about the Memory Address Register?
Why is it that, on a system with paging, a process cannot access memory it does not own? How could the operating system allow access to other memory? Why should it or should it not?
A paging system has a page size of 256 bytes.
Virtual Address Translation. When a virtual address is translated to a physical address, the memory management unit first determines the page number and the page offset and then uses the page table to determine the physical address. Assume the page size is 512 and the page table for a process is given below. For each of the virtual addresses in (a)-(b), determine whether a reference to it will cause a page fault. If the virtual address will not cause a page fault, show the calculation of the corresponding physical address. (Valid bit = 1 means the page is in memory.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|