involuntary context switch function