Optimizing polling system and optimizing polling method for collecting data from plurality of buffer zones
A multi-buffer and polling method technology, applied in the direction of memory system, electrical digital data processing, memory address/allocation/relocation, etc., to achieve the effect of reducing probability, avoiding extra overhead, and reducing the number of accesses
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2012-06-27
Smart Images
Figure 1 Figure 2
Abstract
Description
technical field
[0001] The invention belongs to the field of network data processing, and in particular relates to an optimized polling system and method for collecting data from multiple buffers. Background technique
[0002] In the network data acquisition system, it is often necessary to install multiple data acquisition cards on one processing device, each acquisition card has its own data buffer, or there are multiple data buffers on one acquisition card, which requires software to The buffers are polled for data.
[0003] There are two polling modes of the general system of the prior art:
[0004] The first method is greedy access; the software starts from the first buffer and polls each buffer in turn, no matter how much data is in the buffer, it will be read out until the buffer is empty before accessing the next one. buffer. For example, if there are three buffers, the software first reads data from the first buffer until all the data in the first buffer is empti...
Examples
Embodiment Construction
[0023] Such as figure 1 As shown, the optimized polling system that receives data from multiple buffers, the polling system includes: a polling control module and a buffer, the polling control module can access the buffer; the polling control module includes A step size array and a static variable; the step size array and the static variable perform polling access to the buffer respectively.
[0024] Described step size array, through this array, the present invention combines greedy polling and average polling two kinds of polling modes, sets a step size variable for each buffer zone, and this step size represents every time when polling this buffer zone , the maximum length of data read from the buffer each time, through this step size control, avoiding the problem of reading all data during greedy access and only reading one data during average access. After polling the buffer each time, the software dynamically adjusts the step size variable of each buffer according to th...