联系我们

与泰克代表实时聊天。 工作时间:上午 9:00 - 下午 5:00(太平洋标准时间)。

电话

致电我们

工作时间:上午9:00-下午5:00(太平洋标准时间)

下载

下载手册、产品技术资料、软件等:

下载类型
型号或关键字

反馈

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

查看所有常见问题 »