CN101090511B - Release method for death resource - Google Patents

Release method for death resource Download PDF

Info

Publication number
CN101090511B
CN101090511B CN200610092219A CN200610092219A CN101090511B CN 101090511 B CN101090511 B CN 101090511B CN 200610092219 A CN200610092219 A CN 200610092219A CN 200610092219 A CN200610092219 A CN 200610092219A CN 101090511 B CN101090511 B CN 101090511B
Authority
CN
China
Prior art keywords
resource
transient state
time
timer
state resource
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.)
Expired - Fee Related
Application number
CN200610092219A
Other languages
Chinese (zh)
Other versions
CN101090511A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200610092219A priority Critical patent/CN101090511B/en
Publication of CN101090511A publication Critical patent/CN101090511A/en
Application granted granted Critical
Publication of CN101090511B publication Critical patent/CN101090511B/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 method for releasing hang resources including the following steps: the system sets the largest occupation time length of each transient resource, computes each actual occupation time length having been distributed with the transient resource, when there are transient resources with the actual time length larger than the set largest occupation time length, then it is judged that the resource is the hang one and release it, which fully utilizes the character that the largest occupation time length of the transient resource can be foreseen to process the hang resourcesand resume them so as to avoid function loss of the communication system because of the hang transient resources.

Description

A kind of method for releasing of death resource
Technical field
The present invention relates to method for releasing resource in a kind of communication system, relate to a kind of method for releasing of death resource especially.
Background technology
In communication system, system resource has three types usually: transient state resource, semipermanent resource and permanent resource, wherein:
The transient state resource is meant the resource of provisional use in the communication system.For example, the message transmission module in the communication system distributes the transient state resource to preserve information, carry out respective handling when receiving the message that certain process is come, and after handling, discharges this resource so that this resource is repeated to utilize at once.The maximum occupation time of this resource can be pre-determined by system according to the agreement of using, and also can be pre-determined by system by the method for analyzing, and can also be preestablished by system according to the configuration of software and hardware in the system.
Semipermanent resource is meant by communication system and triggers the resource of distributing and discharging according to the outside input.The maximum occupation time of this resource can not be obtained by system design analysis, must be determined whether discharging by the outside input.For example some resources of controlling call in the communication system are distributed when the user calls out when receiving, and the user discharges during on-hook.
Permanent resource be meant in system starting process distribute, in system's resource that takies and do not need to discharge in service always.
In real-time communication system, the use of transient state resource is very general.For example the message bag resource that each interprocess communication is used in the operating system, call out the control table that distributed for metered call relevant information system in the running etc.But resource is limited in the communication system, and this just requires Limited resources can access reasonable use, thereby for the transient state resource of generally using, should in time discharge when it is not used, so that utilized by other process.
In real-time communication system, the application of transient state resource and release are similar to the application and the release of the Dram in the ordinary procedure design, mainly be to rely on programmer's programming to guarantee, because the complexity of programming, be difficult to guarantee that in the operation conditions of various complexity program can both correctly be finished the work that resource discharges, and if the transient state resource of having applied for is not normally discharged, system can think that this resource is in the state that is being used, thereby forms resource from suspending.If all assignable resources are all hung, system can't need distribute available transient state resource according to process, and this can cause the disabled serious consequence of systemic-function.
At next generation network (Next Generation Network, NGN) in, because busy hour call amount (the Busy Hour Call Atternpt of system, BHCA) very high, the resource from suspending mistake that small probability triggers might cause finally all that system does not have that enough transient state resources are distributed, serious consequences such as resource exhaustion, disabler, network service interruption and system crash.Under this situation, also can only regain the transient state resource usually, can cause a series of problems such as communication disruption, loss of data like this by restarting communication system.These problems all are unacceptable for telco service provider and communication system provider.
Summary of the invention
The present invention promptly is the method for releasing of a kind of death resource of proposing at the shortcoming that exists in the above-mentioned prior art, this method makes and can effectively discharge behind the resource from suspending, prevents the generation because of problems such as telecommunication system resources that resource from suspending causes exhausts, disabler, network service interruption and system crashes.
The present invention realizes by following technical proposals:
A kind of method for releasing of death resource comprises the steps:
The maximum occupation time of each transient state resource of default;
When system receives trigger message, calculate the actual duration that takies that each has distributed the transient state resource;
Actual when taking duration when existing greater than the transient state resource of this transient state resource settings maximum occupation time, judge that this transient state resource is death resource and discharges;
The described actual duration that takies of transient state resource that distributed obtains like this:
(b1) during system assignment transient state resource, obtain and write down that this transient state resource is pairing takies the starter system time;
(b2) trigger message is received by system, obtains system's real-time time of this moment;
(b3) the transient state resource is pairing to be taken the time difference of starter system between the time and was distributed the actual duration that takies of transient state resource distributing of being write down in computing system real-time time and the step (b1).
Further, the maximum occupation time of described each transient state resource is that system sets according to its employed agreement.
Further, the maximum occupation time of described each transient state resource is a system by to after wherein the ruuning situation of each process is analyzed, and uses the situation of transient state resource to set according to each process.
Further, the maximum occupation time of described each transient state resource is that system sets according to the configuration of software and hardware.
Further, described trigger message is that system carries out resource and newly divides timing unsuccessful information.
Further, described trigger message is to set one in the system to follow the overhaul period, newly once follows the inspection information of the zero hour.
Further, described trigger message is the information that the timer timing set in the system arrives.
Further, described timer is one by default, and it is moment in system start-up constantly that described timer starts work for the first time, and current timer timing to information trigger next time timer automatically and start working.
Further, described timer is one by default, it is the moment of carrying out resource allocation in system for the first time constantly that described timer starts work for the first time, and current timer timing to information trigger next time timer automatically and start working.
Further, described timer is by default, each transient state resource is all set the timer of a correspondence, described timer startup work be constantly this timer of system assignment moment of corresponding transient state resource, and when this transient state resource is actual when taking duration less than this transient state resource settings maximum occupation time, current timer timing to information trigger next time timer automatically and start working, described timer quits work when the transient state resource discharges being assigned with of correspondence.
Again further, the timing of described timer is set to the maximum occupation time of corresponding transient state resource.
Compared with prior art, the present invention has following remarkable advantage:
(1) made full use of that transient state resource maximum occupation time is the characteristic that can predict in the system, to the situation that system resource is hung handle, self-recovery and correction;
(2) can prevent generation because of problems such as telecommunication system resources that resource from suspending causes exhausts, disabler, network service interruption and system crashes;
(3) stability and the robustness of system have been improved.
Description of drawings
Fig. 1 is the flow chart that death resource discharges in the specific embodiment of the invention one;
Fig. 2 is the flow chart that death resource discharges in the specific embodiment of the invention two;
Fig. 3 is the flow chart that death resource discharges in the specific embodiment of the invention three;
Fig. 4 is the flow chart that death resource discharges in the specific embodiment of the invention four.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is further introduced, but not as a limitation of the invention.
At first explanation a bit: the actual duration that takies of transient state resource is meant actual the take duration of transient state resource in the primary distribution use among the following embodiment, and the maximum occupation time of transient state resource refers to the maximum duration that the transient state resource can take in primary distribution is used.
Embodiment one:
As shown in Figure 1, the method for releasing of the death resource of the embodiment of the invention one may further comprise the steps:
Step 101, according to requirement of system design, after the ruuning situation of each process in this system analyzed, the maximum occupation time of unique transient state resource was T1 in the initialization system;
Step 102, system distributes the transient state resource according to the process needs, obtains and preserve the pairing starter system time T a1 that takies when distributing this transient state resource;
Step 103, in system's running, when a new process need be distributed the transient state resource, and when not having idle transient state resource in the system, this sub-distribution transient state resource is unsuccessful, and system obtains current system time Tc immediately;
Step 104, calculate current system time Tc and the time difference that takies starter system time T a1, obtain the actual duration that takies of this transient state resource, that judges this transient state resource actually takies the maximum occupation time T1 whether duration has surpassed its setting, if, execution in step 105, otherwise, occupied transient state resource is not dealt with, make it continue to be used;
Step 105 judges that this transient state resource is a death resource, discharges this death resource, and remove to preserve take starter system time T a1.
In the present embodiment one, utilize whether the system assignment resource is unsuccessful exists death resource for the trigger condition check system, and the release death resource, the method for releasing of this death resource can not have that enough resources are newly distributed and when having death resource again, in time discharge death resource in system.Not only real-time is better for this method, reliability is also higher.
Embodiment two:
As shown in Figure 2, the method for the death resource of the embodiment of the invention two release may further comprise the steps:
Step 201, system be according to the configuration status of its software and hardware, the maximum occupation time of each transient state resource that exists in the initialization system be T1, T2 ..., and in system, set a resource from suspending and follow the overhaul period;
Step 202, system distributes each transient state resource according to the process needs, and obtain and preserve each transient state resource carry out the branch timing pairing take starter system time T a1, Ta2,
Step 203, in system's running, according to the setting that its death resource follows the overhaul period, when a new round was followed the inspection beginning, system obtained current system time Tc;
Step 204, calculate also the duration that takies respectively in the pairing reality of using of each transient state resource, also promptly: current system time Tc with take starter system time T a1, current system time Tc with take starter system time T a2 ... time difference, judge these transient state resources respectively actual take duration whether surpassed its maximum occupation time T1 that has set, T2 ... if, execution in step 205, otherwise, occupied transient state resource is not dealt with, make it continue to be used;
Step 205 is judged actually to take duration surpass to set the pairing transient state resource of maximum occupation time be death resource, discharges this death resource, and removes that this death resource of preserving is pairing to take the starter system time.
In embodiment two, that sets death resource in the system follows the overhaul period, is whether the trigger condition check system exists death resource with the initial moment of following inspection, and discharges death resource.This mode also is to load to follow the overhaul period when system start-up, can not cause the release of death resource to lose efficacy because of the unusual of program running, the timely release of the system that can guarantee death resource in running.
Embodiment three:
As shown in Figure 3, the method for the death resource of the embodiment of the invention three release may further comprise the steps:
Step 301, according to the employed protocol requirement of system, the maximum occupation time of each transient state resource that exists in the initialization system be T1, T2 ... and in system, set a timer that recycles, the timer that herein recycles refers to: the timer timing to information trigger the beginning of next time working of timer automatically;
Step 302 during system start-up, starts timer simultaneously; System distributes each transient state resource according to the process needs, obtain and preserve when distributing each transient state resource pairing take starter system time T a1, Ta2,
Step 303, in system's running, the timer timing arrives, and system obtains current system time Tc immediately;
Step 304, calculate also the duration that takies respectively in the pairing reality of using of each transient state resource, also promptly: current system time Tc with take starter system time T a1, current system time Tc with take starter system time T a2 ... time difference, judge these transient state resources respectively actual take duration whether surpassed its maximum occupation time T1 that has set, T2 ... if, execution in step 305, otherwise, occupied transient state resource is not dealt with, make it continue to be used;
Step 305 is judged actually to take duration surpass to set the pairing transient state resource of maximum occupation time be death resource, discharges this death resource, and removes that this death resource of preserving is pairing to take the starter system time.
In embodiment three, set a timer in the system, start timer during system start-up, utilize timer time to for whether the trigger condition check system exists death resource, and discharge death resource.The method for releasing of this death resource can in time detect and have death resource in the system, and discharges death resource.This method reliability is higher.
Embodiment four:
As shown in Figure 4, the method for releasing of the death resource of the embodiment of the invention four may further comprise the steps:
Step 401, according to requirement of system design, after the ruuning situation of each process in this system analyzed, the maximum occupation time of unique transient state resource is T1 in the initialization system, and in system, set a timer that recycles, the timer that herein recycles refers to: in that the transient state resource is actual when taking duration less than this transient state resource settings maximum occupation time, the timer timing to information trigger the beginning of next time working of timer automatically;
Step 402, system distributes the transient state resource according to the process needs, when distributing the transient state resource, starts timer, and obtains and preserve the pairing starter system time T a1 that takies when distributing this transient state resource;
Step 403, in system's running, when the timer timing arrives, system obtains current system time Tc immediately;
Step 404, calculate current system time Tc and the time difference that takies starter system time T a1, obtain the actual duration that takies of this transient state resource, that judges this transient state resource actually takies the maximum occupation time T1 whether duration has surpassed its setting, if, execution in step 405, otherwise, occupied transient state resource is not dealt with, make it continue to be used;
Step 405 judges that this transient state resource is a death resource, discharges this death resource, and remove to preserve take starter system time T a1.
In the above-described embodiments, be set with a timer in the system, when carrying out resource allocation, system starts timer, utilize timer time to whether having death resource for the trigger condition check system, and release death resource, the method for releasing of this death resource can in time detect and have death resource in the system, and discharges death resource.This method reliability is higher.
Illustrate a bit: if there are a plurality of transient state resources in the system, system can all set the timer of a correspondence to each transient state resource, when some transient state resources are assigned with, its corresponding timer starts, utilize this timer time to checking for trigger condition whether the pairing transient state resource of this timer is death resource, and the release death resource, when some transient state resources were d/d, its corresponding timer quit work.
In the present embodiment, also there is a kind of special form, if the timing of timer is set to the longest duration that takies of corresponding transient state resource, then the timer timing arrives, corresponding transient state resource actual takies the timing that duration is exactly a timer, also promptly in the moment that the timer timing arrives, its corresponding current system time of transient state resource is exactly the timing of timer with taking the time difference of starter system time.If the timer timing arrives, corresponding transient state resource is also occupied, and the actual duration that takies that this transient state resource is described is greater than this transient state resource settings maximum occupation time, and this transient state resource is a death resource, directly discharges.
In another embodiment, in the system timer that recycles can only be set, this timer timing to information trigger the beginning of next time working of timer automatically.When carrying out first transient state resource allocation, start timer, utilize the timer timing,, then discharge this death resource if exist to for whether having death resource in the trigger condition check system.When all transient state resources all were not assigned with in the system, timer quit work.
Need to prove: in above-mentioned all embodiment,, when process initiation application transient state resource, obtain and preserve this transient state resource and carry out that the branch timing is pairing to take the starter system time if system operation is normal; When process finishes, discharge the shared transient state resource of this process immediately, and remove this transient state resource occupation starter system time of preserving.
Compared with prior art, the present invention has following remarkable advantage:
(1) made full use of that transient state resource maximum occupation time is the characteristic that can predict in the system, to the situation that system resource is hung handle, self-recovery and correction;
(2) can prevent generation because of problems such as telecommunication system resources that resource from suspending causes exhausts, disabler, network service interruption and system crashes;
(3) stability and the robustness of system have been improved.
Need to prove that also the method for releasing of the transient state resource that is proposed in the foregoing description is not limited only to real-time communication system, go in all communication systems.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (11)

1. the method for releasing of a death resource is characterized in that, this method comprises the steps:
The maximum occupation time of each transient state resource of default;
When system receives trigger message, calculate the actual duration that takies that each has distributed the transient state resource;
Actual when taking duration when existing greater than the transient state resource of this transient state resource settings maximum occupation time, judge that this transient state resource is death resource and discharges;
The described actual duration that takies of transient state resource that distributed obtains like this:
(b1) during system assignment transient state resource, obtain and write down that this transient state resource is pairing takies the starter system time;
(b2) trigger message is received by system, obtains system's real-time time of this moment;
(b3) the transient state resource is pairing to be taken the time difference of starter system between the time and was distributed the actual duration that takies of transient state resource distributing of being write down in computing system real-time time and the step (b1).
2. the method for claim 1 is characterized in that, the maximum occupation time of described each transient state resource is that system sets according to its employed agreement.
3. the method for claim 1 is characterized in that, the maximum occupation time of described each transient state resource is a system by to after wherein the ruuning situation of each process is analyzed, and uses the situation of transient state resource to set according to each process.
4. the method for claim 1 is characterized in that, the maximum occupation time of described each transient state resource is that system sets according to the configuration of software and hardware.
5. the method for claim 1 is characterized in that, described trigger message is that system carries out resource and newly divides timing unsuccessful information.
6. the method for claim 1 is characterized in that, described trigger message is to set one in the system to follow the overhaul period, newly once follows the inspection information of the zero hour.
7. the method for claim 1 is characterized in that, described trigger message is the information that the timer timing set in the system arrives.
8. method as claimed in claim 7, it is characterized in that, described timer is one by default, and it is moment in system start-up constantly that described timer starts work for the first time, and current timer timing to information trigger next time timer automatically and start working.
9. method as claimed in claim 7, it is characterized in that, described timer is one by default, it is the moment of carrying out resource allocation in system for the first time constantly that described timer starts work for the first time, and current timer timing to information trigger next time timer automatically and start working.
10. method as claimed in claim 7, it is characterized in that, described timer is by default, each transient state resource is all set corresponding timer, described timer startup work be constantly this timer of system assignment moment of corresponding transient state resource, and when this transient state resource is actual when taking duration less than this transient state resource settings maximum occupation time, current timer timing to information trigger next time timer automatically and start working, described timer quits work when the transient state resource discharges being assigned with of correspondence.
11. method as claimed in claim 10 is characterized in that, the timing of described timer is set to the maximum occupation time of corresponding transient state resource.
CN200610092219A 2006-06-14 2006-06-14 Release method for death resource Expired - Fee Related CN101090511B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200610092219A CN101090511B (en) 2006-06-14 2006-06-14 Release method for death resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200610092219A CN101090511B (en) 2006-06-14 2006-06-14 Release method for death resource

Publications (2)

Publication Number Publication Date
CN101090511A CN101090511A (en) 2007-12-19
CN101090511B true CN101090511B (en) 2010-05-12

Family

ID=38943630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200610092219A Expired - Fee Related CN101090511B (en) 2006-06-14 2006-06-14 Release method for death resource

Country Status (1)

Country Link
CN (1) CN101090511B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471869B (en) * 2007-12-27 2011-04-20 华为技术有限公司 Method, system and device for processing session
CN101730247B (en) * 2008-10-29 2012-04-04 华为技术有限公司 Method and device for releasing semi-static scheduling resources and user equipment
CN102026292B (en) * 2009-09-18 2013-11-06 华为技术有限公司 Resource management method and equipment
CN107967181B (en) * 2017-12-19 2021-11-16 北京小米移动软件有限公司 Method and device for controlling critical section

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708141A (en) * 2004-06-08 2005-12-14 华为技术有限公司 Method for realeasing terminal resource in media gateway
CN1761357A (en) * 2004-10-15 2006-04-19 华为技术有限公司 Method for implementing timing verification of calls between bureaus based on IP of packet

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708141A (en) * 2004-06-08 2005-12-14 华为技术有限公司 Method for realeasing terminal resource in media gateway
CN1761357A (en) * 2004-10-15 2006-04-19 华为技术有限公司 Method for implementing timing verification of calls between bureaus based on IP of packet

Also Published As

Publication number Publication date
CN101090511A (en) 2007-12-19

Similar Documents

Publication Publication Date Title
CN101894088A (en) Method and device for solving conflict of multiple hosts on I2C bus
CN103001722A (en) Data transmission method based on time triggered Ethernet and node device
CN101090511B (en) Release method for death resource
CN111209110B (en) Task scheduling management method, system and storage medium for realizing load balancing
CN112416969B (en) Parallel task scheduling system in distributed database
CN109218232B (en) Method, equipment and system for realizing Mux machine
CN101783846A (en) Charging service processing method and charging gateway
CN102244669A (en) Software upgrading method in stacking equipment and stacking equipment
CN108549550A (en) A kind of hard disk hanging method and device
CN108984195B (en) Software upgrading method and device
CN100521603C (en) Method for realizing high-usability of network security equipment under cluster mode
US20200136912A1 (en) Method, Device, and System for Implementing MUX Machine
CN103152420B (en) A kind of method avoiding single-point-of-failofe ofe Ovirt virtual management platform
CN101848157A (en) Method for controlling generation of routing update message and network equipment thereof
CN102291303B (en) Single board and method for determining primary and standby states for the same
US20080151892A1 (en) Method, Copumter Program Product, and Apparatus for Providing Passive Automated Provisioning
CN100456698C (en) Base station starting method
CN101895519A (en) Service processing method and device
CN108616461B (en) Policy switching method and device
CN1323351C (en) Method for implementing a flow state machine
CN102958198A (en) Abnormality processing method for RAB (radio access bearer) release request and RNC (radio network controller)
CN101826988A (en) Dynamic service upgrading method, equipment and system
CN116980421B (en) Method, device and equipment for processing tangential flow CPU resource surge under blue-green deployment
CN110519390A (en) A kind of low-power consumption bluetooth controller link layer implementation method
US6130877A (en) Rate controlled broadcast for activation of entities in large scale data networks

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: 20100512

Termination date: 20130614