Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Message read-write method and apparatus

A reading and writing method and message technology, applied in the computer field, can solve problems such as occupying CPU time, and achieve the effect of saving CPU time

Active Publication Date: 2009-07-01
BEIJING TONGTECH CO LTD
View PDF0 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The problem to be solved by the embodiments of the present invention is to provide a method and device for reading and writing messages, so as to overcome the defect in the prior art that consumes a large amount of CPU time due to unnecessary wake-up of consumers

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
  • Message read-write method and apparatus
  • Message read-write method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0021] The present invention adopts BQS (Buffer Queue System, message queue system) based on memory, and this BQS adopts linked list type data structure, utilizes the IPC interprocess communication (shared memory, semaphore) technology of UNIX system, makes the producer of message and the consumer of message The operator can operate the message queue to complete the data exchange between application processes or threads.

[0022] A BQS can contain multiple message queues, and each message queue is independent of each other. Each message queue can contain multiple types of messages, and each type of message list can contain multiple messages or empty messages. In BQS, eac...

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 a message read-write method, which comprises the steps: message is sent to a message queue from a producer, a message synchronous list is inquired according to the type of the message, if recording which corresponds to the type of the message exists in the message synchronous list, corresponding consumers are confirmed. When having corresponding consumers, one of the corresponding consumers is awaked, and the message is sent to the awaked consumer. The invention further discloses a message read-write device, which comprises a sending device, an inquiry device, an awaking device and a device which sends the message to the awaked consumer. The invention inquires the corresponding consumers in the message synchronous list through the producer according to the type of the message, and the method of awaking one of the consumers leads the consumers not to be awaked wastefully, thereby saving the CPU time.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method and device for reading and writing messages. Background technique [0002] Data transmission through message queues is one of the basic methods of IPC (InterProcess Communication, inter-process communication) of the UNIX operating system, and is widely used in data exchange between distributed applications. The application program accesses the target message queue and reads or writes data by calling an API (Application Programming Interface, application programming interface) function provided by the system. According to the calling function, the application program can be divided into two types, message producer and consumer, and the message producer and consumer establish a connection by specifying the type of message sent or received. Each message is unique in the message queue. It can only be sent by a producer and enter the queue, and it can be taken out of the q...

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
Inventor 朱律玮任宇马新群邹强
Owner BEIJING TONGTECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products