연락처

텍트로닉스 담당자와 실시간 상담 6:00am-4:30pm PST에 이용 가능

전화

전화 문의

9:00am-6:00PM KST에 이용 가능

다운로드

매뉴얼, 데이터 시트, 소프트웨어 등을 다운로드할 수 있습니다.

다운로드 유형
모델 또는 키워드

피드백

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

질문:

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

답변:

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.


이 FAQ는 다음에 적용 됩니다:

제품 시리즈 없음

제품:

FAQ ID 70566

모든 FAQ 보기 »