Wednesday, June 17, 2015

What is Context Switching in Java?


One important concept to be understood before moving forward is Context Switching. 

When multiple processes share a single CPU, they fight for the CPU time. It is via context switching that each of them gets some CPU time slice. 

In very basic terms, one process should be switched out of CPU so that another process can run. 

Similar context switching can be understood at the JVM level for a single process which has many threads.

No comments:

Post a Comment