Deciding how to implement the application must be done early in the application design process. You have the following choices:
TAS makes it very easy to build a very large class of applications. The TAS language is an extremely efficient method of designing voice applications. The amount of memory devoted to holding the chantest application is very small: the overhead for a full process is reasonably large. For larger applications, this advantage disappears.
If you choose to write an IRAPI application, you must choose whether you want the application to control a single channel or multiple channels, and whether you want the application to start only when it is invoked (a transient process) or whether you want the application to start when the voice system starts (a permanent process) and be ready to quickly handle calls when they come in.
A transient process is created by irExecvp, etc., when the irExec or irSubProg call is made. This does not use memory for applications that are not actually running, but takes extra time and effort to get the application loaded and running. This time can be significant if the application to be started is large and the platform is otherwise busy. When a transient process is started, the first time that it calls irWait, an IRE_EXEC event is immediately generated. The process should use this event to determine which channel to acquire and on which channel to start the application. A permanent process is usually started out of inittab at the same time that the voice system is started. Permanent processes wait for IRE_EXEC messages and respond to them by starting the application running. Since they are started out of inittab, they consume a slot in the process table and the voice system bulletin board and some amount of memory (although if the process is not accessed in a long time, pages that are not required are likely to be paged out to the swap device).
All executable programs are composed of three basic parts:
Note:
Since data and BSS areas can be changed at run time, each instance of a process has a unique copy of these areas.
Multiple copies of the same IRAPI-based application use less space whether permanent or transient processes.
The IRAPI is delivered as a shared object. Shared objects also have text, data, and BSS sections. If more than one application links against the IRAPI all copies of that application use the same IRAPI text space. Unique copies of the data and BSS sections are allocated for the process. Since AD, TSM, and other processes use and link against the IRAPI library, there is no additional memory cost for user applications to use the IRAPI text area.
Keep the following considerations in mind when determining whether to use multi-channel or single-channel processes:
The following information describes the differences between single-channel and multi-channel applications and between permanent and transient processes. As noted in the table below, permanent, multi-channel processes are the most efficient arrangement.
while (irCheck () != IRE_NULL)
;
The following table compares the characteristics of single-channel and multi-channel applications and between permanent and transient processes.
|
Single channel |
Multi-channel |
Transient |
Simplest to design and build |
Unusual choice but possible |
Permanent |
Structure almost identical to single-threaded, transient |
Most complex and efficient (for example, TSM) |