Windows 7 added an API set called UMS which allowed you to reclaim threads from user mode, and implement custom scheduling logic.
Starting with Windows 11 this feature does not appear to work. This issue is reflected on the official msdn page: https://learn.microsoft.com/en-us/windows/win32/procthread/user-mode-scheduling
While this seems to close the issue, this change was made by a stackoverflow user who added it because they experienced this issue on their Windows 11 machine. You can find this conversion on another question's comment section: UMS threads deadlocked with no error code
It is also stated on the wikipedia page for Features Removed In Windows 11 (https://en.wikipedia.org/wiki/List_of_features_removed_in_Windows_11) that UMS was removed, but the citation just links to the MSDN page.
The reason I'm suspicious is because Windows 11 is pretty new, so its possible this is just a kernel bug or unimplemented feature?
Also, this is a pretty significant feature with no replacement available. In contrast, APIs such as InterlockedExchangeAquire (https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms683594(v=vs.85)) are still supported despite being specific to IA-64 which has been discontinued.
I could not find any official statement from Microsoft about this feature's removal.
Unfortunately it looks like UMS has been officially discontinued. This was confirmed to me by a Microsoft employee with access to the Windows Kernel.
This code is currently being shipped in Windows 11:
WINBASEAPI BOOL WINAPI
EnterUmsSchedulingMode(
__in PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo
)
{
UNREFERENCED_PARAMETER(SchedulerStartupInfo);
SetLastError(ERROR_NOT_SUPPORTED);
return FALSE;
}
While it's technically possible that this is just a temporary "hot fix" the more likely explanation according to employees who worked on the feature is that it was removed due to lack of use.
source: https://twitter.com/itanium_guy/status/1512127881740181509
1:59 PM · Apr 7, 2022
UMS was great fun to develop but a casting error. Folks who thought they wanted control over the scheduler really just wanted fast scheduling. When Win7 broke apart the global dispatcher lock, interest in UMS reduced. 0 use in years per telemetry.