I want to write a program that can save a process's state when it exits in a file and another program to reload this process's state and run it from were it left in xv6 OS. Something like keeping processes' state when you are changing among processes in a scheduler.
But the problem is I'm new to the xv6 OS and I have no idea where to start with. I think I can do the saving part but I don't knew how is it possible to reload a process state into CPU and run it.
Can anyone help me with some resources to start with?
Any help with the xv6 programming would be good.