LINUX | WINDOW |
how Linux implement virtual memory: The virtual memory feature of Linux makes the operating system behave as if it has a larger memory than the actual memory size. Linux moves blocks of memory called pages in and out of a special memory area, called swap space, in the hard disk. The MMU converts the address specified by the register, also known as the linear address, to the actual physical address for the data to be accessed. This process is termed page conversion and occurs in three stages of mapping: | How window perform and implements virtual memory: RAM generally not large enough to hold all of the running programs, so Windows sets up some additional virtual memory as a file on the hard drive. It then swaps portions of the programs between the physical and virtual memories, always having the currently active portion of a program in the physical memory. - Windows sets the default minimum size of virtual memory at 1.5 times that of the RAM, and the maximum size at 3 times the minimum. - Windows then manages the actual size, expanding and contracting it as needed within these limits.
|
uses demand paging to load executable images of the running program in the memory
| Doesn’t use demand paging. item that loaded in RAM is the non-paged area and page pool Page size: in Windows XP, when we added more memory to computer, we had to manually go and increase the size of your paging file to correctly match the amount of memory in your computer. Windows Vista does away with this by automatically setting the optimal size for the paging file, even after you add more memory to your computer. |
page fault handler determines what must be done to resolve this page fault 1) Find where the desired page resides on disk and read it in 2) Determine that the desired page is already in RAM and direct the MMU to point to it Kernel-handle page fault: identify the type of the requested virtual memory access and take the appropriate action to allow or deny application's VM request. | Using page handler 1) It can decide the virtual address is just simply not valid. In this case, Windows will report this error back by indicating an exception has occurred (typically STATUS_ACCESS_VIOLATION) -2) It can decide the virtual address is valid. In this case, Windows will find an available physical page, place the correct data in that page, update the virtual-to-physical page translation mechanism and then tell the hardware to retry the operation. When the hardware retries the operation it will find the page translation and continue operations as if nothing had actually happened. |
use signals, such as SIGSEGV , to report these error conditions to programs | uses structured exception handling to report page fault-based invalid accesses as access violation exceptions |
Thrashing issue could be reconcile with Resolving the excessive memory paging by temporarily helping one of the active processes quickly build up its working | Thrashing a process is busy swapping pages in and out -Increase the amount of RAM in the system to eliminate the cause of thrashing - Reduce the amount of RAM needed by reconfiguring the applications, removing unneeded system services (like network protocols that aren't being used), or running fewer applications at a time - Try to optimize the paging file's activity |
Monday, September 1, 2008
SEB070016-TUTORIAL 4
Posted by muna at 11:23 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment