Does a process's page table too gets swapped out to secondary storage from main memory when the process gets swapped out to secondary storage from main memory? And gets swapped back in when the process is swapped in?

I tried to find the answer in text books and online, but none is clear.

Also, it would be helpful if you can tell me if the PCB (process control block) of a process also gets swapped out when the process is swapped out.

  • 1
    $\begingroup$ Are you asking about a particular OS? If so, you should edit your question to specify it. Some of this sounds to me like design decisions that could vary from OS to OS. The definitions of some terms may well vary per OS too. $\endgroup$ – PJTraill Feb 24 '17 at 19:04
  • 2
    $\begingroup$ Swapping out any data owned by the kernel is extra difficult, and many operating systems don't even try. Page tables in particular usually can't be swapped out, because they record what has been swapped out, which the page-fault handler may need to know at any moment. "Process control block" sounds very OS-specific to my ear, but I think I know what you mean, and those usually can't be swapped out either because basic information about all processes needs to be available at all times. $\endgroup$ – zwol Jun 5 '17 at 21:14

The below article include the answer of your questions, apparently this is possible using multi level page table.


| cite | improve this answer | |
  • 1
    $\begingroup$ Can you include the main aspects of the article here so that the answer is self-contained? $\endgroup$ – 6005 Apr 22 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.