Unlock instant, AI-driven research and patent intelligence for your innovation.

Inter-thread data distribution method based on registration callback mechanism

A data distribution and inter-thread technology, which is applied in inter-program communication, electrical digital data processing, multi-program device, etc., can solve the problems of high technical requirements, high time overhead, low communication delay, etc., and simplify the establishment process , The effect of less time-consuming data transmission

Active Publication Date: 2021-11-09
HUNAN UNIV
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the prior art, inter-thread communication is mainly realized by using a lock queue or a lock-free queue; the lock queue cooperates with critical resources through the lock mechanism, and the implementation process involves calling the operating system interface, and the time overhead is relatively large; the transmission of the lock-free queue method, the communication delay is low, but it relies on the CPU to support atomic operations, and requires technicians to manually write the implementation, which has high requirements for technicians and is complex to implement

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Inter-thread data distribution method based on registration callback mechanism
  • Inter-thread data distribution method based on registration callback mechanism
  • Inter-thread data distribution method based on registration callback mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] Specific embodiments of the present invention will be described in further detail below in conjunction with the accompanying drawings and.

[0033] Based on this embodiment, inter-thread data distribution method to register a callback mechanism including thread 1: Data publishers location and Thread 2: Subscriber data resides thread.

[0034] This implementation of inter-thread data distribution method to register a callback mechanism based include the following steps:

[0035] 101: Thread 1 registered with the registration center, registration center to get a handle;

[0036] 102: 1 data created in the thread publisher, submit registration information to the data released by the registration center; registration information data publishers, including the type of theme, subject name and domain;

[0037] 103: receiving a registration request registry data distributor, the data is added to the data distribution by the publisher registry held by the container;

[0038] 104: Th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an inter-thread data distribution method based on a registration callback mechanism. The inter-thread data distribution method comprises the following steps: (1) registering by a data publisher; (2) registering a data subscriber; (3) enabling the data publisher to publish the data, wherein in the step (3), a method for publishing the data by the data publisher is as follows: enabling the data publisher to call a callback function interface or a data insertion interface of the data subscriber according to the priority of the data subscriber; for the data subscriber with the highest priority, calling a callback function interface of the data subscriber to process the data; and for the data subscribers with other priorities, calling the data insertion interfaces of the data subscribers, inserting the data into the private data chain tables of the data subscribers, waking up the data subscribers to take out the data in the data chain tables in sequence, and calling the callback functions of the data subscribers to process the data taken out from the data chain tables in sequence. The invention consumes little time for data transmission, and can be applied to occasions with frequent interaction of data among threads and high real-time requirements.

Description

Technical field [0001] The present invention relates to a method for distributing data across threads, particularly relates to a method for distributing data between threads based on registered callback mechanism. Background technique [0002] Currently, distributed real-time data distribution service middleware (Data Distribution Service, DDS) emphasized that data-centric, providing rich QoS (Quality of Service, Quality of Service) strategies to ensure that data in real-time, efficient and flexible distribution to meet variety of distributed real-time communications applications. However, the inventors found that the actual testing process, using the DDS data transfer between threads, the transmission delay will reach hundreds of subtle, can not take full advantage of inter-thread communication, the robot communication middleware timing requirements between some threads more demanding, higher priority needs to implement some less than 10us response. When the robot is in the fast...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54
CPCG06F9/546
Inventor 张小刚齐乐陈华程伟远王绍源
Owner HUNAN UNIV