Thrashing The processor spends most of its time swapping pieces rather than executing user instructio0s(处理器的大部分时间都 用于交换块,历不是执行指令的这种情 况称作系统抖动) ·利用局部性原理对将来可能需要的块进 行明智的猜测,从历可避免系统抖动
Thrashing • The processor spends most of its time swapping pieces rather than executing user instructions.(处理器的大部分时间都 用于交换块,而不是执行指令的这种情 况称作系统抖动) • 利用局部性原理对将来可能需要的块进 行明智的猜测,从而可避免系统抖动
Support Needed for virtual Memory Hardware must support paging and segmentation Operating system must be able to management the movement of pages and/or segments between secondary memory and main memory
Support Needed for Virtual Memory • Hardware must support paging and segmentation • Operating system must be able to management the movement of pages and/or segments between secondary memory and main memory
Paging The same device, a page table, is needed when we consider a virtual memory scheme based on paging 当我们考虑基于分页的虚拟存储器方案,也需要 同样的设备一页表) The page table entries become more complex.(页表项变得更复杂 Because only some of the pages of a process may be in main memory. (由于一个进程可能只有一些页在主存)
Paging • The same device, a page table, is needed when we consider a virtual memory scheme based on paging . (当我们考虑基于分页的虚拟存储器方案,也需要 同样的设备——页表) • The page table entries become more complex. (页表项变得更复杂。) • Because only some of the pages of a process may be in main memory. (由于一个进程可能只有一些页在主存)
a bit is needed in each page table entry in indicate whether the corresponding page is present(pin main memory or not.(因而每个页表 项需要有一位(P)来表示它所对应的页 当前是否在主存中)
• A bit is needed in each page table entry in indicate whether the corresponding page is present(p)in main memory or not . (因而每个页表 项需要有一位(P)来表示它所对应的页 当前是否在主存中 )
Modify bit in Page Table Another modify bit is needed to indicate if the page has been altered since it was last loaded into main memory If no change has been made, the page does not have to be written to the disk when it needs to be swapped out
Modify Bit in Page Table • Another modify bit is needed to indicate if the page has been altered since it was last loaded into main memory • If no change has been made, the page does not have to be written to the disk when it needs to be swapped out