Of course. Could it even be a loadable kernel module? That way you could
enable and disable it on the fly, and give parameters when loading.
For desktop PCs the idle-cpu-memtest would not be so much of an issue, and
even on laptops not an issue as long as they are plugged into the wall :-)
I have no idea how to write a kernel thread (especially less a module), so
someone else more technically inclined will have to do it. But i'm willing
to give ideas :-) If one goes really overboard, perhaps even an entry in
/proc , e.g. /proc/memcheck to keep status on how many passes have been
made and how many faults are found (hopefully 0 :-)
-Dan