[External] : Re: Project Loom VirtualThreads hang
Ron Pressler
ron.pressler at oracle.com
Thu Jan 5 23:00:26 UTC 2023
> On 5 Jan 2023, at 21:24, Robert Engels <rengels at ix.netcom.com> wrote:
>
> I think it would be better to be able to park/unpark on a monitor efficiently. I think the overhead in handling that common case is more significant than expected.
We know; it’s work-in-progress, but will take some time.
>
> I like the idea of carrying over the Thread.priority in vthreads to allow finer control over the scheduling.
Scheduling with priorities can either be done well or fast but not both. Non-realtime kernels schedule relatively fast, but their priority implementation isn’t that good; realtime kernels do priorities well, but their scheduling is very slow (realtime always trades off predictability for speed). Respecting priorities becomes even harder when there are lots and lots of threads, and problems such as priority inversion certainly don’t get easier. For the common cases where you have a small set of low-priority threads doing work in the background, the easiest solution is just to use platform threads for those.
As in the case of time-sharing, the need for priorities is something that will need to be demonstrated in real projects in the field to justify addressing.
— Ron
More information about the loom-dev
mailing list