ryanheise.comsoftwarerheise.osdevelopment → nested processes

Nested processes

rheise.os supports both standalone and nested processes. While standalone processes must have at least one thread to keep alive, nested processes can exist with zero threads and are automatically destroyed when their parent terminates. In this way, nested processes are embedded in parent processes, while standalone processes exist on their own.

Nested processes provide a natural way to run embedded programs such as applets and servlets. These programs are typically designed as objects which are contained within other programs. They are invoked through the multiple public methods of their root object rather than through a single static main method. These multiple public methods are usually invoked by threads outside the program, which is why nested processes often exist without any threads of their own.