Describe a sequence the sequence of step that occur when a timer interrupt occurs that
eventually results in a context switch to another application
Answer:
- Timer Interrupt is called
- Trap into kernel space, switching to kernel stack
- Current application’s registers are saved
- Scheduler gives next thread that should be run
- Context switch to other thread (load its stack, flush the TLB)
- Load user registers from the kernel stack
- PC register shifts to the beginning of the other application’s instruction