Re: What exactly is the need to have swappable and non swappable pages
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Tue, 18 Sep 2007 22:36:24 -0700
On Sep 18, 9:50 pm, MAx <mahesh1...@xxxxxxxxx> wrote:
What is the need of having non swappable pages?
Where else do you store the code to swap pages?
What is the disadvantage of *NOT* having non swappable pages?
Your system would crash the first time it swapped out something that
was needed in order to swap pages back in.
Is there any problem if Non Swappable pages were to be made
swappable...?
Yes, the system will crash.
This is a question which i came across in an interview.
The answer should be immediately obvious. If you swap out anything
that might ever be needed in order to do swapping, you're screwed.
Consider a newly-started system. It has never ever swapped any pages
back in because of low memory, so that code may get swapped out. As
soon as it needs any pages, it calls the code to swap pages back in
due to memory pressure, and *boom*. The swap code can't work until it
loads those pages. It can't load those pages because the swap code is
*in* those pages.
DS
.
- References:
- Prev by Date: Re: What exactly is the need to have swappable and non swappable pages
- Next by Date: Re: how this is done: process and thread have their own register set?
- Previous by thread: Re: What exactly is the need to have swappable and non swappable pages
- Index(es):
Relevant Pages
|