Equipment IO queue method based on atomic operation

An atomic operation and queue technology, applied in the field of computer system software programming, can solve the problems of complex implementation of atomic queues, excessive overhead and impracticality, and achieve the effect of speeding up data input and output and saving computing resources.
CN104615445AActive Publication Date: 2015-05-13CHANGSHA XINHONG SOFTWARE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGSHA XINHONG SOFTWARE
Publication Date
2015-05-13

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to an equipment IO queue method based on atomic operation. A queue is composed of an owner pointer, a tail pointer, data nodes and temporary nodes. The enqueue operation can be simultaneously carried out by a plurality of producers, and the dequeue operation can only be carried out by a consumer. The dequeue operation needs one temporary node to participate, and the first data node in the queue is replaced and taken out. In the process, the atomic compare-and-swap (CAS) operation is used to judge whether the tail pointer points to the first data node or not; if yes, the tail pointer points to the temporary node. The queue further comprises control power releasing operation, and the control power releasing operation is as follows: the first node is removed, and the atomic compare-and-swap (CAS) operation is used to judge whether the tail pointer points to the first node or not; if yes, the tail pointer is changed to a null pointer; if the first node is removed, so that the queue is emptied, the control power is released.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of computer system software programming, in particular to an atomic operation-based device IO queue method. Background technique

[0002] In the computer system, the access to the device IO is exclusive. Even in a symmetric multiprocessor system, even if it seems that multiple tasks are accessing a certain hardware device at the same time from the user's point of view, in the actual operation process of the bottom layer, it is By submitting the requests in the queue to the hardware device one by one to complete the deserialization. Although some hardware supports command queues inside the hardware, software queues are still required to manage other requests. This involves the mutual exclusion problem of multiple tasks accessing the IO queue at the same time. Generally, locks are used in the design to control the problem of multiple tasks accessing the queue at the same time, that is, only one task can successfully ob...

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