There are two algorithms, used for Java thread scheduling.
- Time sliced based scheduling algorithm, also known as Round-Robine algorithm.
- Pre-emptive scheduling.
Java uses different scheduling algorithm on different platforms e.g.
- On Mac – time-sliced
- On Solaries – pre-emptive
- On Windows- pre-emptive before JDK-1.0.2, after it is time-sliced.
Thread scheduling algorithms are platform dependent and are implemented using different algorithms on different OS. Java just uses these algorithms of underlying Operating system.