what happens during context switch between two processes in linux?
<p>Let's say process <code>p1</code> is executing with its own address space(stack,heap,text). When context switch happens, i understand that all the current cpu registers are pushed into PCB before loading process <code>p2</code>. Then TLB is flushed and loaded with <code>p2</code> address mapping and starts executing with its own address spaces.
What i would like know is the state of <code>p1</code> address space. Will it be copied to disk and updates its page table before loading process <code>p2</code>?</p>