Time Slicing And Context Switching
lets explain this in simple example, there are three processes that different time periods to finish up those processes.
- p1 - 2s
- p2 - 4s
- p3 - 5s
below image show how the context is switch between these two processes and how time is allocated according to that.