Is there a programmatic / cli way of completely suspending or pausing or freezing (or less desirable: dumping or checkpointing) a running process (e.g. by PID) and later resuming (restoring) it to continue to run from where it left of? My reasoning is that OS routinely performs "such preempting" so there has to be a way for me to do the same?
To be specific: process would typically use multiple threads, perform heavy disk IO (and would need to continue to write to those files on resume), use several G of RAM (that's why I'd rather avoid dumping), does not communicate over network. Machine is dedicated to a single task and under my complete control so perfectly fine to do in-kernel, root privilege etc. Disk IO is either to dedicated ZFS pool or separate UFS drives in case it helps.
I'm perfectly ok with just "pausing" a process especially any IO rather than just dumping its state to persistent storage.
Thank you
To be specific: process would typically use multiple threads, perform heavy disk IO (and would need to continue to write to those files on resume), use several G of RAM (that's why I'd rather avoid dumping), does not communicate over network. Machine is dedicated to a single task and under my complete control so perfectly fine to do in-kernel, root privilege etc. Disk IO is either to dedicated ZFS pool or separate UFS drives in case it helps.
I'm perfectly ok with just "pausing" a process especially any IO rather than just dumping its state to persistent storage.
Thank you