PREV TOC HOME INDEX NEXT


2.2.1 Synchronous Mode Programming

Synchronous mode programming is characterized by functions that block thread execution until the function completes or a failed or error message is returned. The operating system can put individual device threads to sleep while allowing other device threads to continue their actions unabated. Thus, a synchronous function waits for a completion indication from the firmware or driver before returning control to the thread. Since further execution is blocked by a synchronous function, a separate thread is needed for each channel or task. When an Intel® Dialogic® function completes, the operating system wakes up the function's thread so that processing continues. A termination event is not generated for a synchronous function.

The Windows synchronous programming model is recommended for less complex applications where only a limited number of channels and calls will be handled and processor loading remains light. The synchronous model should be used only for simple and straight flow control applications with only one action per device occurring at any time.

A synchronous model application can handle multiple channels by structuring the application as a single-channel application and then creating a separate synchronous thread for each channel. For example, for a 60 channel application, the application creates 60 synchronous threads, one thread to handle each of the 60 channels. The application would not need event-driven state machine processing because each Intel® Dialogic function runs uninterrupted to completion. Since this model calls functions synchronously, it is less complex than a corresponding asynchronous model application. However, since synchronous applications imply the creation of a thread or a process for each channel used, these applications tend to slow down the response of the system and to require a high level of system resources (that is, they increase processor loading) to handle each channel. This can limit maximum device density, providing limited scalability for growing systems.

When using the synchronous model, unsolicited events are not processed until the thread calls an Intel® Dialogic function such as gc_GetMetaEvent( ), dx_getevt( ) or dt_getevt( ). Unsolicited events can be handled as follows:


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2002, Intel Corporation
All rights reserved
This page generated November, 2002