Custom Schedulers use-case
Liam Miller-Cushon
cushon at google.com
Wed Oct 8 15:24:43 UTC 2025
Hi,
My colleague David Gay has the following use-case for Custom Schedulers (
https://github.com/openjdk/loom/blob/fibers/loom-docs/CustomSchedulers.md):
A multi-tenant server needs to provide isolation, in particular CPU
isolation, between the workloads of different customers. A good way to
achieve this when using virtual threads is to use some form of fair-share
scheduler to allocate carrier threads to virtual threads. Custom schedulers
provide a straightforward, efficient, and safe way to support this use case.
Absent custom schedulers, it is possible to work around this by surrounding
all blocking points in a virtual thread by blocking interactions with the
fair scheduler. This however poses significant reliability risks, as
identifying these points is not straightforward and missing any of them
affects the fairness of the scheduling and risks starvation or deadlock.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20251008/8a783563/attachment-0001.htm>
More information about the loom-dev
mailing list