คำตอบ Non Paged Pool

  • Friday, November 16, 2012 9:21 PM
     
     

    Hi,

    can any one clear where non paged pool resides? wether it is related with pagefile of the OS.

    Thanks,

    Manoj

All Replies

  • Saturday, November 17, 2012 5:26 PM
     
     Answered

    Nonpaged pool resides in RAM only. Unlike paged pool, it cannot be paged out so the memory will never be backed by the pagefile.

    //Daniel


    • Edited by Resplendence Saturday, November 17, 2012 5:27 PM
    • Marked As Answer by rjitmanojkumar Monday, November 19, 2012 2:23 PM
    •  
  • Sunday, November 18, 2012 6:37 AM
     
     

    Common system data structures stored in nonpaged pool include the kernel and objects that represent processes and threads, synchronization objects like mutexes, semaphores and events, references to files, which are represented as file objects, and I/O request packets (IRPs), which represent I/O operations.

    Nonpaged pool is therefore always kept present in physical memory and nonpaged pool virtual memory is assigned physical memory.

  • Sunday, November 18, 2012 7:43 AM
     
     

    Common system data structures stored in nonpaged pool include the kernel and objects that represent processes and threads, synchronization objects like mutexes, semaphores and events, references to files, which are represented as file objects, and I/O request packets (IRPs), which represent I/O operations.

    That is not correct. In most cases they reside in nonpaged system memory which is not the same as nonpaged pool. Data in a driver that is declared global for instance is placed in nonpaged memory but not allocated from the pool.

    //Daniel

  • Sunday, November 18, 2012 4:34 PM
     
     

    Thanks , for the input. Could you please elaborate more?

    My example was from this post http://blogs.technet.com/b/markrussinovich/archive/2009/03/26/3211216.aspx

    under

    Nonpaged Pool section

  • Sunday, November 18, 2012 4:56 PM
     
     

    Mr Russinovich was not quite correct there but perhaps he did not want to make a distinction because he has a wide audience. While to the outside world it may look like pedantic nitpicking, a driver developer knows that NPP is not a synonym for nonpaged memory. Examples are global variables declared in a kernel driver that are not explicitly declared in a paged section, they reside in nonpaged system memory, not in pool. That's the typical place to provide storage for kernel objects. Other examples are memory allocated with routines such as MmAllocateContiguousMemory and MmAllocatePagesForMdl for larger allocations, all of which do not charge against nonpaged pool. Especially on older systems, NPP was a very scarce resource so it would make a lot of sense to find other ways of allocating nonpaged memory that is not charged against the pool.

    //Daniel


    • Edited by Resplendence Sunday, November 18, 2012 4:57 PM
    •  
  • Monday, November 19, 2012 2:27 PM
     
     

    Thanks Daniel...

    Please clear the line "Nonpaged pool is therefore always kept present in physical memory and nonpaged pool virtual memory is assigned physical memory". Just want to more, how can be fix the issue of nonpaged pool issue.

    Is nonpaged pool some what related with virtual address spaces. I am not clear about that, there are lot of confusion so I will be gratefull if you clear few terminology. Page file, Paged Pool, Non Paged Pool and virtual address space.

    Thanks

    Manoj

  • Monday, November 19, 2012 3:16 PM
     
     

    >Please clear the line "Nonpaged pool is therefore always kept present in physical memory and nonpaged pool virtual memory is assigned physical memory".

    Hey these were not my words. But it says what is says. NPP is a pool of virtual kernel memory that always translates to physical memory.

    >Just want to more, how can be fix the issue of nonpaged pool issue.

    What does that mean ? What do you want to fix ?

    >Is nonpaged pool some what related with virtual address spaces.

    Yes NPP is part of the virtual kernel address space.

    >Page file, Paged Pool, Non Paged Pool and virtual address space.


    Pagefile: A file on disk maintained by the OS that serves as backing for paged memory.

    Paged pool: A pool of paged virtual kernel memory which is backed by either physical memory or the pagefile.

    Non Paged Pool:  A pool of nonpaged virtual kernel memory which is backed by physical memory only.

    Virtual address space: A range of virtual addresses assigned by the operating system which can be either paged or nonpaged memory. A positive address means it's part of the virtual address space assigned to a process, each process is assigned an isolated virtual address space. A negative address (highest bit set) indicates the address is part of the kernel virtual address space. It's the job of the CPU to translate virtual addresses into physical ones is.

    You can get a good detailed explanation of how everything works in Russinovich's book "Windows Internals".

    //Daniel





  • Monday, November 19, 2012 4:48 PM
     
     

    Thanks Daniel for you time.

    Wht is the meaning of backed. Is non paged pool memory also paged out from physical memory after execution of kernel object.

    Sometime i got error message in eventlog that "non paged pool executed". I want to what its mean and how to fix this kind of issues.

    One more thing, is every process has paged / non paged pool while executing? Please explain the execution of Process...

    Thanks

    Manoj


  • Monday, November 19, 2012 6:15 PM
     
     

    >What is the meaning of backed ?

    Providing storage. Memory must have a physical location. That can be RAM or disk space.

    > Is non paged pool memory also paged out from physical memory after execution of kernel object.

    No, NPP is never paged out. What do you mean with execution of kernel object ?

    >Sometime i got error message in eventlog that "non paged pool executed".

    Can you give an example of such message ?

    >One more thing, is every process has paged / non paged pool while executing?

    No. The PP and NPP are kernel memory, not process memory.

    >Please explain the execution of Process...

    What does that mean ? Please be more specific.

    //Daniel

  • Monday, November 19, 2012 6:32 PM
     
     

    Thanks Daniel...

    Most of the Doubts have been cleared now. Thanks for your support.

    Will explain the issue of "NON paged pool exhuasted" soon.

    Thanks again...for your time.