FreeDOS kernel - implements the core MS-DOS/PC-DOS (R) compatible operating system. It is derived from Pat Villani's DOS-C kernel and released under the GPL v2 or later. Please see http://www.freedos.org/ for more details about the FreeDOS (TM) Project.
There's an interesting article about how idle detection was supposed to work in DRDOS.
The relevant parent has expired, and this seems pretty efficient -
https://www.os2museum.com/wp/idle-dr-dos