Demand paging apparatus and method for embedded system

Information

  • Patent Application
  • 20070150695
  • Publication Number
    20070150695
  • Date Filed
    November 22, 2006
    18 years ago
  • Date Published
    June 28, 2007
    17 years ago
Abstract
A demand paging apparatus and a method for an embedded system are provided. The demand paging apparatus includes a nonvolatile storage device, a physical memory, a demand paging window, and a demand paging manager. The nonvolatile storage device stores code and data which are handled by demand paging. The physical memory processes information about a requested page that is read from the nonvolatile storage device. The demand paging window generates a fault for the page and, thus, causes demand paging to occur. The demand paging window is part of an address space to which an application program stored in the nonvolatile storage device refers. The demand paging manager processes the page fault generated in the demand paging window.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will be more clearly understood from the following detailed description of exemplary embodiments taken in conjunction with the accompanying drawings, in which:



FIG. 1A is a diagram illustrating a related art demand paging apparatus in an operating system that supports demand paging;



FIG. 1B is a diagram illustrating a related art system that does not use demand paging;



FIG. 2 is a block diagram illustrating the concept of a demand paging apparatus for embedded systems according to an exemplary embodiment of the present invention;



FIG. 3 is a view showing the construction of a demand paging manager and a physical memory that is part of the construction of the demand paging apparatus, according to the exemplary embodiment of the present invention;



FIG. 4 is a view showing the construction of an interface module that is part of the construction of the demand paging apparatus, according to the exemplary embodiment of the present invention;



FIG. 5 is a flowchart illustrating the concept of a demand paging method for an embedded system according to an exemplary embodiment of the present invention; and



FIG. 6 is a flowchart illustrating a process of initializing the demand paging manager according to the exemplary embodiment.


Claims
  • 1. A demand paging apparatus for an embedded system, comprising: a nonvolatile storage device which stores code and data configured to be handled by demand paging;a physical memory which processes information about a requested page, the information being read from the nonvolatile storage device;a demand paging window which generates a fault for the requested page and thus causes demand paging to occur, the demand paging window being part of an address space to which an application program stored in the nonvolatile storage device refers; anda demand paging manager which processes the page fault generated in the demand paging window.
  • 2. The demand paging apparatus of claim 1, wherein the demand paging manager is allocated a part of the physical memory and generates a demand paging memory pool which performs the demand paging.
  • 3. The demand paging apparatus of claim 2, wherein the demand paging memory pool comprises: a frame buffer which is mapped to a virtual memory space in the demand paging window;a memory conversion table which informs a Memory Management Unit (MMU) of information about the mapping; anda frame buffer list used to manage the frame buffer.
  • 4. The demand paging apparatus of claim 3, wherein the demand paging manager comprises: an interface module which initializes the demand paging manager and activates the memory management unit;a page cache management module which initializes the frame buffer and the frame buffer list in response to a request from the interface module; anda page fault processing module which determines whether the page fault generated by the activated memory management unit was generated in a region of the demand paging window, thereby processing the page fault.
  • 5. The demand paging apparatus of claim 4, wherein the interface module comprises: an Application Program Interface (API) which receives a request from the application program to generate the demand paging window, along with information;a memory conversion table generation unit which is allocated memory from the demand paging memory pool and generates the memory conversion table for the region of the demand paging window;a page fault handler installation unit which registers the page fault processing module in a Central Processing Unit (CPU); anda memory management unit control unit which controls the memory management unit to call the registered page fault processing module.
  • 6. The demand paging apparatus of claim 5, wherein the information received from the application program comprises information about a size and an address of a space occupied by the demand paging window, information about a size of the demand paging memory pool, and information about locations of the code and data stored in the nonvolatile storage device.
  • 7. The demand paging apparatus of claim 1, wherein the nonvolatile storage device is a NAND flash memory.
  • 8. A demand paging method for an embedded system, comprising: generating a demand paging window in response to a request from an application program stored in a nonvolatile storage device, the demand paging window being a region in which demand paging occurs;initializing a demand paging manager for processing a page fault generated in the demand paging window so as to activate a memory management unit;when the page fault has been generated in the demand paging window, calling a page fault processing module registered with a central processing unit (CPU) using the activated memory management unit;determining whether the page fault has been generated in the demand paging window using the called page fault processing module; andif the page fault has been generated in the demand paging window, processing the page fault via the page fault processing module.
  • 9. The demand paging method of claim 8, wherein the initializing the demand paging manager comprises: receiving a request from the application program to generate of the demand page window, along with information;allocating memory by an operating system, and generating a memory conversion table for a region of the demand paging window;registering a page fault processing module, which is executed if a page fault interrupt is generated, with the CPU; andactivating a memory management unit that calls the registered page fault processing module.
  • 10. The demand paging method of claim 9, wherein the information comprises information about a size and an address of a space occupied by the demand paging window, information about a size of memory requested to execute the demand paging, and information about locations of code and data stored in the nonvolatile storage device.
  • 11. The demand paging method of claim 9, wherein the processing the page fault comprises: if the page fault was generated in the demand paging window, allocating a frame buffer within a demand paging memory pool to the demand paging manager;the page fault processing module reading a page from the nonvolatile storage device using the frame buffer; andmodifying the memory conversion table according to the read page.
  • 12. The demand paging method of claim 8, wherein the nonvolatile storage device is a NAND flash memory.
  • 13. A computer-readable recording medium storing program code for executing a demand paging method, the method comprising: generating a demand paging window in response to a request from an application program stored in a nonvolatile storage device, the demand paging window being a region in which demand paging occurs;initializing a demand paging manager for processing a page fault generated in the demand paging window so as to activate a memory management unit;when the page fault has been generated in the demand paging window, calling a page fault processing module registered with a central processing unit (CPU) using the activated memory management unit;determining whether the page fault has been generated in the demand paging window using the called page fault processing module; andif the page fault has been generated in the demand paging window, processing the page fault via the page fault processing module.
  • 14. The computer readable medium of claim 13, wherein the initializing the demand paging manager comprises: receiving a request from the application program to generate of the demand page window, along with information;allocating memory by an operating system, and generating a memory conversion table for a region of the demand paging window;registering a page fault processing module, which is executed if a page fault interrupt is generated, with the CPU; andactivating a memory management unit that calls the registered page fault processing module.
  • 15. The computer readable medium of claim 14, wherein the information comprises information about a size and an address of a space occupied by the demand paging window, information about a size of memory requested to execute the demand paging, and information about locations of code and data stored in the nonvolatile storage device.
  • 16. The computer readable medium of claim 14, wherein the processing the page fault comprises: if the page fault was generated in the demand paging window, allocating a frame buffer within a demand paging memory pool to the demand paging manager;the page fault processing module reading a page from the nonvolatile storage device using the frame buffer; andmodifying the memory conversion table according to the read page.
  • 17. The computer readable medium of claim 13, wherein the nonvolatile storage device is a NAND flash memory.
Priority Claims (1)
Number Date Country Kind
10-2005-0130804 Dec 2005 KR national