Scheduling Models: Go's Pre-emptive vs. Java's Cooperative

Go's goroutines are managed by a built-in, pre-emptive M:N scheduler, designed from day one to distribute tasks across OS threads with minimal overhead. In contrast, Java's Virtual Threads, retrofitted onto the JVM's existing model, utilize a cooperative M:N scheduler that unmounts from platform threads during blocking I/O, though a tight CPU-bound loop can indefinitely hold a platform thread.

Sources

Open the full topic