0
$\begingroup$

When process A has run long enough and the scheduler decides to run process B, will all the pages of process A be moved to the disk or they remain in the main memory?

$\endgroup$
1
1
$\begingroup$

A page is a part of RAM memory. It will never move to the disk, unless one of two happen:

  1. The program specifically asked to store the memory in the disk (obviously, the memory will move to the disk)
  2. There isn't enough RAM to store all of the memory of all processes combined. In this case, some processes' memory will be transferred to a designated area. When that process will need to run, it will be transferred back and once again memory of some other program will be placed there, if needed.
$\endgroup$
1
  • $\begingroup$ Ohh okay that cleared it out! $\endgroup$ Jun 22 at 20:01

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.