3
$\begingroup$

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.

$\endgroup$
  • 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
  • $\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

Your Answer

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

Browse other questions tagged or ask your own question.