So I have a Linux machine that acts as an NFS server. Lots of programs has been installed to the folder that is being exported.
On another Linux machine, I've been running one of the program that is sitting in the exported NFS folder for a very long time, and it won't finish soon.
It turns out that now I need to do some urgent maintenances work with the network, so the network will be down for a while.
I'm wondering what will happen to the running program?
My understanding is that the program is loaded to the RAM in a lazy approach. So in the best case, say the program is executing some codes that is a part of loop that has been already loaded into the RAM, then it won't need to access the executable file at all during the period of network interrupt, and the program will just keep executing fine, like nothing happened, right?
But, say that, if it turns out that the program do need load some other parts of the executable into the RAM and the network is currently down. Will it "freeze" for a while and then continue to execute fine when the network is up?
I'm thinking of this loading process will eventually invoke some io related system call, and those system call will eventually handled by the NFS client library. If the network is down, then NFS client library will just keep retrying for the time period the network is down and then return success when the network is up. So from the perspective of the system, this just seems like a system call takes a really long time.
I'm not sure about my reasoning, especially for the part of the loading process. When loading a part of the executable into the RAM, will the OS invoke the io related system call? Or can it bypass the system call and do it in a even lower level approach and then fails, so that the execution of my program will be stop due to the failure?
Also, do I need to consider NFS caching policies in reasoning about this?