Process Management Example(Midterm Problem #4)
ExecHandler (char* executable)
Process* p = new Process();
Process* parent = CurrentProcess();
create and initialize VAS for p;
start thread in child context;
allocate and return SpaceID;
Process* child = get from spaceID;
int status = child->Join();
Process* p = CurrentProcess();
tear down p’s VAS, release memory;
1. Parent waits in Join for child to exit (by calling Death).
2. Exited child waits in Death for parent to join or exit.
3. Exited parent waits in Death for children to exit.
- 3 signal/broadcast each in (Join, Death, Death)