Mount, unmount and carrier scheduling
Definition:
A virtual thread is scheduled by the JVM onto a platform carrier.
Explanation:
A virtual thread retains Java call-stack state separately from the platform thread that runs it.
Illustration image:
Example:
Thread task = Thread.startVirtualThread(() ->
System.out.println(Thread.currentThread().isVirtual()));
task.join();Expected behavior. Prints true. The Java thread remains the logical request identity even when it runs on a different carrier later.
Internal working:
Supported blocking operations let the JVM suspend that execution so the carrier can run another task. A virtual thread does not create extra CPU cores. Measure throughput and latency under real downstream limits rather than equating higher concurrency with higher work capacity.
Interview questions:
What does a virtual thread release during supported I/O?
It can unmount from the carrier, allowing that platform thread to run another virtual task while I/O completes.