So, how does the software upgrade feature work behind the scenes? At any one time, two versions of a module may be loaded in the runtime system. We call them the old and the current versions. Before we explain the details of software upgrade, we’ll quickly go over the ways in which functions in one module can refer to functions in another.
You might not remember, but function calls of the following format:
Module:Function(Arg1, .., ArgN)
module name is prefixed to
Function name, are usually
referred to as fully qualified function calls.
This is one of the ways in which a function in one module (
A, say) may refer to a function defined in
another (let’s call it
The other mechanism by which module
A can refer to functions in module
B is for
A to import some of the functions of
A it is then possible
to refer directly to
f, as well as to
Within a module, it is possible to refer to another function in the same module either directly or by a fully qualified name. We’ll come back to this distinction shortly.
Now we’ll explain the software upgrade process, first for intermodule calls, and then for intramodule calls. Each
running process that refers to functions in module
A will be linked to a version of module
A. When a new version of module
A is loaded, that becomes the
current version, and the previous current version
becomes the old version.
If a process
p, defined in module
A, calls a function from module
B, either ...