How is a process chosen for being swapped either in or out?
Swap out:
a. If the process is idle.
b. If process has been in main memory for a long time.
c. If process is large.
d. If no obvious candidates are found, a process is picked by age.
Swap in:
o If a process has been swapped out since a long time.
o If a process is small.