Contactez-nous

Chat en direct avec un représentant Tek. Service disponible de 9 h à 17 h, CET jours ouvrables.

Téléphone

Appelez-nous au

Disponible de 9 h à 17 h CET jours ouvrables.

Télécharger

Télécharger des manuels, des fiches techniques, des logiciels, etc. :

TYPE DE TÉLÉCHARGEMENT
MODÈLE OU MOT CLÉ

Feedback

What are multithreaded applications, and can I run them using the IEEE-488 bus?

Question :

What are multithreaded applications, and can I run them using the IEEE-488 bus?

Réponses :

A thread is a path of execution through a program. Normally, each thread operates independently, and is unaware of other threads in a process, unless the programmer uses semaphores or other methods of interprocess communication. The OS scheduler controls the thread execution based on thread priority and CPU load.

Multithreaded test and measurement applications are complex to write because it is a challenge to ensure system stability and to avoid hardware conflicts that can result from multiple threads running in parallel. Before attempting to write multithreaded applications, you need to make sure all device drivers and libraries used in the system are threadsafe. A software call is considered threadsafe if it can be used safely in a multithreaded application. If the call is not threadsafe, then multiple threads using that call can collide and corrupt data. An example of this would be a multithreaded application that communicates with a DMM and a power supply at the same time. Let's say thread 1 is writing data to the DMM and thread 2 is writing data to the power supply simultaneously, using one IEEE-488 controller board in the system. If the GPIB 'write' call is not threadsafe, the application would fail and the data would become corrupted.

In addition to threadsafety, the programmer has a greater responsibility to coordinate the execution of all threads in the application. Considering the GPIB protocol and the Talk/listen modes, software interlock via semaphore flag is most often necessary to ensure that the right data is associated with the proper thread. Otherwise, a thread could communicate with the wrong GPIB device on the bus.


Cette FAQ concerne :

Aucune série du produit

Produit :

Numéro de la FAQ 70566

Afficher toutes les FAQ »