Technical Helpweb

- more articles

Function calls take a long time to return or logging stops on Linux

Symptom

A program running under Linux calling Dialogic functions may experience long delays inside Dialogic function calls such as dx_play() or gc_Makecall().  Also, when this occurs, RTF logging stops from that process, though logging from other processes will continue as normal.  This symptom only appears to happen in a process where the Unix/Linux function fork() or posix_spawnp() is called.


Reason for the issue

The function fork() creates a child process and duplicates the parent's page table. The function vfork() creates a new process without copying the page table of the parent process; in both cases the parent is suspended until the child process is started or one of the exec() family of functions is invoked. The heavy usage of process based programs can cause scheduling delays, performance degradation, problems while copying memory mapped regions in parent process.


Solution

One way to avoid this issue is to program using POSIX threads (pthreads) instead of spawning new processes.  Pthread based programs are more optimized because they are created and managed with far less system overhead than running multiple processes. Also, communication between threads is achieved easier and more efficiently than communication between processes. Threads share the same memory space and usually faster to start and terminate. Using pthreads is the preferred option when creating a program to interact with Dialogic host runtime libraries.


Product List:

Dialogic® System Release 6.1

Dialogic® PowerMedia™ Host Media Processing Software 4.1

Dislogic® DM3 series Media Boards

Dialogic® JCT series Media Boards


Glossary of Acronyms / Terms:  

POSIX "Portable Operating System Interface [for Unix]" is the name of a family of related standards specified by the IEEE to define the application programming interface (API), along with shell and utilities interfaces for software compatible with variants of the Unix operating system, although the standard can apply to any operating system.




Feedback

Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page:

First published: 30-Sep-2011
Open access: Product rule: ; Page rule: Auto

Service Center Logon