you can even make some programs realtime, as long as they limit their maximum usage. so with a python session that you've run this in:
you can run from another shell:
$ busctl call org.freedesktop.RealtimeKit1 /org/freedesktop/RealtimeKit1 org.freedesktop.RealtimeKit1 MakeThreadRealtimeWithPID ttu -- 32630 0 20
replace 32630 with your python programs' PID and now it gets 200ms of execution time every period
in general the linux scheduler is fairly interesting- it has modes that don't preempt so you can use linux a bit like DOS, modes that give tasks a guaranteed chunk of CPU time each period, and then the regular scheduler that gives each running process an equal amount of time, with weights like nice levels that let some processes have more or less time than others
each task having an equal amount of time can be a bit silly so linux will group tasks by default, or this can be done using cgroups. idk much about SCHED_DEADLINE but it's even harder than realtime
@jookia For realtime audio SCHED_FIFO is or at least was popular.
@murks yeah that's what i'm refering to as 'realtime' here
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!