CN102521057A - Resource scheduling method and device - Google Patents

Resource scheduling method and device Download PDF

Info

Publication number
CN102521057A
CN102521057A CN2011104559285A CN201110455928A CN102521057A CN 102521057 A CN102521057 A CN 102521057A CN 2011104559285 A CN2011104559285 A CN 2011104559285A CN 201110455928 A CN201110455928 A CN 201110455928A CN 102521057 A CN102521057 A CN 102521057A
Authority
CN
China
Prior art keywords
buffer zone
application
space
priority
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.)
Pending
Application number
CN2011104559285A
Other languages
Chinese (zh)
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.)
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry 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 Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Co Ltd
Priority to CN2011104559285A priority Critical patent/CN102521057A/en
Publication of CN102521057A publication Critical patent/CN102521057A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses resource scheduling method and device, wherein, the method comprises the following steps: monitoring occupation condition of a buffer zone space; and preferentially releasing the occupation space of a lowest-priority application in the buffer zone according to the occupation condition of the buffer zone and the priority of the application in the buffer zone. According to the invention, through a manner of setting priority for the application, the occupation space of the lowest-priority application in the buffer zone is preferentially released according to the occupation condition of the buffer zone, so under the resource-constrained situation, the calculation and data for the low-priority application is avoided, thereby achieving the purposes of reasonably scheduling and distributing resources, ensuring sufficient resource for the high-priority application, and reasonably guaranteeing the smooth operation when a plurality of services are applied to a host machine. Therefore, the whole resource scheduling scheme is simple to realize, without bringing extra performance wastage.

Description

Resource regulating method and device
Technical field
The present invention relates to the communications field, and especially, relate to a kind of resource regulating method and device.
Background technology
At present, supporting under the situation of using zero-copy morely, can be incorporated on the main frame and move being deployed in application program on the multiple host in the past; Therefore; Just need on a main frame, move a plurality of network traffics and handle application, each application all will be handled all packets that this main frame receives, thereby reaches the saving hardware resource; Need not make amendment owing to this integration simultaneously to application, therefore can compatible original application.
But the computational resource of the CPU (CPU) on a main frame is limited, and correspondingly, when handling the data of these application, the memory source of required use (buffer resource) is limited equally.
When a plurality of application are placed on when moving on the main frame, certainly will cause each to use the problem of fighting for, thereby cause important use in time to be handled, and cause damage computational resource.
At present, can take computational resource in a large number to the execution of a plurality of application and can't carry out the problem that reasonable resource is distributed, not propose effective solution as yet with the buffering area resource.
Summary of the invention
To the problem in the correlation technique, the present invention proposes a kind of resource regulating method and device, can carry out reasonable distribution to the resource of system, guarantees that the system resource of high-priority applications is sufficient.
Technical scheme of the present invention is achieved in that
According to a further aspect in the invention, a kind of resource regulating method is provided.
This method comprises: the situation that takies between the monitoring buffer empty; According to occupied situation of buffer zone and the priority that takies the application of buffer zone, preferentially discharge the occupation space in the buffer zone that is applied in of lowest priority.
Wherein, the situation that takies between the monitoring buffer empty comprises: the remaining space of monitoring buffer zone.
And; Preferential discharge lowest priority be applied in that occupation space comprises in the buffer zone: for each application of using buffer zone; Remaining space in that buffer zone is actual is used less than this under situation of pairing buffer zone remaining space threshold value; Should use shared space in the buffer release district, wherein, the pairing remaining space threshold value of the application that priority is minimum is maximum.
In addition, the situation that takies between the monitoring buffer empty comprises: the occupied space of monitoring buffer zone.
And; Preferential discharge lowest priority be applied in that occupation space comprises in the buffer zone: for each application of using buffer zone; Use greater than this under situation of pairing buffer zone space hold threshold value in the actual occupied space of buffer zone; Should use shared space in the buffer release district, wherein, the pairing buffer zone space hold of the application that priority is minimum threshold value is minimum.
This method can further comprise: give the not application of Free up Memory with d/d allocation of space in the buffer zone.
According to a further aspect in the invention, a kind of resource scheduling device is provided.
This device comprises: monitoring module is used to monitor the situation that takies between buffer empty; Scheduler module is used for preferentially discharging the occupation space in the buffer zone that is applied in of lowest priority according to occupied situation of buffer zone and the priority that takies the application of buffer zone.
Wherein, monitoring module is used to monitor the remaining space of buffer zone.
And; For each application of using buffer zone; Scheduler module is used for using less than this under situation of pairing buffer zone remaining space threshold value at the actual remaining space of buffer zone; Should use shared space in the buffer release district, wherein, the pairing remaining space threshold value of the application that priority is minimum is maximum.
In addition, monitoring module is used to monitor the occupied space of buffer zone.
And; For each application of using buffer zone; Scheduler module is used for using greater than this under situation of pairing buffer zone space hold threshold value in the actual occupied space of buffer zone; Should use shared space in the buffer release district, wherein, the pairing buffer zone space hold of the application that priority is minimum threshold value is minimum.
The present invention is through being provided with the mode of priority to application; And between the buffer empty that minimum application takies according to the preferential Release priority level of the situation that takies of buffer zone; Thereby can under the situation of resource anxiety, avoid the application of low priority is calculated and data, reach the purpose of resource rational management, distribution; The resource that has guaranteed high-priority applications is sufficient; Reasonably guaranteed a plurality of service application can be on a main frame work, whole resource scheduling scheme is realized simple, can not bring extra performance loss.
Description of drawings
Fig. 1 is the process flow diagram according to the resource regulating method of the embodiment of the invention;
Fig. 2 is the block diagram according to the resource scheduling device of the embodiment of the invention.
Embodiment
Consider the problems referred to above that exist in the correlation technique,, reach the purpose of resource rational management, distribution, thereby the resource that has guaranteed high-priority applications is sufficient through between program, setting up the mode of priority.
According to embodiments of the invention, a kind of resource regulating method is provided.
As shown in Figure 1, comprise according to the resource regulating method of the embodiment of the invention:
Step S101, the situation that takies between the monitoring buffer empty;
Step S103 according to occupied situation of buffer zone and the priority that takies the application of buffer zone, preferentially discharges the occupation space in the buffer zone that is applied in of lowest priority.
On the one hand, monitoring between buffer empty take situation the time, can monitor the remaining space of buffer zone.At this moment; Preferential discharge lowest priority be applied in the buffer zone occupation space time; Use for each that use buffer zone, can the actual remaining space of buffer zone less than (also can " less than " change " being less than or equal to " into) this uses under the situation of pairing buffer zone remaining space threshold value, should the shared space of application in the buffer release district; Wherein, the pairing remaining space threshold value of the application that priority is minimum is maximum.
The present invention mainly utilizes the priority approach decision resource dispatching strategies of using more.Owing to there are a plurality of application to use a cover cpu resource simultaneously, computational resource will certainly occur and lack situation, be reflected to the driving aspect, exactly because application processes causes the available buffer quantity of seeing in the driving to reduce slowly.To this situation through the situation that takies to buffer zone be provided with monitoring mechanism just can the embodiment system in the operating position of main resource; Signaling upper layer application when the idle number of buffer zone is lower than threshold value; After upper level applications was received signal, whether decision abandoned the current buffer zone that occupies according to preset priority.The application high to priority, less to the remaining space threshold ratio of this application configuration, can guarantee that like this zero-copy send data to high priority application as much as possible.Correspondingly, it is bigger that low level is earlier used corresponding remaining space threshold value, like this; When resource is nervous; The number of the application of low priority reaches threshold value at first, thereby discharges the data buffer of low priority applications at first, thereby the computational resource of vacateing is given high preferential application.
For instance, size is 10 between the buffer empty of supposing the system, and the priority of using A is high, and the corresponding remaining space threshold value of application A is 3; The priority of Application of B is medium, and the corresponding remaining space threshold value of Application of B is 5; The priority of using C is minimum, and the corresponding remaining space threshold value of application C is 7;
Like this, be that because the 8 remaining space threshold values greater than all application, therefore, all are applied in, and occupation space all is not released in the buffer zone under 8 the situation when the remaining space of buffer zone; And be under 6 the situation when the remaining space of buffer zone; Because this moment, buffer zone real surplus space 6 was less than using the corresponding remaining space threshold value 7 of C; But greater than the remaining space threshold value of using A and B, so the application C of lowest priority shared space in buffer zone can at first be discharged at this moment, simultaneously; Correlation computations for using C also can stop, and the space of release and the computational resource of saving can be used for helping to handle application A and B.
Based on above-mentioned scene; Be under 4 the situation when the remaining space of buffer zone; Because this moment, buffer zone real surplus space 4 was less than the corresponding remaining space threshold value 5 of Application of B (simultaneously also less than using the corresponding remaining space threshold value 7 of C), but greater than the remaining space threshold value 3 of using A, so will can not be employed B between the buffer empty of this moment and C is shared; Only leaving the highest application A of priority for uses; Simultaneously, relevant computational resource (cpu resource) also can be concentrated and handle the data of using A, has guaranteed that the application A resource of limit priority is sufficient.
And after one of release is used between shared buffer empty; What may cause buffer zone currently takies application that situation allows this release and restarts and take this buffer zone; And that the reason that causes this situation to occur has is a variety of, and is exactly because stop this application is handled probably, therefore; Can increase certain protection mechanism; Make in an a period of time that is applied in after occupation space is released in the buffer zone, can not calculate this application again, avoid at short notice releasing operation between buffer empty being carried out in an application repeatedly.
For more situation about using the remaining space threshold value of each application can further be set according to the priority of using, the concrete mode of judgement is similar with the mode of describing before, no longer repeats here more.
On the other hand, monitoring between buffer empty take situation the time, can monitor the occupied space of buffer zone.At this moment; When carrying out discharging between buffer empty; For each application of using buffer zone, in the actual occupied space of buffer zone greater than (also can " greater than " change into " more than or equal to ") this uses under the situation of pairing buffer zone space hold threshold value, should the shared space of application in the buffer release district; Wherein, the pairing buffer zone space hold of the application threshold value that priority is minimum is minimum.
Concrete process is similar with the process of describing before, no longer the situation of monitoring buffer zone space hold situation is illustrated here.
To sum up, the present invention allocates the resource of a plurality of application with the mode of priority on the basis of ten thousand Broadcoms at zero-copy; Guarantee high preferential application priority processing packet,, preferentially discharge the packet of low priority if when resource is nervous; Thereby the application that guarantees high priority obtains enough data to be handled; Reasonably guaranteed a plurality of service application can be on a main frame work, whole resource scheduling scheme is realized simple, can not bring extra performance loss.
According to embodiments of the invention, a kind of resource scheduling device is provided.
As shown in Figure 2, comprise according to the resource scheduling device of the embodiment of the invention:
Monitoring module 21 is used to monitor the situation that takies between buffer empty;
Scheduler module 22 is connected to monitoring module 21, is used for preferentially discharging the occupation space in the buffer zone that is applied in of lowest priority according to occupied situation of buffer zone and the priority that takies the application of buffer zone.
Wherein, on the one hand, monitoring module is used to monitor the remaining space of buffer zone.And; For each application of using buffer zone; Scheduler module is used for using less than this under situation of pairing buffer zone remaining space threshold value at the actual remaining space of buffer zone; Should use shared space in the buffer release district, wherein, the pairing remaining space threshold value of the application that priority is minimum is maximum.
On the other hand, monitoring module is used to monitor the occupied space of buffer zone.And; For each application of using buffer zone; Scheduler module is used for using greater than this under situation of pairing buffer zone space hold threshold value in the actual occupied space of buffer zone; Should use shared space in the buffer release district, wherein, the pairing buffer zone space hold of the application that priority is minimum threshold value is minimum.
To sum up; By means of technique scheme of the present invention, through application being provided with the mode of priority, and between the buffer empty that minimum application takies according to the preferential Release priority level of the situation that takies of buffer zone; Thereby can be under the situation of resource anxiety; Avoid the application of low priority is calculated and data, reach the purpose of resource rational management, distribution, guaranteed that the resource of high-priority applications is sufficient.
More than be merely preferred embodiment of the present invention, or not all within spirit of the present invention and principle in order to restriction the present invention, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a resource regulating method is characterized in that, comprising:
The situation that takies between the monitoring buffer empty;
According to occupied situation of said buffer zone and the priority that takies the application of said buffer zone, preferentially discharge occupation space in the said buffer zone of being applied in of lowest priority.
2. resource regulating method according to claim 1 is characterized in that, the situation that takies between the monitoring buffer empty comprises:
Monitor the remaining space of said buffer zone.
3. resource regulating method according to claim 2 is characterized in that, discharges preferentially that occupation space comprises in the said buffer zone of being applied in of lowest priority:
For each application of using said buffer zone; Remaining space in that said buffer zone is actual is used less than this under situation of pairing buffer zone remaining space threshold value; Discharge the shared space of this application in the said buffer zone; Wherein, the pairing remaining space threshold value of the application that priority is minimum is maximum.
4. resource regulating method according to claim 1 is characterized in that, the situation that takies between the monitoring buffer empty comprises:
The occupied space of monitoring buffer zone.
5. resource regulating method according to claim 4 is characterized in that, discharges preferentially that occupation space comprises in the said buffer zone of being applied in of lowest priority:
For each application of using said buffer zone; Use greater than this under situation of pairing buffer zone space hold threshold value in the actual occupied space of said buffer zone; Discharge the shared space of this application in the said buffer zone; Wherein, the pairing buffer zone space hold of the application threshold value that priority is minimum is minimum.
6. resource regulating method according to claim 1 is characterized in that, further comprises:
Give the not application of Free up Memory with d/d allocation of space in the said buffer zone.
7. a resource scheduling device is characterized in that, comprising:
Monitoring module is used to monitor the situation that takies between buffer empty;
Scheduler module is used for preferentially discharging occupation space in the said buffer zone of being applied in of lowest priority according to occupied situation of said buffer zone and the priority that takies the application of said buffer zone.
8. resource scheduling device according to claim 7 is characterized in that said monitoring module is used to monitor the remaining space of said buffer zone; And; For each application of using said buffer zone, said scheduler module is used for using less than this under situation of pairing buffer zone remaining space threshold value at the actual remaining space of said buffer zone, discharges the shared space of this application in the said buffer zone; Wherein, the pairing remaining space threshold value of the application that priority is minimum is maximum.
9. resource scheduling device according to claim 7 is characterized in that, said monitoring module is used to monitor the occupied space of buffer zone.
10. resource scheduling device according to claim 9; It is characterized in that; For each application of using said buffer zone, said scheduler module is used for using greater than this under situation of pairing buffer zone space hold threshold value in the actual occupied space of said buffer zone, discharges the shared space of this application in the said buffer zone; Wherein, the pairing buffer zone space hold of the application threshold value that priority is minimum is minimum.
CN2011104559285A 2011-12-31 2011-12-31 Resource scheduling method and device Pending CN102521057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104559285A CN102521057A (en) 2011-12-31 2011-12-31 Resource scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104559285A CN102521057A (en) 2011-12-31 2011-12-31 Resource scheduling method and device

Publications (1)

Publication Number Publication Date
CN102521057A true CN102521057A (en) 2012-06-27

Family

ID=46291992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104559285A Pending CN102521057A (en) 2011-12-31 2011-12-31 Resource scheduling method and device

Country Status (1)

Country Link
CN (1) CN102521057A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345368A (en) * 2013-07-18 2013-10-09 四川九成信息技术有限公司 Data caching method in buffer storage
CN104111873A (en) * 2013-04-22 2014-10-22 深圳富泰宏精密工业有限公司 Internal memory freeing method and system
CN105979321A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 Method and system for preventing hardware resource occupation conflicts
CN103631661B (en) * 2013-11-27 2017-04-05 青岛海信电器股份有限公司 A kind of EMS memory management process and device
CN106900066A (en) * 2015-12-18 2017-06-27 北京信威通信技术股份有限公司 A kind of resource allocation methods for ensureing high-priority users QoS
CN107291385A (en) * 2017-06-12 2017-10-24 努比亚技术有限公司 A kind of method and terminal of data write-in
CN108738069A (en) * 2017-04-14 2018-11-02 华为技术有限公司 A kind of method and device of resource distribution
CN111858514A (en) * 2020-07-27 2020-10-30 博泰车联网(南京)有限公司 Data writing method and device and computer storage medium
CN112235829A (en) * 2020-10-15 2021-01-15 展讯通信(上海)有限公司 Data transmission method, device and storage medium
CN115209166A (en) * 2021-04-12 2022-10-18 北京字节跳动网络技术有限公司 Message sending method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1998197A (en) * 2004-07-12 2007-07-11 索尼爱立信移动通信日本株式会社 Receiver apparatus and method for releasing memory thereof
CN101286143A (en) * 2008-05-26 2008-10-15 中兴通讯股份有限公司 Method for supervisory unit driving cache

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1998197A (en) * 2004-07-12 2007-07-11 索尼爱立信移动通信日本株式会社 Receiver apparatus and method for releasing memory thereof
CN101286143A (en) * 2008-05-26 2008-10-15 中兴通讯股份有限公司 Method for supervisory unit driving cache

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111873A (en) * 2013-04-22 2014-10-22 深圳富泰宏精密工业有限公司 Internal memory freeing method and system
CN104111873B (en) * 2013-04-22 2019-02-26 深圳富泰宏精密工业有限公司 Memory release method and system
CN103345368B (en) * 2013-07-18 2015-05-06 内蒙古科技大学 Data caching method in buffer storage
CN103345368A (en) * 2013-07-18 2013-10-09 四川九成信息技术有限公司 Data caching method in buffer storage
CN103631661B (en) * 2013-11-27 2017-04-05 青岛海信电器股份有限公司 A kind of EMS memory management process and device
CN106900066A (en) * 2015-12-18 2017-06-27 北京信威通信技术股份有限公司 A kind of resource allocation methods for ensureing high-priority users QoS
CN105979321A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 Method and system for preventing hardware resource occupation conflicts
CN108738069B (en) * 2017-04-14 2021-05-11 华为技术有限公司 Resource allocation method and device
CN108738069A (en) * 2017-04-14 2018-11-02 华为技术有限公司 A kind of method and device of resource distribution
CN107291385A (en) * 2017-06-12 2017-10-24 努比亚技术有限公司 A kind of method and terminal of data write-in
CN111858514A (en) * 2020-07-27 2020-10-30 博泰车联网(南京)有限公司 Data writing method and device and computer storage medium
CN112235829A (en) * 2020-10-15 2021-01-15 展讯通信(上海)有限公司 Data transmission method, device and storage medium
CN115209166A (en) * 2021-04-12 2022-10-18 北京字节跳动网络技术有限公司 Message sending method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102521057A (en) Resource scheduling method and device
US10572284B2 (en) Virtualization Congestion Control Framework for Modifying Execution of Applications on Virtual Machine Based on Mass Congestion Indicator in Host Computing System
CN101968748B (en) Multithreading data scheduling method, device and network equipment
CN102158420B (en) Service traffic scheduling method based on priority queue and device thereof
CN105337896A (en) Message processing method and device
CN109697122A (en) Task processing method, equipment and computer storage medium
CN105812285A (en) Port congestion management method and device
CN102811176B (en) A kind of data flow control method and device
CN107301093B (en) Method and device for managing resources
CN104202261A (en) Service request processing method and device
CN102487494B (en) Short message flow control method and system
CN106330760A (en) Method and device of buffer management
CN101984414B (en) Method and device for scheduling central processing unit (CPU) resource
CN106998590B (en) Uplink resource scheduling method and device
US20150058485A1 (en) Flow scheduling device and method
CN104102548A (en) Task resource scheduling processing method and task resource scheduling processing system
KR20130065019A (en) System and method of resource management of centralized base station in mobile communication network
CN101754389A (en) Resource control method, device and system
CN1988684B (en) Network process managing method and device
CN110290009A (en) A kind of data dispatching method, device and computer readable storage medium
US20150131446A1 (en) Enabling virtual queues with qos and pfc support and strict priority scheduling
CN102769566B (en) A kind of Multi-stage scheduling system configuration, variation and device
JP2016528648A (en) Network application parallel scheduling to reduce power consumption
CN105517172B (en) A kind of business scheduling method and device
CN106209676A (en) The data processing method of cloud host computer systems based on many equipment and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120627