CN106325758A - Method and device for queue storage space management - Google Patents

Method and device for queue storage space management Download PDF

Info

Publication number
CN106325758A
CN106325758A CN201510336880.4A CN201510336880A CN106325758A CN 106325758 A CN106325758 A CN 106325758A CN 201510336880 A CN201510336880 A CN 201510336880A CN 106325758 A CN106325758 A CN 106325758A
Authority
CN
China
Prior art keywords
pointer
queue
free
team
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510336880.4A
Other languages
Chinese (zh)
Other versions
CN106325758B (en
Inventor
徐东国
郭樑
王闯
安康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen ZTE Microelectronics Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201510336880.4A priority Critical patent/CN106325758B/en
Priority to PCT/CN2016/081542 priority patent/WO2016202120A1/en
Publication of CN106325758A publication Critical patent/CN106325758A/en
Application granted granted Critical
Publication of CN106325758B publication Critical patent/CN106325758B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention provides a method for queue storage space management. The method comprises the steps that a pointer group is established, wherein the pointer group comprises at least one message pointer field, and a message pointer is stored in each message pointer field; and queue storage space can be read and written by the pointer group. The invention also provides a device for the queue storage space management.

Description

A kind of queue storage space management method and device
Technical field
The present invention relates to the correlation technique of queue management in communication technical field, particularly relate to a kind of queue storage Space management and device.
Background technology
Along with developing rapidly of network traffics, user service quality (QoS, the Quality of to data product Service) requirement is more and more higher, needs number of queues, bandwidth and the packet storage time supported also to carry QoS Having gone out higher requirement, the performance requirement of queue management unit (QM, Queue Manager) is just got over by this Come the highest.
Under normal circumstances, queue management includes joining the team, going out two basic operations of team.When message is joined the team, according to The queue number that message comprises can be scheduled out in packet storage to corresponding queue storage space at message During team, read the message of storage of joining the team from queue storage space.
For jumbo traffic management, it is typically all packet storage in external memory storage, along with storage The external memory storage of message is increasing, how external memory storage carries out caching and divides and management becomes more to come The most important.Generally, being to be divided according to fixed size by external memory storage, each unit is one Individual Block block, a Block block can store the message fragment of 512B or other fixed sizes.Each The all corresponding address pointer of Block, points to the address of message fragment storage by pointer.In order to save with Machine access memory RAM (RAM, Random Access Memory) resource, these pointers are usually It is managed by chained list.
Existing queue management method is generally based on the queue management method of chained list.Due to number of addresses very Many, it usually needs a RAM deposits.One message of team is often dispatched out in queue, is required for refreshing this The head pointer of queue, first reads the address of the next message of queue, the most again by the next one from RAM The address of message is updated to queue head pointer.Here, owing to the read latency of RAM is bigger, therefore head refers to The refreshing of pin needs a lot of clock cycle, and before head pointer has refreshed, queue can not send next Individual message, this just has a strong impact on the speed group message of queue.
Owing to current queue storage space is the biggest, so link table information is typically all stored in off-chip Inside 4 haplotype data ratios (QDR, Quad Data Rate) memorizer or 2 haplotype data ratios (DDR, Double Data Rate) in memorizer, the read-write of QDR postpones have about 8 clock cycle, DDR's Read-write postpones bigger, and too high read-write postpones significantly limit the lifting of queue management performance
Summary of the invention
In view of this, embodiment of the present invention expectation provides a kind of queue storage space management method, outside solving Portion's memorizer height read-write delay issue.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
Embodiments providing a kind of queue storage space management method, described method includes:
Creating pointer set, described pointer set includes that the message pointer field of at least one, each message pointer field are deposited Store up a message pointer;
By described pointer set, queue storage space is written and read operation.
In such scheme, between the message pointer field in described pointer set, address is separate.
In such scheme, described by described message pointer set, queue storage space is written and read operation bag Include:
By described message pointer set, queue storage space is carried out free pointer application, queue is joined the team, team List team, free pointer recovery and free pointer storage of linked list and queue linked list storage operation.
In such scheme, described by pointer set, queue storage space is carried out free pointer application and includes:
Whether free pointer is also had in judging current pointer set;
When there is no free pointer in current pointer group, apply for a new free pointer group as current pointer group, And read the free pointer in current pointer group;
In current pointer group during available free pointer, read the free pointer in current pointer group.
In such scheme, described by pointer set, queue storage space is carried out queue enqueue operations and includes:
The pointer joined the team by needs is filled in the free pointer in described pointer set;
When described pointer set is saturated or the pointer of joining the team of same queue waits time-out, described pointer set is carried out Queue enqueue operations.
In such scheme, described by pointer set, queue storage space is carried out queue dequeue operation and includes:
By need team pointer write go out group First Input First Output in advance, by described pre-go out group First Input First Output Carry out queue dequeue operation.
In such scheme, described by pointer set, queue storage space is carried out free pointer recovery and includes:
The dequeue pointer that queue dequeue operation discharges is write pointer set successively;
When described pointer set is saturated, described pointer set is carried out free pointer recovery.
The embodiment of the present invention additionally provides a kind of queue storage space managing device, and described device includes: pointer Group creating unit, operating unit, wherein,
Described pointer set creating unit, is used for creating pointer set, and described pointer set includes the message of at least one Pointer field, each message pointer field one message pointer of storage;
Described operating unit, for by described pointer set, is written and read operation to queue storage space.
In such scheme, described operating unit specifically for:
By described message pointer set, queue storage space is carried out free pointer application, queue is joined the team, team List team, free pointer recovery and free pointer storage of linked list and queue linked list storage operation.
In such scheme, described operating unit specifically for:
Whether free pointer is also had in judging current pointer set;
When there is no free pointer in current pointer group, apply for a new free pointer group as current pointer group, And read the free pointer in current pointer group;
In current pointer group during available free pointer, read the free pointer in current pointer group.
In such scheme, described operating unit specifically for:
The pointer joined the team by needs is filled in the free pointer in described pointer set;
When described pointer set is saturated or the pointer of joining the team of same queue waits time-out, described pointer set is carried out Queue enqueue operations.
In such scheme, described operating unit specifically for:
By need team pointer write go out group First Input First Output in advance, by described pre-go out group First Input First Output Carry out queue dequeue operation.
In such scheme, described operating unit specifically for:
The dequeue pointer that queue dequeue operation discharges is write pointer set successively;
When described pointer set is saturated, described pointer set is carried out free pointer recovery.
Queue storage space management method that the embodiment of the present invention is provided and device, first create pointer set, institute State pointer set and include the message pointer field of at least one, each message pointer field one message pointer of storage;Again By described pointer set, queue storage space is written and read operation.So, queue storage space is being entered Row joins the team, when going out team and free pointer management, once access external memory storage and obtain obtaining N message and refer to Pin, is available for being used for multiple times such that it is able to reduce the access times to external memory storage, solves outside storage Device height read-write delay issue, improves the process performance of queue management unit, saves the reading of external memory storage Write number of times, reduce power consumption.
Accompanying drawing explanation
Fig. 1 is embodiment of the present invention pointer set structural representation;
Fig. 2 is embodiment of the present invention queue storage space management method schematic flow sheet;
Fig. 3 is embodiment of the present invention free pointer chained list link structure schematic diagram;
Fig. 4 is embodiment of the present invention queue linked list link structure schematic diagram;
Fig. 5 is that the embodiment of the present invention carries out free pointer application method schematic flow sheet to queue storage space;
Fig. 6 is that the embodiment of the present invention carries out queue enqueue operations method flow schematic diagram to queue storage space;
Fig. 7 is that the embodiment of the present invention carries out queue dequeue operation method flow schematic diagram to queue storage space;
Fig. 8 is that embodiment of the present invention queue goes out group method flow schematic diagram in advance;
Fig. 9 is that the embodiment of the present invention carries out free pointer recovery method schematic flow sheet to queue storage space;
Figure 10 is embodiment of the present invention dequeue pointer joining method schematic diagram;
Figure 11 is embodiment of the present invention queue storage space managing device structural representation.
Detailed description of the invention
In embodiments of the present invention, first creating pointer set, wherein, described pointer set includes the report of at least one Literary composition pointer field, each message pointer field one message pointer of storage;Again by described pointer set, queue is deposited Storage space is written and read operation.
In the embodiment of the present invention, described pointer set structural representation is as it is shown in figure 1, carrying out queue storage sky Between management time, do not use the real pointer of message to be managed, use pointer set be managed, pointer set is not As actual packet storage pointer, it is intended only as the address of stored messages pointer.The pointer of packet storage is pressed It is shining into team's order to be sequentially stored in inside the message pointer field of pointer set.
Concrete, the quantity of the message pointer field comprised in described pointer set determines when creating pointer set, When queue storage space being written and read operation by pointer set, the message pointer field number in described pointer set Constant.
In the embodiment of the present invention, a pointer set can include N number of message pointer field, stores N number of reality Message descriptor, message descriptor includes the actual pointer of message, memorizer bank information etc., N number of reality Message pointer field address between separate, there is no any address information relation.Queue storage space is entered When row is joined the team and goes out group write operation, in units of pointer set, once read or write a pointer set;By Include the bag descriptor of multiple reality in pointer set, the message pointer of corresponding N number of reality, therefore to queue Memory space carries out joining the team, when going out team and free pointer management, once access external memory storage and obtain obtaining To N message pointer, it is available for being used for multiple times such that it is able to reduce the access times to external memory storage.
Below in conjunction with the accompanying drawings and specific embodiment, to queue storage space management method described in the embodiment of the present invention Being further elaborated, Fig. 2 is embodiment of the present invention queue storage space management method schematic flow sheet, Queue storage space management method described in the embodiment of the present invention comprises the following steps as shown in Figure 2:
Step 201: create pointer set;
Wherein, described pointer set includes the message pointer field of at least one, and each message pointer field stores one Message pointer;Between message pointer field in described pointer set, address is separate, there is not address information and closes System.
Concrete, when carrying out pointer set first and being initialized, the content inside pointer set is entirely the free time Pointer, initializes in order, and pointer set is after repeatedly going out team and reclaiming, and pointer set stores Actual pointer is all upset, and no longer there is incidence relation between the pointer in actual pointer field.
Step 202: by described pointer set, is written and read operation to queue storage space;
Wherein, by described message pointer set, queue storage space is carried out free pointer application, queue enters Team, queue go out team, free pointer recovery and free pointer storage of linked list and queue linked list storage operation.
In the embodiment of the present invention, described time queue storage space is carried out free pointer storage of linked list, the free time refers to Pin chained list is linked by pointer set, and a pointer set stores the free pointer of N number of reality, and these are actual Free pointer between there is no any relation, pointer set is intended only as storing the address of actual free pointer.Empty In virtual mouse is stored in chip end to end of not busy pointer chained list, free pointer linked list head node, tail node and in Intermediate node is stored in external memory storage.Each pointer set has the free pointer of N number of reality, idle Pointer chain table link structure schematic diagram is as shown in Figure 3.
In the embodiment of the present invention, described queue storage space is carried out queue linked list storage operation time, based on team The pointer chained list of row also uses pointer set to link, and Fig. 4 is embodiment of the present invention queue linked list link structure Schematic diagram;Each queue has the most independent virtual linked list, a pointer set to store the queue of N number of reality Pointer, pointer set is intended only as storing the address of actual arrays pointer;The virtual mouse end to end of quene state table Being stored in chip, queue linked list head node, tail node and intermediate node are stored in external memory storage. Each queue linked list has independent non-null states information, is stored in chip, is used to refer to quene state and is No non-NULL, only non-NULL just carry out quene state renewal.
In the embodiment of the present invention, described by pointer set, queue storage space is carried out free pointer application bag Include: in judging current pointer set, whether also have free pointer;When there is no free pointer in current pointer group, Apply for that a new free pointer group, as current pointer group, and reads the free pointer in current pointer group; In current pointer group during available free pointer, read the free pointer in current pointer group.
Fig. 5 is that the embodiment of the present invention carries out free pointer application method schematic flow sheet to queue storage space, As it is shown in figure 5, in the embodiment of the present invention, described queue storage space is carried out free pointer application include with Lower step:
Step A1: receive free pointer application request;
Step A2: whether also have free pointer in judging current pointer set;The free time is not had in current pointer group During pointer, perform step A3;Otherwise, step A4 is performed;
Step A3: apply for that a new free pointer group, as current pointer group, and performs step A4;
When not having free pointer in current pointer group, when the most current virtual mouse exhausts, then application one is new Free pointer group as current pointer group, again initiate read free virtual pointer First Input First Output FIFO; Concrete, from external memory storage, once read a pointer set pin, use next pointer set nextptr to update Head pointer headptr, application is stored in First Input First Output to N number of actual free pointer, in case queue is actual Join the team use.
Step A4: read the free pointer in current pointer group.
Concrete, in this step, when also having free pointer in current pointer set, i.e. current pointer group does not has Exhaust, then use remaining free pointer in current virtual pointer, carry out idle chained list and update operation;Use The head pointer of current pointer set reads external memory storage, it is thus achieved that the content of current pointer group and next pointer set Nextptr, uses the nextptr of pointer set to update idle queues state table head pointer headptr, reading current N number of actual free pointer inside pointer set is stored in pointer set FIFO, as the actual use of joining the team of queue. When power-up initializing, First Input First Output FIFO is empty, carries out the renewal of virtual free pointer always, Will be full until free pointer FIFO FIFO is filled out.
In the embodiment of the present invention, described by pointer set, queue storage space is carried out queue enqueue operations bag Include: the pointer joined the team by needs is filled in the free pointer in described pointer set;When described pointer set is saturated, Or the pointer of joining the team of same queue waits time-out, described pointer set is carried out queue enqueue operations.
Fig. 6 is that the embodiment of the present invention carries out queue enqueue operations method flow schematic diagram to queue storage space, As shown in Figure 6, in the embodiment of the present invention, described queue storage space is carried out queue enqueue operations include with Lower step:
Step B1: receive pointer of joining the team;
Step B2: the pointer joined the team by needs is filled in the free pointer in described pointer set;
In this step, a pointer set can only store the pointer of joining the team of a queue, actual the entering of storage The order joined the team according to queue between team's pointer is ranked up, order can not entanglement, otherwise can cause message disorderly Sequence.
Step B3: judge that current pointer group is the most saturated;When current pointer group does not has saturated, perform step B4;Otherwise, step B6 is performed;
Step B4: continue waiting for the pointer of joining the team of same queue;
Step B5: judge whether the pointer of joining the team of same queue waits time-out;Pointer of joining the team when same queue Wait time-out, perform step B6;When the pointer of joining the team of same queue is without waiting for time-out, i.e. receive identical Queue join the team pointer time, return step B2;
In step B3-B5, after the pointer message of joining the team receiving message enters, it is judged that current empty pointer Whether also have free pointer territory to use, if having, carrying out pointer set splicing of joining the team, then judging current pointer The pointer field of group is the most saturated, without saturated, then continues waiting for the pointer of next same queue;In advance If in the time, without the pointer receiving next same queue, then it is assumed that wait until time-out, if reached Timeout conditions, even if pointer set is not spliced saturated, pressure to be carried out is joined the team, simultaneously in record pointer group Pointer number.
Step B6: described pointer set is initiated queue enqueue operations;
Step B7: update the actual pointer of present node chained list and next pointer set nextptr;
Step B8: write external memory storage by described pointer set;
Step B9: updating pointer set of currently joining the team is tail pointer tailptr;
Step B10: update quene state table;
Wherein, during pointer set being carried out queue enqueue operations described in step B6-B10, use queue The tail pointer tailptr of state writes external memory storage as address, and update the nextptr joined the team is current team simultaneously The tailptr pointer of row.
In the embodiment of the present invention, when pointer set is joined the team when, use the current pointer group joined the team as address Write external memory storage, update actual pointer and next pointer set nextptr, each team of present node chained list Being listed in joins the team carries out being required for prefetching 2 pointer set when of pointer set splicing, the when that current pointer being joined the team, Need to provide next pointer set, advantage of this is that to reduce and be once stored in external memory storage The reading of chained list, chained list updates and updates the tail pointer tailptr that virtual mouse is current queue that currently joins the team simultaneously. The non-null states simultaneously updating virtual queue state table is non-NULL.
In the embodiment of the present invention, described by pointer set, queue storage space is carried out queue dequeue operation bag Include: the pointer needing team is formed pointer set, described pointer set is carried out queue dequeue operation.
Fig. 7 is that the embodiment of the present invention carries out queue dequeue operation method flow schematic diagram to queue storage space, As it is shown in fig. 7, in the embodiment of the present invention, described queue storage space is carried out queue dequeue operation include with Lower step:
Step C1: the pointer needing team is write and goes out group First Input First Output in advance;
In the embodiment of the present invention, in pre-dequeue process, carry out the most on demand pre-go out team process, it would be desirable to The pointer write going out team goes out group First Input First Output in advance;Fig. 8 is that embodiment of the present invention queue goes out group method stream in advance Journey schematic diagram, as shown in Figure 8, including step once:
Step D1: determine the pre-dequeue process of beginning;
Step D2: judge that quene state table status becomes whether into non-NULL;When quene state table status is not non-NULL Time, i.e. quene state is empty, then perform step D3;Otherwise, step D4 is performed;
In this step, when quene state table status becomes non-NULL time, and message descriptor (PD, Pack Descriptor), the when that First Input First Output FIFO not writing full, i.e. can reach queue Queue and go out team in advance Condition.
Step D3: wait process of joining the team, and after message pointer is joined the team, return step D1;
In this step, when quene state is empty, it is impossible to carry out dequeue operation.
Step D4: according to queue head pointer's headptr reading external memory;
Step D5: receive the data that external memory storage returns;
Step D6: update quene state table;
In step D4-D6, according to each queue Queue head pointer headptr, external memory storage is carried out Read, obtain the dequeue pointer of current N number of reality;
Step D7: message pointer write PD/ unit descriptor (CD, Cell Descriptor) is first entered elder generation In dequeue FIFO;
In this step, if belonging to message owner pointer, then write and go out in group PD FIFO in advance, if belonging to report Tattoo pointer, write goes out in group CD FIFO in advance;Update next pointer set nextptr is current queue simultaneously Virtual head pointer.
Step D8: updating next pointer set nextptr is the head pointer of current queue;
So, the pre-dequeue process of queue is completed;
Step C2: by described pre-go out group First Input First Output carry out queue dequeue operation;
In time going out group PD FIFO non-NULL in advance, then according to quene state dispatch out pre-go out after group PD FIFO, Initiate the real team that goes out to ask.During queue dequeue operation, based on going out group PD FIFO in advance, get Message owner pointer, if also message body information, then continues to read to go out group CD FIFO in advance, obtains queue All pointers.The splicing simultaneously carrying out pointer is reclaimed, and reads real message from external memory storage.
In the embodiment of the present invention, described by pointer set, queue storage space is carried out free pointer and reclaims behaviour Work includes: the free pointer that queue dequeue operation discharges is write pointer set successively;When described pointer set is saturated Time, described pointer set is carried out free pointer recovery.
Fig. 9 is that the embodiment of the present invention carries out free pointer recovery method schematic flow sheet to queue storage space, As it is shown in figure 9, in the embodiment of the present invention, described queue storage space is carried out free pointer reclaim include with Lower step:
Step E1: the dequeue pointer that queue dequeue operation discharges is write pointer set successively;
Step E2: judge that described pointer set is the most saturated;When described pointer set is saturated, perform step E4, Otherwise, step E3 is performed;
Step E3: wait dequeue pointer;And return step E1;
In step E1-E3, each Queue is gone out the actual dequeue pointer of team's release, writes to be recycled successively Each territory of pointer set, spell full after just carry out real recovery;Figure 10 is embodiment of the present invention dequeue pointer Joining method schematic diagram, as shown in Figure 10, q0, q1, q2 represent different queues respectively, ptrA, ptrB, PtrC represents different pointers respectively, and the dequeue pointer in the release of queue dequeue operation writes pointer set successively During, queue not being made a distinction, any queue dequeue pointer is all spliced to inside a pointer set, because of There is no any relatedness between actual pointer inside this pointer set, so, free pointer can be reclaimed in time, Need not be based on queue etc. to be spliced.
Step E4: carry out free pointer recovery;
Step E5: by the tail pointer tailptr reading external memory of idle queues state;
Step E6: write the next pointer set territory of external memory storage by described pointer set;
Step E7: update state table tail pointer tailptr by described pointer set;
In step E4-E7, go out the pointer of team when being a full pointer set, just carry out real pointer recovery.
In the embodiment of the present invention, a First Input First Output FIFO team's pointer to be released is needed to store Actual pointer goes out the pointer set to be released that team produces in advance;Because virtual mouse itself does not has any free time to refer to Pin, therefore, pointer set release can't be reclaimed, after needing the pointer waiting out team to discharge, Liang Zhejin Row associates recovery that just can be real.After dequeue pointer spells a full pointer set, from going out team's pointer set to be released First Input First Output FIFO reads a pointer set reclaim;In removal process, first by the free time The tail pointer tailptr of quene state table removes reading external memory, it is thus achieved that the content of current tail pointer node, Then pointer set to be recycled is written back to the next pointer set nextptr territory of current tail pointer group, completes The renewal of free virtual chained list, then updates tail pointer tailptr of quene state table by pointer set to be recycled Territory, so far, pointer recovery action is fully completed.
The embodiment of the present invention additionally provides a kind of queue storage space managing device, and Figure 11 is the embodiment of the present invention Queue storage space managing device structural representation, as shown in figure 11, embodiment of the present invention queue storage space Managing device includes: pointer set creating unit 111, operating unit 112, wherein,
Described pointer set creating unit 111, is used for creating pointer set, and described pointer set includes at least one Message pointer field, each message pointer field one message pointer of storage;
In the embodiment of the present invention, between the message pointer field in described pointer set, address is separate, does not exists Address information relation.
Concrete, when carrying out pointer set first and being initialized, the content inside pointer set is entirely the free time Pointer, initializes in order, and pointer set is after repeatedly going out team and reclaiming, and pointer set stores Actual pointer is all upset, and no longer there is incidence relation between the pointer in actual pointer field.
Described operating unit 112, for by described pointer set, is written and read operation to queue storage space;
Wherein, described operating unit 112 specifically for: by described message pointer set, to queue storage sky Between carry out free pointer application, queue is joined the team, queue goes out team, free pointer reclaim and free pointer chained list Storage and queue linked list storage operation.
In the embodiment of the present invention, described operating unit 112 carries out free pointer chained list to queue storage space and deposits Chu Shi, free pointer chained list is linked by pointer set, and the free time of the pointer set N number of reality of storage refers to Pin, does not has any relation between the free pointer of these reality, pointer set is intended only as storing the actual free time and refers to The address of pin.In virtual mouse is stored in chip end to end of free pointer chained list, free pointer linked list head node, Tail node and intermediate node are stored in external memory storage.Each pointer set has the free time of N number of reality Pointer.
In the embodiment of the present invention, described operating unit 112 carries out queue linked list storage behaviour to queue storage space When making, pointer chained list based on queue also uses pointer set to link, and each queue has the most independent Virtual linked list, a pointer set stores the queue pointer of N number of reality, and pointer set is intended only as storing actual team The address of column pointer;In virtual mouse is stored in chip end to end of quene state table, queue linked list head node, Tail node and intermediate node are stored in external memory storage.Each queue linked list has independent non-null states Information, is stored in chip, and whether non-NULL, only non-NULL just carry out quene state to be used to refer to quene state Update.
In the embodiment of the present invention, described operating unit 112 specifically for: whether judge in current pointer set Also has free pointer;When there is no free pointer in current pointer group, apply for a new free pointer group conduct Current pointer group, and read the free pointer in current pointer group;In current pointer group during available free pointer, Read the free pointer in current pointer group.
Concrete, when there is no free pointer in current pointer group, when the most current virtual mouse exhausts, then institute State operating unit 112 and apply for that a new free pointer group, as current pointer group, is initiated to read idle void again Intend pointer First Input First Output FIFO;Concrete, described operating unit 112 is once read from external memory storage One pointer set pin, uses next pointer set nextptr to update head pointer headptr, application to N number of reality Border free pointer is stored in First Input First Output, in case the actual use of joining the team of queue.
When also having free pointer in current pointer set, i.e. current pointer group does not exhaust, and the most described operation is single Unit 112 uses remaining free pointer in current virtual pointer, carries out idle chained list and updates operation;Use and work as The head pointer of front pointer set reads external memory storage, it is thus achieved that the content of current pointer group and next pointer set Nextptr, uses the nextptr of pointer set to update idle queues state table head pointer headptr, reading current N number of actual free pointer inside pointer set is stored in pointer set FIFO, as the actual use of joining the team of queue. When power-up initializing, First Input First Output FIFO is empty, carries out the renewal of virtual free pointer always, Will be full until free pointer FIFO FIFO is filled out.
In the embodiment of the present invention, described operating unit 112 specifically for: the pointer joined the team by needs is filled into In free pointer in described pointer set;When described pointer set is saturated or the pointer of joining the team of same queue waits Time-out, carries out queue enqueue operations by described pointer set.
In the embodiment of the present invention, a pointer set can only store the pointer of joining the team of a queue, the reality of storage The order joined the team according to queue between pointer of joining the team on border is ranked up, order can not entanglement, otherwise can cause Packet out-ordering.
In step B3-B5, after the pointer message of joining the team receiving message enters, described operating unit 112 Judging whether current empty pointer also has free pointer territory to use, if had, carrying out pointer set splicing of joining the team, so Rear judge that the pointer field of current pointer group is the most saturated, without saturated, then continue waiting for next identical The pointer of queue;In Preset Time, without the pointer receiving next same queue, then it is assumed that wait until Time-out, if reaching Timeout conditions, even if pointer set is not spliced saturated, pressure to be carried out is joined the team, with Time record pointer group in pointer number.
During pointer set is carried out queue enqueue operations, the tail pointer tailptr of quene state is used to make Write external memory storage for address, update the tailptr pointer that nextptr is current queue joined the team simultaneously.
In the embodiment of the present invention, described operating unit 112 specifically for: the pointer write that will need team is pre- Go out group First Input First Output, by described pre-go out group First Input First Output carry out queue dequeue operation.
Concrete, when quene state table status becomes non-NULL time, and PD First Input First Output FIFO does not has The when of writing full, i.e. can reach queue Queue and go out group condition in advance.
In time going out group PD FIFO non-NULL in advance, then according to quene state dispatch out pre-go out after group PD FIFO, Initiate the real team that goes out to ask.During queue dequeue operation, based on going out group PD FIFO in advance, get Message owner pointer, if also message body information, then continues to read to go out group CD FIFO in advance, obtains queue All pointers.The splicing simultaneously carrying out pointer is reclaimed, and reads real message from external memory storage.
Operating unit 112 described in the embodiment of the present invention specifically for: by queue dequeue operation discharge go out team Pointer writes pointer set successively;When described pointer set is saturated, described pointer set is carried out free pointer recovery.
Concrete, each Queue is gone out the actual dequeue pointer of team's release by described operating unit 112, successively Write each territory of pointer set to be recycled, after spelling completely, just carry out real recovery;Release in queue dequeue operation During the dequeue pointer put writes pointer set successively, not making a distinction queue, any queue goes out team and refers to Pin is all spliced to inside a pointer set, does not therefore have any relatedness between the actual pointer inside pointer set, So, free pointer can be reclaimed in time, need not be based on queue etc. to be spliced.
In the embodiment of the present invention, a First Input First Output FIFO team's pointer to be released is needed to store Actual pointer goes out the pointer set to be released that team produces in advance;Because virtual mouse itself does not has any free time to refer to Pin, therefore, pointer set release can't be reclaimed, after needing the pointer waiting out team to discharge, Liang Zhejin Row associates recovery that just can be real.After dequeue pointer spells a full pointer set, from going out team's pointer set to be released First Input First Output FIFO reads a pointer set reclaim;In removal process, first by the free time The tail pointer tailptr of quene state table removes reading external memory, it is thus achieved that the content of current tail pointer node, Then pointer set to be recycled is written back to the next pointer set nextptr territory of current tail pointer group, completes The renewal of free virtual chained list, then updates tail pointer tailptr of quene state table by pointer set to be recycled Territory, so far, pointer recovery action is fully completed.
Each processing unit in queue storage space managing device shown in Figure 11 realize function, can join Understand according to the associated description of aforementioned queue storage space management method.It will be appreciated by those skilled in the art that In queue storage space managing device shown in Figure 11, the function of each processing unit can be by running on processor On program and realize, it is possible to realized, such as by concrete logic circuit: can be by central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA) realize.
In several embodiments provided by the present invention, it should be understood that disclosed method, Apparatus and system, Can realize in other way.Device embodiment described above is only schematically, such as, The division of described unit, is only a kind of logic function and divides, and actual can have other division side when realizing Formula, such as: multiple unit or assembly can be in conjunction with, or are desirably integrated into another system, or some features can To ignore, or do not perform.It addition, the communication connection that shown or discussed each ingredient is each other can To be the INDIRECT COUPLING by some interfaces, equipment or unit or communication connection, can be electrical, machinery Or other forms.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, as The parts that unit shows can be or may not be physical location, i.e. may be located at a place, it is possible to To be distributed on multiple NE;Part or all of unit therein can be selected according to the actual needs Realize the purpose of the present embodiment scheme.
It addition, each functional unit in various embodiments of the present invention can be fully integrated in a processing unit, Can also be that each unit is individually as a unit, it is also possible to two or more unit are integrated in one In individual unit;Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds soft The form of part functional unit realizes.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can Completing with the hardware relevant by programmed instruction, aforesaid program can be stored in embodied on computer readable storage In medium, this program upon execution, performs to include the step of said method embodiment;And aforesaid storage is situated between Matter includes: movable storage device, read only memory (ROM, Read-Only Memory), magnetic disc or The various medium that can store program code such as CD.
Or, if the above-mentioned integrated unit of the embodiment of the present invention realizes with the form of SFU software functional unit and makees During for independent production marketing or use, it is also possible to be stored in a computer read/write memory medium.Base In such understanding, prior art is contributed by the technical scheme of the embodiment of the present invention the most in other words Part can embody with the form of software product, and this computer software product is stored in a storage medium In, including some instructions with so that computer equipment (can be personal computer, server or Person's network equipment etc.) perform all or part of of method described in each embodiment of the present invention.And aforesaid storage Medium includes: various Jie that can store program code such as movable storage device, ROM, magnetic disc or CD Matter.
The present invention be the queue storage space management method described in example, device only as a example by above-described embodiment, But it is not limited only to this, it will be understood by those within the art that: it still can be to foregoing embodiments Described technical scheme is modified, or the most some or all of technical characteristic is carried out equivalent; And these amendments or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technical side The scope of case.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.

Claims (13)

1. a queue storage space management method, it is characterised in that described method includes:
Creating pointer set, described pointer set includes that the message pointer field of at least one, each message pointer field are deposited Store up a message pointer;
By described pointer set, queue storage space is written and read operation.
Method the most according to claim 1, it is characterised in that the message pointer field in described pointer set it Between address separate.
The most according to claim 1, method, it is characterised in that described by described message pointer set right Queue storage space is written and read operation and includes:
By described message pointer set, queue storage space is carried out free pointer application, queue is joined the team, team List team, free pointer recovery and free pointer storage of linked list and queue linked list storage operation.
The most according to claim 3, method, it is characterised in that described by pointer set, store queue Space carries out free pointer application and includes:
Whether free pointer is also had in judging current pointer set;
When there is no free pointer in current pointer group, apply for a new free pointer group as current pointer group, And read the free pointer in current pointer group;
In current pointer group during available free pointer, read the free pointer in current pointer group.
The most according to claim 3, method, it is characterised in that described by pointer set, store queue Space carries out queue enqueue operations and includes:
The pointer joined the team by needs is filled in the free pointer in described pointer set;
When described pointer set is saturated or the pointer of joining the team of same queue waits time-out, described pointer set is carried out Queue enqueue operations.
The most according to claim 3, method, it is characterised in that described by pointer set, store queue Space carries out queue dequeue operation and includes:
By need team pointer write go out group First Input First Output in advance, by described pre-go out group First Input First Output Carry out queue dequeue operation.
The most according to claim 3, method, it is characterised in that described by pointer set, store queue Space carries out free pointer recovery and includes:
The dequeue pointer that queue dequeue operation discharges is write pointer set successively;
When described pointer set is saturated, described pointer set is carried out free pointer recovery.
8. a queue storage space managing device, it is characterised in that described device includes: pointer set creates Unit, operating unit, wherein,
Described pointer set creating unit, is used for creating pointer set, and described pointer set includes the message of at least one Pointer field, each message pointer field one message pointer of storage;
Described operating unit, for by described pointer set, is written and read operation to queue storage space.
Device the most according to claim 8, it is characterised in that described operating unit specifically for:
By described message pointer set, queue storage space is carried out free pointer application, queue is joined the team, team List team, free pointer recovery and free pointer storage of linked list and queue linked list storage operation.
Device the most according to claim 9, it is characterised in that described operating unit specifically for:
Whether free pointer is also had in judging current pointer set;
When there is no free pointer in current pointer group, apply for a new free pointer group as current pointer group, And read the free pointer in current pointer group;
In current pointer group during available free pointer, read the free pointer in current pointer group.
11. devices according to claim 9, it is characterised in that described operating unit specifically for:
The pointer joined the team by needs is filled in the free pointer in described pointer set;
When described pointer set is saturated or the pointer of joining the team of same queue waits time-out, described pointer set is carried out Queue enqueue operations.
12. devices according to claim 9, it is characterised in that described operating unit specifically for:
By need team pointer write go out group First Input First Output in advance, by described pre-go out group First Input First Output Carry out queue dequeue operation.
13. devices according to claim 9, it is characterised in that described operating unit specifically for:
The dequeue pointer that queue dequeue operation discharges is write pointer set successively;
When described pointer set is saturated, described pointer set is carried out free pointer recovery.
CN201510336880.4A 2015-06-17 2015-06-17 A kind of queue storage space management method and device Active CN106325758B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510336880.4A CN106325758B (en) 2015-06-17 2015-06-17 A kind of queue storage space management method and device
PCT/CN2016/081542 WO2016202120A1 (en) 2015-06-17 2016-05-10 Queue storage space management method and device, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510336880.4A CN106325758B (en) 2015-06-17 2015-06-17 A kind of queue storage space management method and device

Publications (2)

Publication Number Publication Date
CN106325758A true CN106325758A (en) 2017-01-11
CN106325758B CN106325758B (en) 2019-10-22

Family

ID=57545062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510336880.4A Active CN106325758B (en) 2015-06-17 2015-06-17 A kind of queue storage space management method and device

Country Status (2)

Country Link
CN (1) CN106325758B (en)
WO (1) WO2016202120A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688085A (en) * 2017-10-19 2019-04-26 中兴通讯股份有限公司 Transmission control protocol proxy method, storage medium and server
CN109697022A (en) * 2017-10-23 2019-04-30 深圳市中兴微电子技术有限公司 A kind of processing method, device and the computer readable storage medium of message descriptor PD
CN109840150A (en) * 2017-11-29 2019-06-04 北京忆芯科技有限公司 Memory allocator
CN113079113A (en) * 2021-03-30 2021-07-06 扬州万方电子技术有限责任公司 Data transmission device and data transmission system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111181874B (en) * 2018-11-09 2023-10-10 深圳市中兴微电子技术有限公司 Message processing method, device and storage medium
CN113454957B (en) * 2019-02-22 2023-04-25 华为技术有限公司 Memory management method and device
CN110532198B (en) * 2019-09-09 2023-08-08 成都西山居互动娱乐科技有限公司 Storage space allocation method and device
CN111966406B (en) * 2020-08-06 2021-03-23 北京微核芯科技有限公司 Method and device for scheduling out-of-order execution queue in out-of-order processor

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030145012A1 (en) * 2002-01-31 2003-07-31 Kurth Hugh R. Shared resource virtual queues
CN101605100A (en) * 2009-07-15 2009-12-16 华为技术有限公司 The management method in queue stores space and equipment
CN101902487A (en) * 2009-05-26 2010-12-01 中兴通讯股份有限公司 Queue scheduling method and device based on linked list

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635682B (en) * 2009-08-05 2011-12-07 中兴通讯股份有限公司 Storage management method and storage management system
CN102185770A (en) * 2011-05-05 2011-09-14 汉柏科技有限公司 Multi-core-architecture-based batch message transmitting and receiving method
CN102811176B (en) * 2012-08-28 2015-09-23 迈普通信技术股份有限公司 A kind of data flow control method and device
CN103914341B (en) * 2013-01-06 2018-09-25 中兴通讯股份有限公司 Data queue goes out group management-control method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030145012A1 (en) * 2002-01-31 2003-07-31 Kurth Hugh R. Shared resource virtual queues
CN101902487A (en) * 2009-05-26 2010-12-01 中兴通讯股份有限公司 Queue scheduling method and device based on linked list
CN101605100A (en) * 2009-07-15 2009-12-16 华为技术有限公司 The management method in queue stores space and equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688085A (en) * 2017-10-19 2019-04-26 中兴通讯股份有限公司 Transmission control protocol proxy method, storage medium and server
CN109697022A (en) * 2017-10-23 2019-04-30 深圳市中兴微电子技术有限公司 A kind of processing method, device and the computer readable storage medium of message descriptor PD
CN109697022B (en) * 2017-10-23 2022-03-04 深圳市中兴微电子技术有限公司 Method and device for processing message descriptor PD and computer readable storage medium
CN109840150A (en) * 2017-11-29 2019-06-04 北京忆芯科技有限公司 Memory allocator
CN109840150B (en) * 2017-11-29 2021-10-26 北京忆芯科技有限公司 Memory distributor
CN113079113A (en) * 2021-03-30 2021-07-06 扬州万方电子技术有限责任公司 Data transmission device and data transmission system

Also Published As

Publication number Publication date
WO2016202120A1 (en) 2016-12-22
CN106325758B (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN106325758A (en) Method and device for queue storage space management
CN104965757B (en) Method, virtual machine (vm) migration managing device and the system of live migration of virtual machine
CN103370691B (en) Managing buffer overflow conditions
CN104063293B (en) A kind of data back up method and stream calculation system
CN109558344B (en) DMA transmission method and DMA controller suitable for network transmission
CN102549552A (en) Method for processing data packets in flow-aware network nodes
CN103946803A (en) Processor with efficient work queuing
CN101799744B (en) Solid-state drive command divides into groups
TW201104439A (en) Suspension of memory operations for reduced write latency in memory arrays
CN107995129A (en) A kind of NFV message forwarding methods and device
CN108064377A (en) A kind of management method and device of multisystem shared drive
US20150347012A1 (en) System and method of interleaving data retrieved from first and second buffers
CN103562895B (en) It is easy to route by selective polymerisation adjacent data cell
CN105573711B (en) A kind of data cache method and device
CN107153620A (en) A kind of data processing method and device
WO2011015055A1 (en) Method and system for storage management
CN110380992A (en) Message processing method, device and network flow acquire equipment
WO2016019554A1 (en) Queue management method and apparatus
CN109992352A (en) Data transmission method, device, electronic equipment and read/write memory medium
CN101344861A (en) Smart card internal memory management method
CN103197962B (en) Multi-process state switching method and device
CN106254270A (en) A kind of queue management method and device
CN101877666A (en) Method and device for receiving multi-application program message based on zero copy mode
CN101594201B (en) Method for integrally filtering error data in linked queue management structure
CN107885597A (en) A kind of management method of graphics rendering resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant