CN106325758B - A kind of queue storage space management method and device - Google Patents

A kind of queue storage space management method and device Download PDF

Info

Publication number
CN106325758B
CN106325758B CN201510336880.4A CN201510336880A CN106325758B CN 106325758 B CN106325758 B CN 106325758B CN 201510336880 A CN201510336880 A CN 201510336880A CN 106325758 B CN106325758 B CN 106325758B
Authority
CN
China
Prior art keywords
pointer
queue
team
free
storage space
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.)
Active
Application number
CN201510336880.4A
Other languages
Chinese (zh)
Other versions
CN106325758A (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 present invention provides a kind of queue storage space management methods, comprising: creation pointer set, the pointer set includes the message pointer field of at least one, and each message pointer field stores a message pointer;By the pointer set, queue storage space is written and read.The present invention also provides a kind of queue storage space managing devices.

Description

A kind of queue storage space management method and device
Technical field
The present invention relates to the relevant technologies of queue management in field of communication technology more particularly to a kind of queue storage space pipes Manage method and device.
Background technique
With the rapid development of network flow, service quality (QoS, Quality of of the user to data product Service) require higher and higher, number of queues, bandwidth and the packet storage time needed support to QoS also proposed higher want It asks, this is just higher and higher to the performance requirement of queue management unit (QM, Queue Manager).
Under normal conditions, queue management includes joining the team, going out two basic operations of team.When message is joined the team, include according to message Queue number can by packet storage into corresponding queue storage space, message it is scheduled go out team when, stored from queue empty Between read the message of storage of joining the team.
For the traffic management of large capacity, typically packet storage in external memory, with stored messages External memory is increasing, how to carry out caching division to external memory and management becomes more and more important.Ordinary circumstance Under, it is to divide external memory according to fixed size, each unit is a Block block, and a Block block can be deposited Store up 512B or the message fragment of other fixed sizes.Each Block corresponds to an address pointer, is directed toward message by pointer The address of fragment storage.In order to save random access memory ram (RAM, Random Access Memory) resource, these refer to Needle is managed generally by chained list.
Existing queue management method is generally based on the queue management method of chained list.Since number of addresses is very more, lead to A RAM is often needed to store.Queue is every to dispatch out one message of team, the head pointer for refreshing this queue is required, first from RAM The address of the middle next message for reading queue, is then updated to queue head pointer for the address of next message again.Here, by It is bigger in the read latency of RAM, therefore the refreshing of head pointer needs many clock cycle, and refresh completion in head pointer Before, queue cannot send next message, this just seriously affects the speed for going out team's message of queue.
Since current queue storage space is all bigger, so link table information is typically all 4 multiples being stored in outside piece According to ratio (QDR, Quad Data Rate) memory the inside or 2 haplotype data ratios (DDR, Double Data Rate) storage In device, the read-write delay of QDR has or so 8 clock cycle, and the read-write delay of DDR is bigger, and excessively high read-write delay greatly limits The promotion of queue management performance is made
Summary of the invention
In view of this, solving external storage an embodiment of the present invention is intended to provide a kind of queue storage space management method Device height reads and writes delay issue.
In order to achieve the above objectives, the technical scheme of the present invention is realized as follows:
The embodiment of the invention provides a kind of queue storage space management methods, which comprises
Pointer set is created, the pointer set includes the message pointer field of at least one, and each message pointer field stores one Message pointer;
By the pointer set, queue storage space is written and read.
In above scheme, address is mutually indepedent between the message pointer field in the pointer set.
It is described by the message pointer set in above scheme, queue storage space is written and read includes:
By the message pointer set, to queue storage space carry out free pointer application, queue is joined the team, queue goes out team, Free pointer recycling and free pointer storage of linked list and queue linked list storage operation.
In above scheme, described by pointer set, carrying out free pointer application to queue storage space includes:
Judge whether there are also free pointers in current pointer set;
When not having free pointer in current pointer group, one new free pointer group of application is read as current pointer group Take the free pointer in current pointer group;
In current pointer group when available free pointer, the free pointer in current pointer group is read.
In above scheme, described by pointer set, carrying out queue enqueue operations to queue storage space includes:
The pointer joined the team will be needed to be filled into the free pointer in the pointer set;
When pointer set saturation or the pointer waiting time-out of joining the team of same queue, pointer set progress queue is entered Team's operation.
In above scheme, described by pointer set, carrying out queue dequeue operation to queue storage space includes:
Go out team's First Input First Output in advance for needing the pointer of team to be out written, pre- team's First Input First Output out is subjected to team Column dequeue operation.
In above scheme, described by pointer set, carrying out free pointer recycling to queue storage space includes:
The dequeue pointer that queue dequeue operation discharges is sequentially written in pointer set;
When pointer set saturation, the pointer set is subjected to free pointer recycling.
The embodiment of the invention also provides a kind of queue storage space managing device, described device includes: pointer set creation Unit, operating unit, wherein
The pointer set creating unit, for creating pointer set, the pointer set includes the message pointer field of at least one, Each message pointer field stores a message pointer;
The operating unit, for being written and read to queue storage space by the pointer set.
In above scheme, the operating unit is specifically used for:
By the message pointer set, to queue storage space carry out free pointer application, queue is joined the team, queue goes out team, Free pointer recycling and free pointer storage of linked list and queue linked list storage operation.
In above scheme, the operating unit is specifically used for:
Judge whether there are also free pointers in current pointer set;
When not having free pointer in current pointer group, one new free pointer group of application is read as current pointer group Take the free pointer in current pointer group;
In current pointer group when available free pointer, the free pointer in current pointer group is read.
In above scheme, the operating unit is specifically used for:
The pointer joined the team will be needed to be filled into the free pointer in the pointer set;
When pointer set saturation or the pointer waiting time-out of joining the team of same queue, pointer set progress queue is entered Team's operation.
In above scheme, the operating unit is specifically used for:
Go out team's First Input First Output in advance for needing the pointer of team to be out written, pre- team's First Input First Output out is subjected to team Column dequeue operation.
In above scheme, the operating unit is specifically used for:
The dequeue pointer that queue dequeue operation discharges is sequentially written in pointer set;
When pointer set saturation, the pointer set is subjected to free pointer recycling.
Queue storage space management method and device provided by the embodiment of the present invention first create pointer set, the pointer Group includes the message pointer field of at least one, and each message pointer field stores a message pointer;It is right again by the pointer set Queue storage space is written and read.In this way, when being joined the team to queue storage space, going out team and free pointer management, Primary access external memory obtains that N message pointer can be obtained, for being used for multiple times, so as to reduce to external memory Access times, solve external memory height read-write delay issue, improve the process performance of queue management unit, save The read-write number of external memory, reduces power consumption.
Detailed description of the invention
Fig. 1 is pointer set of embodiment of the present invention structural schematic diagram;
Fig. 2 is queue storage space of embodiment of the present invention management method flow diagram;
Fig. 3 is free pointer of embodiment of the present invention chained list link structure schematic diagram;
Fig. 4 is queue linked list of embodiment of the present invention link structure schematic diagram;
Fig. 5 is that the embodiment of the present invention carries out free pointer application method flow diagram 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 queue of the embodiment of the present invention goes out team's method flow schematic diagram in advance;
Fig. 9 is that the embodiment of the present invention carries out free pointer recovery method flow diagram to queue storage space;
Figure 10 is dequeue pointer of embodiment of the present invention joining method schematic diagram;
Figure 11 is queue storage space of embodiment of the present invention managing device structural schematic diagram.
Specific embodiment
In embodiments of the present invention, pointer set is first created, wherein the pointer set includes the message pointer of at least one Domain, each message pointer field store a message pointer;Again by the pointer set, behaviour is written and read to queue storage space Make.
In the embodiment of the present invention, the pointer set structural schematic diagram is as shown in Figure 1, carrying out queue storage space management When, it is managed without using the true pointer of message, is managed using pointer set, pointer set is not as actual packet storage Pointer is intended only as the address of stored messages pointer.The pointer of packet storage is sequentially stored in pointer set according to sequence of joining the team Inside message pointer field.
Specifically, the quantity for the message pointer field for including in the pointer set is determined when creating pointer set, refer to passing through Message pointer field invariable number when needle group is written and read queue storage space, in the pointer set.
In the embodiment of the present invention, a pointer set may include N number of message pointer field, store N number of actual message description Symbol, message descriptor include the practical pointer of message, memory bank information etc., between N number of actual message pointer domain addresses Independently of each other, without any address information relationship.Joined the team to queue storage space and out team's write operation when, be with pointer set Unit, it is primary to read or be written a pointer set;Since pointer set includes multiple actual packet descriptors, corresponding N number of reality Message pointer once access external storage therefore when being joined the team to queue storage space, going out team and free pointer and manage Device obtains that N message pointer can be obtained, for being used for multiple times, so as to reduce the access times to external memory.
With reference to the accompanying drawing and specific embodiment, the queue storage space management method described in the embodiment of the present invention carry out into One step is described in detail, and Fig. 2 is queue storage space of embodiment of the present invention management method flow diagram, as shown in Figure 2 the present invention Queue storage space management method described in embodiment the following steps are included:
Step 201: creation pointer set;
Wherein, the pointer set includes the message pointer field of at least one, and each message pointer field stores a message and refers to Needle;Address is mutually indepedent between message pointer field in the pointer set, and address information relationship is not present.
Specifically, the content inside pointer set is entirely free pointer when carrying out pointer set initialization for the first time, press According to sequentially being initialized, pointer set after repeatedly going out team's recycling, all upset, real by the practical pointer of pointer set storage No longer there is incidence relation between pointer in the pointer field of border.
Step 202: by the pointer set, queue storage space being written and read;
Wherein, by the message pointer set, free pointer application is carried out to queue storage space, queue is joined the team, queue Team, free pointer recycling and free pointer storage of linked list and queue linked list storage operation out.
In the embodiment of the present invention, it is described to queue storage space carry out free pointer storage of linked list when, free pointer chained list It is linked by pointer set, a pointer set stores N number of actual free pointer, does not have between these actual free pointers Any relationship, pointer set are intended only as storing the address of practical free pointer.The virtual mouse end to end of free pointer chained list stores In the chip, free pointer chained list head node, tail node and intermediate node are stored in external memory.Each pointer set There is N number of actual free pointer, free pointer chained list link structure schematic diagram is as shown in Figure 3.
In the embodiment of the present invention, it is described to queue storage space carry out queue linked list storage operation when, the finger based on queue Needle chained list is also linked using pointer set, and Fig. 4 is queue linked list of embodiment of the present invention link structure schematic diagram;Each queue There is virtual linked list independent, a pointer set stores N number of actual queue pointer, and pointer set is intended only as storing practical team The address of column pointer;The virtual mouse end to end of quene state table stores in the chip, queue linked list head node, tail node and centre Node is stored in external memory.Each queue linked list has independent non-null states information, and storage in the chip, is used to Indicate quene state whether non-empty, only non-empty just carries out quene state update.
In the embodiment of the present invention, described by pointer set, carrying out free pointer application to queue storage space includes: judgement Whether there are also free pointers in current pointer set;When not having free pointer in current pointer group, one new free time of application refers to Needle group reads the free pointer in current pointer group as current pointer group;In current pointer group when available free pointer, read Free pointer in current pointer group.
Fig. 5 is that the embodiment of the present invention carries out free pointer application method flow diagram to queue storage space, such as Fig. 5 institute Show, in the embodiment of the present invention, it is described to queue storage space carry out free pointer application the following steps are included:
Step A1: free pointer application request is received;
Step A2: judge whether there are also free pointers in current pointer set;When there is no free pointer in current pointer group, Execute step A3;Otherwise, step A4 is executed;
Step A3: one new free pointer group of application executes step A4 as current pointer group;
When there is no free pointer in current pointer group, i.e., when current virtual mouse exhausts, then apply for a new free time Pointer set re-initiates as current pointer group and reads free virtual pointer First Input First Output FIFO;Specifically, once from outside A pointer set needle is read in memory, updates head pointer headptr using next pointer set nextptr, N number of reality is arrived in application Free pointer is stored in First Input First Output, in case the practical use of joining the team of queue.
Step A4: the free pointer in current pointer group is read.
Specifically, there are also when free pointer in current pointer set, i.e. current pointer group does not exhaust, then in this step Using remaining free pointer in current virtual pointer, carries out idle chained list and update operation;Head using current pointer set refers to Needle reads external memory, the content of acquisition current pointer group and next pointer set nextptr, uses the nextptr of pointer set Idle queues state meter pointer headptr is updated, N number of practical free pointer inside the current pointer group of reading is stored in pointer In group FIFO, as the practical use of joining the team of queue.When power-up initializing, First Input First Output FIFO is sky, is carried out always empty The update of quasi- free pointer, fills out and will expire until by free pointer first in, first out FIFO.
In the embodiment of the present invention, described by pointer set, including: to queue storage space progress queue enqueue operations need to The pointer to be joined the team is filled into the free pointer in the pointer set;When pointer set saturation or same queue are joined the team Pointer waits time-out, and the 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, such as Fig. 6 institute Show, in the embodiment of the present invention, it is described to queue storage space carry out queue enqueue operations the following steps are included:
Step B1: pointer of joining the team is received;
Step B2: the pointer joined the team will be needed to be filled into the free pointer in the pointer set;
In this step, the pointer of joining the team an of queue, the actual pointer of joining the team of storage can only be stored in a pointer set Between be ranked up according to the sequence that queue is joined the team, be sequentially unable to entanglement, otherwise will lead to packet out-ordering.
Step B3: judge whether current pointer group is saturated;When current pointer group is not saturated, step B4 is executed;Otherwise, Execute step B6;
Step B4: the pointer of joining the team of same queue is continued waiting for;
Step B5: judge whether the pointer of joining the team of same queue waits time-out;Surpass when the pointer of joining the team of same queue waits When, execute step B6;When the pointer of joining the team of same queue is without waiting for time-out, that is, receive same queue join the team pointer when, Return step B1;
In step B3-B5, after the pointer message of joining the team for receiving message enters, whether also current empty pointer is judged Free pointer domain is available, if there is then carrying out pointer set splicing of joining the team, then judges whether the pointer field of current pointer group is saturated, If be not saturated, the pointer of next same queue is continued waiting for;In preset time, if do not received next identical The pointer of queue, then it is assumed that until time-out, if reaching Timeout conditions, even if pointer set does not splice saturation, also to carry out strong System is joined the team, while the pointer number in record pointer group.
Step B6: the pointer set is initiated into queue enqueue operations;
Step B7: the practical pointer and next pointer set nextptr of present node chained list are updated;
Step B8: external memory is write by the pointer set;
Step B9: updating pointer set of currently joining the team is tail pointer tailptr;
Step B10: quene state table is updated;
Wherein, during pointer set being carried out queue enqueue operations described in step B6-B10, the tail of quene state is used Pointer tailptr writes external memory as address, while updating the tailptr pointer that the nextptr to join the team is current queue.
In the embodiment of the present invention, when pointer set is joined the team, the current pointer group joined the team is used to write outside as address Memory, updates the practical pointer and next pointer set nextptr of present node chained list, and each queue carries out pointer joining the team It requires to prefetch 2 pointer sets when group splicing, when current pointer is joined the team, it is desirable to provide next pointer set, in this way The benefit done is can to reduce the reading for the chained list being once stored in external memory, and chained list updates while updating void of currently joining the team Quasi- pointer is the tail pointer tailptr of current queue.The non-null states for updating virtual queue state table simultaneously are non-empty.
In the embodiment of the present invention, described by pointer set, including: to queue storage space progress queue dequeue operation need to The pointer composition pointer set for going out team, carries out queue dequeue operation for the pointer set.
Fig. 7 is that the embodiment of the present invention carries out queue dequeue operation method flow schematic diagram to queue storage space, such as Fig. 7 institute Show, in the embodiment of the present invention, it is described to queue storage space carry out queue dequeue operation the following steps are included:
Step C1: go out team's First Input First Output in advance for needing the pointer of team to be out written;
In the embodiment of the present invention, in pre- dequeue process, carries out going out team's processing in advance for the first time as needed, the finger of team out will be needed Needle write-in goes out team's First Input First Output in advance;Fig. 8 goes out team's method flow schematic diagram for queue of the embodiment of the present invention in advance, as shown in figure 8, It includes the next steps:
Step D1: it determines and starts pre- dequeue process;
Step D2: judge that whether quene state table status becomes into non-empty;When quene state table status is not non-empty, i.e. team Column-shaped state is sky, thens follow the steps D3;Otherwise, step D4 is executed;
In this step, when quene state table status becomes non-empty, and message descriptor (PD, Pack Descriptor when) First Input First Output FIFO does not write full, that is, it can reach queue Queue and go out team's condition in advance.
Step D3: process of joining the team is waited, and after message pointer is joined the team, return step D1;
In this step, when quene state is empty, dequeue operation can not be carried out.
Step D4: according to queue head pointer's headptr reading external memory;
Step D5: the data that external memory returns are received;
Step D6: quene state table is updated;
In step D4-D6, according to each queue Queue head pointer headptr, external memory is read out, is obtained Current N number of actual dequeue pointer;
Step D7: PD/ unit descriptor (CD, Cell Descriptor) First Input First Output is written into message pointer In FIFO;
In this step, if belonging to message owner pointer, write-in goes out in team PD FIFO in advance, if belonging to message body pointer, Write-in goes out in team CD FIFO in advance;The virtual head pointer that next pointer set nextptr is current queue is updated simultaneously.
Step D8: the head pointer that next pointer set nextptr is current queue is updated;
In this way, completing the pre- dequeue process of queue;
Step C2: pre- team's First Input First Output out is subjected to queue dequeue operation;
When going out team PD FIFO non-empty in advance, is then dispatched out after going out team PD FIFO in advance, initiated real according to quene state Go out team request.During queue dequeue operation, based on team PD FIFO is gone out in advance, message owner pointer is got, if there are also report Tattoo information then continues to read in advance team CD FIFO out, obtains all pointers of queue.The splicing recycling for carrying out pointer simultaneously, from Real message is read in external memory.
In the embodiment of the present invention, it is described by pointer set, free pointer reclaimer operation packet is carried out to queue storage space It includes: the free pointer that queue dequeue operation discharges is sequentially written in pointer set;When pointer set saturation, by the pointer set Carry out free pointer recycling.
Fig. 9 is that the embodiment of the present invention carries out free pointer recovery method flow diagram to queue storage space, such as Fig. 9 institute Show, in the embodiment of the present invention, it is described to queue storage space carry out free pointer recycling the following steps are included:
Step E1: the dequeue pointer that queue dequeue operation discharges is sequentially written in pointer set;
Step E2: judge whether the pointer set is saturated;When pointer set saturation, step E4 is executed, otherwise, is executed Step E3;
Step E3: dequeue pointer is waited;And return step E1;
In step E1-E3, each Queue is gone out to the practical dequeue pointer of team's release, is sequentially written in pointer set to be recycled Each domain is just really recycled after spelling completely;Figure 10 is dequeue pointer of embodiment of the present invention joining method schematic diagram, is such as schemed Shown in 10, q0, q1, q2 respectively indicate different queues, and ptrA, ptrB, ptrC respectively indicate different pointers, go out team in queue During the dequeue pointer of operation release is sequentially written in pointer set, queue is not distinguished, any queue dequeue pointer is all It is spliced to inside a pointer set, therefore there is no any relevance between the practical pointer inside pointer set, in this way, can be timely Recycle free pointer, without based on queue etc. it is to be spliced.
Step E4: free pointer recycling is carried out;
Step E5: pass through the tail pointer tailptr reading external memory of idle queues state;
Step E6: next pointer set domain of external memory is write by the pointer set;
Step E7: state table tail pointer tailptr is updated by the pointer set;
In step E4-E7, when the pointer of team is a full pointer set out, real pointer recycling is just carried out.
In the embodiment of the present invention, the First Input First Output FIFO for team's pointer to be released is needed to store practical pointer The pre- pointer set to be released that team generates out;Because of not any free pointer of virtual mouse itself, pointer set release It can't be recycled, after needing to wait out the pointer of team to discharge, the two, which is associated, just can really be recycled.Dequeue pointer After spelling a full pointer set, a pointer set is read from the pointer set First Input First Output FIFO to be released of team out and is recycled; In removal process, reading external memory is removed using the tail pointer tailptr of idle queues state table first, current tail is obtained and refers to Then the content of pin knot point is written back to pointer set to be recycled the domain next pointer set nextptr of current tail pointer group, The update of free virtual chained list is completed, the domain tail pointer tailptr of quene state table is then updated with pointer set to be recycled, So far, pointer recycling movement is fully completed.
The embodiment of the invention also provides a kind of queue storage space managing device, Figure 11 is that queue of the embodiment of the present invention is deposited Space management apparatus structure schematic diagram is stored up, as shown in figure 11, queue storage space managing device of the embodiment of the present invention includes: pointer Group creating unit 111, operating unit 112, wherein
The pointer set creating unit 111, for creating pointer set, the pointer set includes the message pointer of at least one Domain, each message pointer field store a message pointer;
In the embodiment of the present invention, address is mutually indepedent between the message pointer field in the pointer set, and there is no addresses to close Connection relationship.
Specifically, the content inside pointer set is entirely free pointer when carrying out pointer set initialization for the first time, press According to sequentially being initialized, pointer set after repeatedly going out team's recycling, all upset, real by the practical pointer of pointer set storage No longer there is incidence relation between pointer in the pointer field of border.
The operating unit 112, for being written and read to queue storage space by the pointer set;
Wherein, the operating unit 112 is specifically used for: by the message pointer set, carrying out to queue storage space empty Not busy pointer application, queue are joined the team, queue goes out team, free pointer recycling and free pointer storage of linked list and queue linked list storage behaviour Make.
It is empty when the operating unit 112 carries out free pointer storage of linked list to queue storage space in the embodiment of the present invention Not busy pointer chained list is linked by pointer set, and a pointer set stores N number of actual free pointer, these actual free time refer to There is no any relationship between needle, pointer set is intended only as storing the address of practical free pointer.The void end to end of free pointer chained list In the chip, free pointer chained list head node, tail node and intermediate node are stored in external memory for quasi- pointer storage.Often A pointer set all has N number of actual free pointer.
In the embodiment of the present invention, when the operating unit 112 carries out queue linked list storage operation to queue storage space, base It is also linked using pointer set in the pointer chained list of queue, each queue has virtual linked list independent, a pointer Group stores N number of actual queue pointer, and pointer set is intended only as the address of storage actual arrays pointer;Quene state table is end to end Virtual mouse stores in the chip, and queue linked list head node, tail node and intermediate node are stored in external memory.Each Queue linked list has independent non-null states information, storage in the chip, be used to refer to quene state whether non-empty, only non-empty Just carry out quene state update.
Whether in the embodiment of the present invention, the operating unit 112 is specifically used for: judging also available free in current pointer set Pointer;When not having free pointer in current pointer group, one new free pointer group of application reads and works as current pointer group Free pointer in prior pointer group;In current pointer group when available free pointer, the free pointer in current pointer group is read.
Specifically, when that is, current virtual mouse exhausts, then the operation is single when not having free pointer in current pointer group Member 112 applies for that a new free pointer group as current pointer group, re-initiates and reads free virtual pointer First Input First Output FIFO;Specifically, the operating unit 112 once reads a pointer set needle from external memory, next pointer set is used Nextptr updates head pointer headptr, and application is into N number of practical free pointer deposit First Input First Output, in case queue is practical It joins the team use.
There are also when free pointer in current pointer set, i.e. current pointer group does not exhaust, then the operating unit 112 makes With free pointer remaining in current virtual pointer, carries out idle chained list and update operation;Use the head pointer of current pointer set Read external memory, obtain current pointer group content and next pointer set nextptr, using pointer set nextptr more New idle queues state meter pointer headptr, N number of practical free pointer deposit pointer set inside the current pointer group of reading In FIFO, as the practical use of joining the team of queue.When power-up initializing, First Input First Output FIFO is sky, is carried out always virtual The update of free pointer is filled out and will be expired until by free pointer first in, first out FIFO.
In the embodiment of the present invention, the operating unit 112 is specifically used for: the pointer joined the team will be needed to be filled into the pointer In free pointer in group;When the pointer set saturation or same queue join the team pointer wait time-out, by the pointer set into Row queue enqueue operations.
In the embodiment of the present invention, the pointer of joining the team an of queue can only be stored in a pointer set, storage it is actual enter It is ranked up between team's pointer according to the sequence that queue is joined the team, is sequentially unable to entanglement, otherwise will lead to packet out-ordering.
In step B3-B5, after the pointer message of joining the team for receiving message enters, the judgement of operating unit 112 is worked as Whether there are also free pointer domains can be used for preceding void pointer, if there is then carrying out pointer set splicing of joining the team, then judges current pointer group Pointer field whether be saturated, if be not saturated, continue waiting for the pointer of next same queue;In preset time, if The pointer of next same queue is not received, then it is assumed that until time-out, if reaching Timeout conditions, even if pointer set is not spelled Saturation is connect, also to carry out forcing to join the team, while the pointer number in record pointer group.
During pointer set is carried out queue enqueue operations, use the tail pointer tailptr of quene state as ground External memory is write in location, while updating the tailptr pointer that the nextptr to join the team is current queue.
In the embodiment of the present invention, the operating unit 112 is specifically used for: the pointer for needing team out write-in being gone out team in advance and is first entered Pre- team's First Input First Output out is carried out queue dequeue operation by first dequeue.
Specifically, when quene state table status becomes non-empty, and when PD First Input First Output FIFO does not write full It waits, that is, can reach queue Queue and go out team's condition in advance.
When going out team PD FIFO non-empty in advance, is then dispatched out after going out team PD FIFO in advance, initiated real according to quene state Go out team request.During queue dequeue operation, based on team PD FIFO is gone out in advance, message owner pointer is got, if there are also report Tattoo information then continues to read in advance team CD FIFO out, obtains all pointers of queue.The splicing recycling for carrying out pointer simultaneously, from Real message is read in external memory.
Operating unit 112 described in the embodiment of the present invention is specifically used for: the dequeue pointer that queue dequeue operation is discharged according to Secondary write-in pointer set;When pointer set saturation, the pointer set is subjected to free pointer recycling.
Specifically, each Queue is gone out the practical dequeue pointer of team's release by the operating unit 112, it is sequentially written in wait return The each domain of the pointer set of receipts is just really recycled after spelling completely;It is successively write in the dequeue pointer of queue dequeue operation release During entering pointer set, queue is not distinguished, any queue dequeue pointer is all spliced to inside a pointer set, therefore There is no any relevance between practical pointer inside pointer set, in this way, free pointer can be recycled in time, does not have to be based on queue Etc. it is to be spliced.
In the embodiment of the present invention, the First Input First Output FIFO for team's pointer to be released is needed to store practical pointer The pre- pointer set to be released that team generates out;Because of not any free pointer of virtual mouse itself, pointer set release It can't be recycled, after needing to wait out the pointer of team to discharge, the two, which is associated, just can really be recycled.Dequeue pointer After spelling a full pointer set, a pointer set is read from the pointer set First Input First Output FIFO to be released of team out and is recycled; In removal process, reading external memory is removed using the tail pointer tailptr of idle queues state table first, current tail is obtained and refers to Then the content of pin knot point is written back to pointer set to be recycled the domain next pointer set nextptr of current tail pointer group, The update of free virtual chained list is completed, the domain tail pointer tailptr of quene state table is then updated with pointer set to be recycled, So far, pointer recycling movement is fully completed.
The realization function that unit is managed everywhere in queue storage space managing device shown in Figure 11, can refer to aforementioned team The associated description of column memory space management and understand.It will be appreciated by those skilled in the art that queue shown in Figure 11 stores The function of each processing unit can be realized and running on the program on processor in space management device, can also be by specific Logic circuit and realize, such as: can by central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or Field programmable gate array (FPGA) is realized.
In several embodiments provided by the present invention, it should be understood that disclosed method, apparatus and system, it can be with It realizes in other way.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, Only a kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can be tied It closes, or is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed each group It can be through some interfaces at the mutual communication connection in part, the indirect coupling or communication connection of equipment or unit can To be electrical, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member, which can be or may not be, to be physically separated, aobvious as unit The component shown can be or may not be physical unit, it can and it is in one place, it may be distributed over multiple network lists In member;Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated in one processing unit, it can also To be each unit individually as a unit, can also be integrated in one unit with two or more units;It is above-mentioned Integrated unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, which exists When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: movable storage device, read-only deposits The various media that can store program code such as reservoir (ROM, Read-Only Memory), magnetic or disk.
Alternatively, if the above-mentioned integrated unit of the embodiment of the present invention is realized in the form of SFU software functional unit and as independence Product when selling or using, also can store in a computer readable storage medium.Based on this understanding, this hair Substantially the part that contributes to existing technology can body in the form of software products in other words for the technical solution of bright embodiment Reveal and, which is stored in a storage medium, including some instructions are with so that a computer is set Standby (can be personal computer, server or network equipment etc.) executes the whole of each embodiment the method for the present invention Or part.And storage medium above-mentioned includes: that movable storage device, ROM, magnetic or disk etc. are various can store program generation The medium of code.
The present invention is the queue storage space management method recorded in example, device by taking above-described embodiment as an example, but not It is only limitted to this, those skilled in the art should understand that: it still can be to technical side documented by foregoing embodiments Case is modified, or equivalent substitution of some or all of the technical features;And these are modified or replaceed, not The essence of corresponding technical solution is set to depart from the scope of the technical solutions of the embodiments of the present invention.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.

Claims (12)

1. a kind of queue storage space management method, which is characterized in that the described method includes:
Create pointer set, the pointer set includes the message pointer field of at least one, the message pointer field in the pointer set it Between address it is mutually indepedent, each message pointer field stores a message pointer;
By the pointer set, queue storage space is written and read.
2. method according to claim 1, which is characterized in that it is described by the message pointer set, to queue storage space It is written and read and includes:
By the message pointer set, to queue storage space progress free pointer application, queue is joined the team, queue goes out team, the free time Pointer recycling and free pointer storage of linked list and queue linked list storage operation.
3. method according to claim 2, which is characterized in that it is described by pointer set, queue storage space is carried out idle Pointer application includes:
Judge whether there are also free pointers in current pointer set;
When not having free pointer in current pointer group, one new free pointer group of application reads and works as current pointer group Free pointer in prior pointer group;
In current pointer group when available free pointer, the free pointer in current pointer group is read.
4. method according to claim 2, which is characterized in that it is described by pointer set, queue is carried out to queue storage space Enqueue operations include:
The pointer joined the team will be needed to be filled into the free pointer in the pointer set;
When the pointer of joining the team of pointer set saturation or same queue waits time-out, pointer set progress queue is joined the team behaviour Make.
5. method according to claim 2, which is characterized in that it is described by pointer set, queue is carried out to queue storage space Dequeue operation includes:
Go out team's First Input First Output in advance for needing the pointer of team to be out written, pre- team's First Input First Output out is subjected to queue and is gone out Team's operation.
6. method according to claim 2, which is characterized in that it is described by pointer set, queue storage space is carried out idle Pointer recycles
The dequeue pointer that queue dequeue operation discharges is sequentially written in pointer set;
When pointer set saturation, the pointer set is subjected to free pointer recycling.
7. a kind of queue storage space managing device, which is characterized in that described device includes: pointer set creating unit, operation list Member, wherein
The pointer set creating unit, for creating pointer set, the pointer set includes the message pointer field of at least one, described Address is mutually indepedent between message pointer field in pointer set, and each message pointer field stores a message pointer;
The operating unit, for being written and read to queue storage space by the pointer set.
8. device according to claim 7, which is characterized in that the operating unit is specifically used for:
By the message pointer set, to queue storage space progress free pointer application, queue is joined the team, queue goes out team, the free time Pointer recycling and free pointer storage of linked list and queue linked list storage operation.
9. device according to claim 8, which is characterized in that the operating unit is specifically used for:
Judge whether there are also free pointers in current pointer set;
When not having free pointer in current pointer group, one new free pointer group of application reads and works as current pointer group Free pointer in prior pointer group;
In current pointer group when available free pointer, the free pointer in current pointer group is read.
10. device according to claim 8, which is characterized in that the operating unit is specifically used for:
The pointer joined the team will be needed to be filled into the free pointer in the pointer set;
When the pointer of joining the team of pointer set saturation or same queue waits time-out, pointer set progress queue is joined the team behaviour Make.
11. device according to claim 8, which is characterized in that the operating unit is specifically used for:
Go out team's First Input First Output in advance for needing the pointer of team to be out written, pre- team's First Input First Output out is subjected to queue and is gone out Team's operation.
12. device according to claim 8, which is characterized in that the operating unit is specifically used for:
The dequeue pointer that queue dequeue operation discharges is sequentially written in pointer set;
When pointer set saturation, the pointer set is subjected to free pointer recycling.
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 CN106325758A (en) 2017-01-11
CN106325758B true 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)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688085B (en) * 2017-10-19 2021-11-02 中兴通讯股份有限公司 Transmission control protocol proxy method, storage medium and server
CN109697022B (en) * 2017-10-23 2022-03-04 深圳市中兴微电子技术有限公司 Method and device for processing message descriptor PD and computer readable storage medium
CN113835898B (en) * 2017-11-29 2024-03-01 北京忆芯科技有限公司 Memory distributor
CN111181874B (en) * 2018-11-09 2023-10-10 深圳市中兴微电子技术有限公司 Message processing method, device and storage medium
JP7241194B2 (en) 2019-02-22 2023-03-16 華為技術有限公司 MEMORY MANAGEMENT METHOD AND APPARATUS
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
CN113079113B (en) * 2021-03-30 2022-03-15 扬州万方电子技术有限责任公司 Data transmission device and data transmission system
CN117908968A (en) * 2022-10-11 2024-04-19 深圳市中兴微电子技术有限公司 Instruction sending method, device, equipment and medium based on compression type transmission queue

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (5)

* 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
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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN106325758A (en) 2017-01-11
WO2016202120A1 (en) 2016-12-22

Similar Documents

Publication Publication Date Title
CN106325758B (en) A kind of queue storage space management method and device
CN104965757B (en) Method, virtual machine (vm) migration managing device and the system of live migration of virtual machine
CN102437929B (en) Method and device for de-queuing data in queue manager
CN109558344B (en) DMA transmission method and DMA controller suitable for network transmission
CN103049317B (en) Based on the high concurrent data no write de-lay system and method for queue under cloud environment
CN106537858B (en) A kind of method and apparatus of queue management
CN112422453A (en) Message processing method, device, medium and equipment
CN110109626B (en) NVMe SSD command processing method based on FPGA
CN103019810A (en) Scheduling and management of compute tasks with different execution priority levels
US9690713B1 (en) Systems and methods for effectively interacting with a flash memory
CN105573711B (en) A kind of data cache method and device
CN108064377A (en) A kind of management method and device of multisystem shared drive
CN109564502B (en) Processing method and device applied to access request in storage device
CN103150278A (en) Submission method of descriptor of network interface card (NIC) based on mixing of PIO (process input output) and DMA (direct memory access)
CN108572970A (en) A kind of processing method and distributed processing system(DPS) of structural data
CN109992352A (en) Data transmission method, device, electronic equipment and read/write memory medium
WO2024046188A1 (en) I/o unloading method and system in cloud environment, device, and storage medium
CN114827048B (en) Dynamic configurable high-performance queue scheduling method, system, processor and protocol
CN106254270A (en) A kind of queue management method and device
CN110324204A (en) A kind of high speed regular expression matching engine realized in FPGA and method
CN101848150B (en) Method and device for maintaining count value of multicast counter
CN101594201A (en) The method of integrally filtering error data in linked queue management structure
CN109857553A (en) EMS memory management process and device
WO2024027140A1 (en) Data processing method and apparatus, and device, system and readable storage medium
TWI235921B (en) System and method for effectively performing physical direct memory access operations

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