Please correct me if I am mistaken but as I understand it, when a query is being scheduled for execution, the engine takes into account the number of available free threads and will adjust the query plan accordingly.
For example, if a machine is highly loaded such that only a single thread is free, a query that normally runs using multiple threads on an unloaded machine could be executed as single threaded.
Is there a way to dynamically query the number of free threads available so that a particular critical query (that runs unacceptably as MaxDop < X) could be delayed (while/waitfor) for execution until a minimum free thread count is available?
Update: A starting point based on Kin's answer:
This seems to follow a simple load test but never returns all idle for some reason. I know nothing about this table.
select count(*) as Cpus,
sum(IsIdle) + 1 as IdleCpus -- +1 since current query should be excluded
from
(
select Cpu_id,
min(convert(int, is_idle)) IsIdle
from sys.dm_os_schedulers
group by Cpu_id
) q
;