I would like to know: Is there a system call, library, kernel module or command line tool I can use to store the complete state of a running program on the disk?
You should take a look at the BLCR project from Berkeley Lab.
This is widely used by several MPI implementations to provide
Checkpoint / Restart capabilities for parallel applications.