Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement reforks by forking the application, to save the app exec time
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 26 Mar 2023 19:56:46 +0000 (21:56 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 26 Mar 2023 19:58:06 +0000 (21:58 +0200)
commit754db84445c812d3480832460e90a112b77648d0
tree54aa821df7db7fe31246dc53179e9039d02d6506
parent91f0832ccac7f46d90a6f6976b90727e99b5c9bf
Implement reforks by forking the application, to save the app exec time

Instead of forking from the checker and exec()ing the application, we
now fork+exec an application that we use as a proxy to the real
application process.

When we need a new application process, we fork it from the proxy,
which is much faster as it's already initialized.

The extra complexity is when the socket closes abruptly on the Checker
side, which means that the application died. We cannot waitpid() on
the app directly, as it's our grandchild. So, we have to ask the proxy
to do the waitpid for us and return the status.
src/mc/api/RemoteApp.cpp
src/mc/api/RemoteApp.hpp
src/mc/remote/AppSide.cpp
src/mc/remote/AppSide.hpp
src/mc/remote/Channel.cpp
src/mc/remote/Channel.hpp
src/mc/remote/CheckerSide.cpp
src/mc/remote/CheckerSide.hpp
src/mc/remote/mc_protocol.h