Nachos Exec/Exit/Join Example
SpaceID pid = Exec(“myprogram”, 0);
Create a new process running the program “myprogram”. Note: in Unix this is two separate system calls: fork to create the process and exec to execute the program.
int status = Join(pid);
Called by the parent to wait for a child to exit, and “reap” its exit status. Note: child may have exited before parent calls Join!
Exit(status);
Exit with status, destroying process. Note: this is not the only way for a proess to exit!.