NonStop S-Series Server Description Manual (G06.24+)

TNS Execution Modes
HP NonStop S-Series Server Description Manual520331-003
6-72
Execution Mode Switches
Execution Mode Switches
Although one might expect a TNS code file to execute exclusively in the TNS execution
mode and an accelerated code file to execute exclusively in the accelerated execution
mode, there are occasions for temporary switches to the opposite mode. Two of the
main reasons for such switches are illustrated in Figure 6-39.
The first case, shown on the left, involves a process that uses a code file that was
never accelerated. This process begins its execution in the only form of code that it
has—TNS object code. However, each time it makes a call to any code that has been
accelerated, such as to a procedure in the system library, there is a switch to the
accelerated execution mode. This occurs because the millicode always selects the
accelerated form of code if it is present. If the program makes many calls to system
code and system library, there will be many switches to accelerated mode.
The second case, shown on the right, involves a process that uses a code file that was
accelerated. Accordingly, it begins its execution in the accelerated object code portion
of its object file. It may continue to the end without ever switching to TNS mode.
However, if the Accelerator program, when it was executed, was unable to translate a
particular section of TNS instructions to accelerated code, then it is necessary to return
temporarily to the original TNS instructions to determine the proper way to continue.
In the first case, the interpreter millicode takes care of both the call and the return from
the system procedure. As explained previously, it is the millicode that is executing and
not the TNS instructions. In the second case, the Accelerator will have encoded a
jump to millicode at the point where it was unable to translate a section of TNS code,
along with the appropriate TNS instruction address. The return to accelerated code
usually occurs at the next transfer of control point, such as at a procedure return or call
(but not at ordinary branches).