與我們聯絡

與 Tek 業務代表即時對談。 上班時間:上午 6:00 - 下午 4:30 (太平洋時間)

致電

請致電

與 Tek 業務代表即時對談。 上班時間:上午 8:30 - 下午 5:30 (太平洋時間)

下載

下載手冊、產品規格表、軟體等等:

下載類型
機型或關鍵字

意見回饋

What is the difference between polling and event-driven background operation?

問題:

What is the difference between polling and event-driven background operation?

答案:

Polling is known to be the method of reading or writing a single value from a data acquisition system. The time between polled readings is scheduled by the operating system, such as Windows. Therefore, it is not deterministic and depends on multiple factors in the system, such as computer speed, operating systems, programming languages, and code optimization. A background operation, also known as DMA or Interrupt driven operation, is a task that runs under the control of the data acquisition hardware and notifies the application when it is complete. The time between background readings is clocked by the data acquisition hardware and is independent of Windows timing. During a background data transfer, the data acquisition hardware interrupts the CPU and the driver handles these interrupts by transferring the data into the application memory space. In addition, when the requested background operation is finished, the driver posts a Windows message or event to the application that will respond to this event and manipulate the data. While a polled operation is simple to program, it is generally advisable to use event-driven operations because they are more portable, robust, and less dependent on the operating system timing.

此常見問答集適用於:

沒有任何產品系列

產品:

常見問答集 ID 70596

檢視所有常見問答集 »