Nothing Special   »   [go: up one dir, main page]

CN1901548A - Buffer zone managing method - Google Patents

Buffer zone managing method Download PDF

Info

Publication number
CN1901548A
CN1901548A CNA2006101036379A CN200610103637A CN1901548A CN 1901548 A CN1901548 A CN 1901548A CN A2006101036379 A CNA2006101036379 A CN A2006101036379A CN 200610103637 A CN200610103637 A CN 200610103637A CN 1901548 A CN1901548 A CN 1901548A
Authority
CN
China
Prior art keywords
buffering area
data
buffer management
buffering
buffer
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
CNA2006101036379A
Other languages
Chinese (zh)
Other versions
CN1901548B (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN200610103637A priority Critical patent/CN1901548B/en
Publication of CN1901548A publication Critical patent/CN1901548A/en
Application granted granted Critical
Publication of CN1901548B publication Critical patent/CN1901548B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

This invention discloses a buffer region management method including: setting multiple buffer regions and a data list indicating and identifying said buffer regions, in which, when a first region satisfies the first process conditiuon, it picks up the data in it and revises said data list and renovates said buffer region, which can organize multiple buffer regions and use them to avoid the shortcoming that there aretoo big or too many buffer regions to give attention to the integrality and process efficiency to data.

Description

Buffer management method
Technical field
The present invention relates to a kind of management method of data buffer zone.
Background technology
In data transmission procedure, because pretreated needs before the transfer of data, and the reasons such as difference of the data transmission capabilities of physical layer and the above application layer of physical layer, using buffering area to be used for temporal data in data transmission set or in data transmission method almost becomes inevitable.
Usually, when the storage resources abundance of data transmission system, often only considering that bigger buffering area is set is used for temporal data, when buffering area is managed, also only is to take out data processing when buffering area is full, refreshes buffering area then.The way to manage of so simple buffering area is difficult to guarantee the effective utilization to buffering area.For example, deal with data when buffering area is full only, may be owing to data processing equipment busy or related device fault cause deal with data in time, cause buffering area to overflow and lose owing to data; When the excessive and data volume of buffer pool size more after a little while, also can cause the utilization ratio of buffer unit to descend or data processing slow.As seen, existing buffer management method is difficult to effectively utilize buffering area to be the data processing service
The invention scheme
The technical problem to be solved in the present invention is, a kind of buffer management method that can effectively utilize the data buffer zone is provided.
Buffer management method provided by the invention comprises:
The tables of data that a plurality of buffering areas is set and is provided for indicating and identifying described buffering area;
When a buffering area satisfies first treatment conditions, take out data processing wherein, and revise described tables of data and refresh described buffering area.
Wherein, described a plurality of buffering area is set to the buffer circle formation.
Described treatment conditions are time conditions and/or status condition and/or characteristic condition.
Described method also comprises, judges that whether current buffering area satisfies second treatment conditions, if satisfy, changes described data buffer zone.
When the state of whole buffering areas when banning use of, increase new buffering area and go into the buffering area formation.
When the unused time of a buffering area surpasses specified threshold value, delete described buffering area.
When the number of freebuf during, increase new buffering area and go into the buffering area formation less than preset threshold value.
Buffer management device provided by the invention comprises:
The buffering area processing unit is used to the tables of data that buffering area is set and is provided for indicating and identifies described buffering area;
The buffer management unit is used to judge whether described buffering area satisfies treatment conditions, and when a buffering area satisfied treatment conditions, the data of taking out were wherein issued system handles, and revise described tables of data and refresh described buffering area.
Described device also comprises, is used for increasing new buffering area under certain condition and goes into buffering area formation first updating block.
Described device also comprises, deletes second updating block of described buffering area when the unused time of a buffering area surpasses specified threshold value.
Because the present invention adopts multiple buffer and is provided for indicating and identifies the scheme that the tables of data of described buffering area is managed described data buffer zone, a plurality of buffering areas can be organized coordination to use, for example tissue becomes the formation use, can avoid the excessive or too much drawback of buffering area buffer memory, also can make things convenient for the use of buffering area; And, the data processing of buffering area of the present invention is to start the foundation of handling with treatment conditions, have only when a buffering area satisfies treatment conditions, take out data processing wherein, so just can take into account the integrality and the treatment effeciency of data simultaneously, promptly avoid data and lose, by the requirement that can satisfy treatment effeciency because overflow.
In addition, being used in combination of multiple condition, and the dynamic increase and the minimizing of described buffering area can also cause the raising of system memory unit utilance.
Description of drawings
Fig. 1 is the buffer management method flow chart of the specific embodiment according to the present invention;
Fig. 2 (1) is one and is used for buffering area is carried out dynamically and the tables of data example structure figure of static management;
Fig. 2 (2) is a buffer circle embodiment state diagram that is moving;
Fig. 3 is the flow chart of another specific embodiment according to the present invention;
Fig. 4 is the embodiment flow chart in the exchange buffering district of employing embodiment illustrated in fig. 3;
Fig. 5 is the buffer management device block diagram of the specific embodiment according to the present invention.
Embodiment
Fig. 1 is the flow chart of the specific embodiment according to the present invention.According to Fig. 1, at first buffering area should be set.Because the most essential task of buffering area is pending data such as to keep in, therefore, the key of its setting is to take into account the demand of flexibility, efficient and the data processing of use, therefore the capacity of the quantity of buffering area and each buffering area should be provided with according to the data processing demand of system, for example, when the bursty data amount of system more after a little while, the capacity of each buffering area can be smaller, quantity also can be lacked; And in the kind of data or grade more for a long time, the quantity of buffering area can be more, this moment, the capacity of buffering area will be provided with according to the average temporary time of bursty data amount or data, or the like.Therefore, present embodiment is provided with plural buffering area.
Secondly, have independent between the buffering area and the combination double properties, need and effectively to manage described a plurality of buffering areas in order effectively to use buffering area, to make.Present embodiment is made into a circle queue (in another embodiment of the present invention with described buffer set, described buffer set is made into a fifo queue), therefore also be provided for indicating and identifying the tables of data of described buffering area in this step, be used for described buffering area is managed.In described tables of data, be provided for identifying the name field of buffering area at least, be used for as the address pointer field of pointing to this buffering area, and point to memory cell field described buffering area active cell, that be used to manage described buffering area.In additional embodiments of the present invention, tables of data is set to two, is respectively applied for the static state and the dynamic management of buffering area.In fact, described buffer set being made into a formation manages also is by the operation of described tables of data is realized.
When described buffering area normally uses, buffering area is used and manage according to the condition of predefined service condition or data processing.Described buffering area use and inseparable when managing, therefore to judge whether described buffering area satisfies the condition of data processing in step 12, if satisfy, will carry out data processing at step 13 pair described buffering area, and utilize described tables of data that described buffering area is managed, otherwise continue other data processing in step 14.
Described treatment conditions embodiment illustrated in fig. 1 can make up arbitrarily for one in time conditions, status condition or the characteristic condition or its.Described time conditions refers to when buffering area begins normally to use, if the time that continues to use surpasses specified threshold value, both has been considered as time conditions and has set up.The setting of time threshold is for preventing that external data from can not continue to import the wait ceaselessly that causes, perhaps, it is for fear of the processing time-delay of the data of input block that time threshold is set, therefore, whether to surpass the time threshold of setting be exactly a time conditions for the data processing in buffering area time-delay.Described status condition refers to the data of buffering area or self whether is in certain state for example, whether the data of buffer stores are full.Described characteristic condition refers to whether whether the data in the buffering area have specific feature, for example imported the special data with certain mark etc.In the described embodiment of Fig. 1, described treatment conditions are that time conditions and status condition use jointly, promptly when the input of the data of described buffering area surpass the threshold value that sets in advance and buffering area when discontented or buffering area completely be considered as condition and set up.
In the described step 13, utilizing described tables of data that described buffering area is managed in the reality can have a lot of modes, and in the present embodiment, revising described tables of data and refreshing described buffering area is exactly wherein a kind of mode.Wherein, revise the relation that is provided with of described tables of data and described condition, then full at buffering area and data wherein still are untreated when finishing if buffering area completely is a condition, the mode field of tables of data is set to " banning use of " state; If the data processing in the buffering area is finished, the pointer value of memory cell field that then can tables of data is set to point to the buffering area first address, promptly finish the refresh operation of current buffering area, and then mode field is set to " allowing to use " state, at this moment, current buffering area just is in idle condition.
Fig. 2 (1) is one and is used for buffering area is carried out dynamically and the tables of data example structure figure of static management; Fig. 2 (2) is a buffer circle embodiment state diagram that is moving; Among Fig. 2, buffering area 21,22 has been in full state, and what current buffering area pointed to is buffering area 23, and the state of buffering area 24 to 27 is idle, and therefore, current buffering area is 23.Among Fig. 2, the length of each buffering area is A00H (hexadecimal).From the state table of Fig. 2 (1), find out, the first address pointer of freebuf and the sensing of current address pointer overlap, the first address pointer and the current address pointer of full buffering area then point to the stem of buffering area and the memory cell of afterbody respectively, and the first address pointer of current buffering area and current address pointer then point to the stem of buffering area and the memory cell at middle part respectively.
Step 12 among Fig. 1,13, the 14th is operated each buffering area.For example, for current buffering area, to judge whether the time whether described buffering area satisfies the data input of full or this buffering area of data has surpassed specified threshold value in step 12, if one of them condition is set up, will carry out data processing by 13 pairs of described buffering areas of execution in step, promptly take out data wherein, after data are all taken out, with the current address pointer in the described tables of data, mode field is revised as C000 and " free time " respectively, and the content of " current buffering area " field is constant, if step 12 Rule of judgment is false, just continue other data processing in step 14, promptly continue the input data, if current buffer data is full, but judge that through step 12 described condition does not still satisfy, mode field that will current buffering area is set to " expiring ", " current buffering area " field is set to "No", " current buffering area " field of next buffering area in the formation then is set to "Yes", so that continue to receive data with new buffering area, thereby finish the replacing of current buffering area, continue with reference to hereinafter about the scheme of the replacing of current buffering area.
Embodiment illustrated in fig. 1 being preferably used in the multi-task operation environment, so as the buffering area concurrent working in the formation, the processes of the preferably corresponding middle step 12,13 embodiment illustrated in fig. 1 of each buffering area, 14 statements.Certainly, adopt one independently process also can use the embodiment of the invention well.
For non-current buffering area, for example buffering area 22, when judging in step 12 whether described buffering area satisfies the time that data have expired or the data of this buffering area are imported and whether set up above the condition of specified threshold value, if set up, will carry out data processing by 13 pairs of described buffering areas of execution in step, promptly take out data wherein, after data are all taken out, with the current address pointer in the described tables of data, mode field is revised as B000 and " free time " respectively, and the content of " current buffering area " field is constant, if step 12 Rule of judgment is false, just continue other data processing in step 14, the data processing of this moment is not to continue the input data, whether satisfies the data processing condition but return the current buffering area of step 12 continuation monitoring, finishes up to data processing.
As seen, in an embodiment of the present invention, which buffering area can be subjected to the state of current buffering area and its position in formation that relation is arranged for new current buffering area.If an appointed new current buffer state be empty, illustrate that wherein data still are untreated to finish that specifying next buffering area in proper order at this moment is current buffering area.The control of current buffering area is best by an independent process control.
Need to prove that because the restriction that real data is handled, the position of the buffering area that described freebuf or data are full may not be continuous.
Fig. 3 is the flow chart of another specific embodiment according to the present invention, and this embodiment has discussed the situation of changing current buffering area.The difference of described embodiment of Fig. 3 and the described embodiment of Fig. 1 is to have increased by two steps, step 15,16.According to this embodiment, when judging in step 12 whether time that described buffering area does not satisfy the data input of full or this buffering area of data has surpassed the condition of specified threshold value, will judge whether current buffering area satisfies second data treatment conditions in step 15, these second data treatment conditions can be time conditions, in status condition or the characteristic condition one or its make up arbitrarily, what present embodiment adopted is status condition, in the present embodiment, step 15 judges whether current buffering area is full, if data are full, illustrate that not having memory space to continue to receive needs temporary data, therefore to promptly select a new buffering area as current data buffer zone in step 16 exchange buffering district.
In another embodiment of the present invention, step 15,16 is placed on the front of step 12, and the described embodiment of the effect of the reality of this embodiment and Fig. 3 is basic identical, does not have essential distinction.
Fig. 4 is the embodiment flow chart in the exchange buffering district of employing embodiment illustrated in fig. 3.According to Fig. 4, at first selecting next buffering area in step 40 is current buffering area, judges in step 41 whether current buffering area is empty then, if be empty, just can carry out follow-up data manipulation, for example, deposit pending data in current buffering area in step 44.If the new current buffering area of selecting is not empty, also will judge whether that whole buffering areas is all judged in step 42 finishes, if also having remaining buffering area does not judge, just continue to select next buffering area as current buffering area in step 45, otherwise, illustrate that not had buffering area in the buffering area formation available, can increase one or more buffering areas this moment in step 43 in the buffering area formation.
Adopt flow process exchange buffering shown in Figure 4 district,, can also go into the buffering area formation at the new buffering area of step 43 increase if all the state of buffering areas is when banning use of.In this embodiment, the buffering area of increase can be inserted into the back of current buffering area or other position of a front or an appointment.With Fig. 2 (2) is example, supposes that current buffering area is a buffering area 22, and the buffering area of increase can be inserted between buffering area 22 and the buffering area 23, also can be inserted between buffering area 22 and the buffering area 21.In fact, the increase of buffering area can be that unit increases one by one with " individual ", can be a plurality of buffering areas of the each increase of unit with " group " also, has just described this situation in another embodiment of the present invention.
In another embodiment of the present invention, adopt following proposal to increase buffering area: to judge that at first when the quantity of freebuf during less than preset threshold value, for example described threshold value is 3, increases new buffering area and goes into the buffering area formation.Can guarantee pending data such as enough buffering areas are temporary like this, the time-delay of data processing when avoiding buffering area full.In this embodiment, the increase of buffering area can be a unit with " individual " or " group " equally also.
What deserves to be explained is that decision operation of the present invention can realize by the judgement to concrete field in the described tables of data, for example judge whether buffering area is idle, expire etc. by mode field.
In embodiment of the present invention, for fear of the waste of buffer resource, when the unused time of a buffering area surpasses specified threshold value, for example described threshold value is 100 seconds, deletes described buffering area.The concrete following proposal that adopts realizes above-mentioned functions.A time threshold (or buffering area life cycle) is set, and a timer (or counter) is set for each buffering area, if the time value of the timer of described buffering area during more than or equal to the threshold value that is provided with, just can be deleted corresponding buffering area, refresh simultaneously or upgrade described tables of data.Described timer can be realized with memory cell or register.Therefore, timer and described buffering area can be provided with and delete in the lump.
Buffer management device provided by the invention is with reference to figure 5, comprise tables of data 51, buffering area formation 52, and the buffering area processing unit 53 and the buffering area administrative unit 54 that are used to that buffering area is set and are provided for indicating and identify the tables of data of described buffering area, described buffer management unit 54, be used to judge whether described buffering area satisfies treatment conditions, when a buffering area satisfies treatment conditions, the data of taking out are wherein issued system handles, and revise described tables of data and refresh described buffering area.
Present embodiment is provided with plural buffering area, and described buffer set is made into a circle queue (in another embodiment of the present invention, described buffer set is made into a fifo queue), the tables of data that is used to indicate and identify described buffering area that is provided with is used for described buffering area is managed.In described tables of data, be provided for identifying the name field of buffering area at least, be used in reference to address pointer field, and point to memory cell field described buffering area active cell, that be used to manage described buffering area to this buffering area.
When described buffering area normally uses, buffering area is used and manage according to the condition of predefined service condition or data processing.
Described treatment conditions are the combination in any of time conditions and/or status condition and/or characteristic condition.
In a further embodiment, buffering area processing unit 53 also is used for judging whether current buffering area is satisfied predefined treatment conditions, if satisfy, change described data buffer zone, for example, changes described data buffer zone when buffering area is expired.
In order to improve the performance of device shown in Figure 5, this device also comprises first updating block 55 and second updating block 56, described first updating block 55 is used under certain condition, for example when the state of whole buffering areas be when banning use of or when the number of freebuf during less than preset threshold value, increase new buffering area and go into the buffering area formation.Second updating block 56 then is used for surpassing specified threshold value when the unused time of a buffering area, deletes described buffering area.
In view of the embodiment that is implemented in this paper of each functional unit of the described device of Fig. 5 partly has detailed description, do not repeat them here.

Claims (10)

1, a kind of buffer management method is characterized in that comprising:
The tables of data that a plurality of buffering areas is set and is provided for indicating and identifying described buffering area;
When a buffering area satisfies first treatment conditions, take out data processing wherein, and revise described tables of data and refresh described buffering area.
2, buffer management method as claimed in claim 1 is characterized in that, described a plurality of buffering areas are set to the buffer circle formation.
3, buffer management method as claimed in claim 1 is characterized in that, described treatment conditions are time conditions and/or status condition and/or characteristic condition.
4, as claim 1,2 or 3 described buffer management methods, it is characterized in that also comprising, judge that whether current buffering area satisfies second treatment conditions, if satisfy, changes described data buffer zone.
5, buffer management method as claimed in claim 4 is characterized in that, when the state of whole buffering areas when banning use of, increase new buffering area and go into the buffering area formation.
6, buffer management method as claimed in claim 5 is characterized in that, when the unused time of a buffering area surpasses specified threshold value, deletes described buffering area.
7, buffer management method as claimed in claim 4 is characterized in that, when the number of freebuf during less than preset threshold value, increases new buffering area and goes into the buffering area formation.
8, a kind of buffer management device is characterized in that comprising:
The buffering area processing unit is used to the tables of data that buffering area is set and is provided for indicating and identifies described buffering area;
The buffer management unit is used to judge whether described buffering area satisfies treatment conditions, and when a buffering area satisfied treatment conditions, the data of taking out were wherein issued system handles, and revise described tables of data and refresh described buffering area
9, buffer management method as claimed in claim 8 is characterized in that also comprising, is used for increasing new buffering area under certain condition and goes into buffering area formation first updating block.
10, buffer management method as claimed in claim 8 or 9 is characterized in that also comprising, deletes second updating block of described buffering area when the unused time of a buffering area surpasses specified threshold value.
CN200610103637A 2006-07-26 2006-07-26 Buffer zone managing method Expired - Fee Related CN1901548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200610103637A CN1901548B (en) 2006-07-26 2006-07-26 Buffer zone managing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200610103637A CN1901548B (en) 2006-07-26 2006-07-26 Buffer zone managing method

Publications (2)

Publication Number Publication Date
CN1901548A true CN1901548A (en) 2007-01-24
CN1901548B CN1901548B (en) 2012-10-03

Family

ID=37657284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200610103637A Expired - Fee Related CN1901548B (en) 2006-07-26 2006-07-26 Buffer zone managing method

Country Status (1)

Country Link
CN (1) CN1901548B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818277B2 (en) 2009-11-24 2014-08-26 Zte Corporation Method, apparatus and system for transmitting multimedia data by bluetooth and real-time playing
CN104376096A (en) * 2014-11-24 2015-02-25 北京京东尚科信息技术有限公司 Method for asynchronous updating based on buffer area
CN106383893A (en) * 2016-09-23 2017-02-08 上海携程商务有限公司 Time sequence data management method and system
CN109412939A (en) * 2018-12-11 2019-03-01 中冶京诚工程技术有限公司 Communication gateway for recording industrial network communication period process data and working method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5818539A (en) * 1996-03-29 1998-10-06 Matsushita Electric Corporation Of America System and method for updating a system time constant (STC) counter following a discontinuity in an MPEG-2 transport data stream
CN1341931A (en) * 2001-08-22 2002-03-27 吴忆韩 Selective recording method and its equipment
JP3655266B2 (en) * 2002-07-16 2005-06-02 株式会社東芝 Information processing device
CN100337490C (en) * 2003-10-16 2007-09-12 华为技术有限公司 Macro-diversity combining method in mobile communication system
CN1780254A (en) * 2004-11-17 2006-05-31 华为技术有限公司 Method for using buffer area in network processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818277B2 (en) 2009-11-24 2014-08-26 Zte Corporation Method, apparatus and system for transmitting multimedia data by bluetooth and real-time playing
CN104376096A (en) * 2014-11-24 2015-02-25 北京京东尚科信息技术有限公司 Method for asynchronous updating based on buffer area
CN106383893A (en) * 2016-09-23 2017-02-08 上海携程商务有限公司 Time sequence data management method and system
CN109412939A (en) * 2018-12-11 2019-03-01 中冶京诚工程技术有限公司 Communication gateway for recording industrial network communication period process data and working method

Also Published As

Publication number Publication date
CN1901548B (en) 2012-10-03

Similar Documents

Publication Publication Date Title
CN1787588A (en) Method for processing multiprogress message and method for processing multiprogress talk ticket
EP1130520A1 (en) Self-tuning memory management for computer systems
CN1271524C (en) Static internal storage management method
CN1794208A (en) Mass storage device and method for dynamically managing a mass storage device
CN102096599A (en) Multi-queue task scheduling method and related system and equipment
CN101286143B (en) Method for supervisory unit driving cache
CN1834956A (en) Processing of multiroute processing element data
CN1514354A (en) Progress pole/linear procedure pole management method of construction member oriented backbone system internal core
CN101067800A (en) Memory deterioration balance method based on local sampling
CN1901548A (en) Buffer zone managing method
CN101030975A (en) Processing method for increasing responding speed of protocol AT commands
CN1869933A (en) Computer processing system for implementing data update and data updating method
CN100351792C (en) A real-time task management and scheduling method
CN117271137A (en) Multithreading data slicing parallel method
CN1881895A (en) Apparatus operation method in network management system
CN1423456A (en) Sharing route realizing and sheduling method
CN1878080A (en) Method for polling communication device by network management system
CN1889038A (en) Method for managing long-distance structural components service cycle with class as unit
CN1567249A (en) Internal memory managerial approach for computer system
CN1783874A (en) Ageing method for address analytic protocol cache table item in network device
CN1489334A (en) Method for storage area management with static and dynamic joint
CN1129281C (en) Method of raising IP message forwarding speed utilizing slow storage technology
CN1315046C (en) A method for allocating computation nodes in cluster job management system
CN1504892A (en) Realization method for communication between tasks
CN1728870A (en) Method for assigning transmission resource in transmission layer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121003

Termination date: 20130726