tailieunhanh - Windows Internals covering windows server 2008 and windows vista- P16
Windows Internals covering windows server 2008 and windows vista- P16: In this chapter, we’ll introduce the key Microsoft Windows operating system concepts and terms we’ll be using throughout this book, such as the Windows API, processes, threads, virtual memory, kernel mode and user mode, objects, handles, security, and the registry. | thread will run only if no other threads are running because the zero page thread runs at priority 0 and the lowest priority that a user thread can be set to is 1. Note When memory needs to be zeroed as a result of a physical page allocation by a driver that calls MmAllocatePagesForMdl or MmAllocatePagesForMdlEx by a Windows application that calls AllocateUserPhysicalPages or AllocateUserPhysicalPagesNuma or when an application allocates large pages the memory manager zeroes the memory by using a higher performing function called MiZeroInParallel that maps larger regions than the zero page thread which only zeroes a page at a time. In addition on multiprocessor systems the memory manager creates additional system threads to perform the zeroing in parallel and in a NUMA-optimized fashion on NUMA platforms . When the memory manager doesn t require a zero-initialized page it goes first to the free list. If that s empty it goes to the zeroed list. If the zeroed list is empty it goes to the standby lists. Before the memory manager can use a page frame from the standby lists it must first backtrack and remove the reference from the invalid PTE or prototype PTE that still points to the page frame. Because entries in the PFN database contain pointers back to the previous user s page table or to a prototype PTE for shared pages the memory manager can quickly find the PTE and make the appropriate change. When a process has to give up a page out of its working set either because it referenced a new page and its working set was full or the memory manager trimmed its working set the page goes to the standby lists if the page was clean not modified or to the modified list if the page was modified while it was resident. When a process exits all the private pages go to the free list. Also when the last reference to a pagefile-backed section is closed these pages also go to the free list. Page Priority Because every page of memory has a priority in the range 0 to 7 the .
đang nạp các trang xem trước