CN101847115B - Method capable of monitoring own system resources and electric device - Google Patents

Method capable of monitoring own system resources and electric device Download PDF

Info

Publication number
CN101847115B
CN101847115B CN200910130020XA CN200910130020A CN101847115B CN 101847115 B CN101847115 B CN 101847115B CN 200910130020X A CN200910130020X A CN 200910130020XA CN 200910130020 A CN200910130020 A CN 200910130020A CN 101847115 B CN101847115 B CN 101847115B
Authority
CN
China
Prior art keywords
work
resource
default value
functional module
electronic installation
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
CN200910130020XA
Other languages
Chinese (zh)
Other versions
CN101847115A (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.)
MStar Software R&D Shenzhen Ltd
MStar Semiconductor Inc Taiwan
Original Assignee
MStar Software R&D Shenzhen Ltd
MStar Semiconductor Inc Taiwan
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 MStar Software R&D Shenzhen Ltd, MStar Semiconductor Inc Taiwan filed Critical MStar Software R&D Shenzhen Ltd
Priority to CN200910130020XA priority Critical patent/CN101847115B/en
Publication of CN101847115A publication Critical patent/CN101847115A/en
Application granted granted Critical
Publication of CN101847115B publication Critical patent/CN101847115B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method capable of monitoring own system resources and an electric device, which can monitor if the system resources are exhausted. The system executes a first work and a second work. The method comprises that the first completion frequency of the first work and the second completion frequency of the second work are counted and that if the system resources are exhausted can be judged according to the first completion time and the second completion time.

Description

But a kind of method of monitoring own system resources and electronic installation
Technical field
But the present invention relates to the electronic installation of method and monitoring own system resources of the resource of a kind of monitoring one system, refer to method and electronic installation that number of times that a kind of work that utilizes system's different priorities is performed comes the surveillance resource whether to be exhausted especially.
Background technology
In infosystem, system once must handle a plurality of work, the notion of so-called multitask just usually; In this case, each job family is split into the little operation interval of different numbers, and each is operated in, and be performed behind a bit of operation interval can be initiatively or the passive system resource that discharges; Other work can be performed; But, make that whole multitask program is compelled to suspend because some factor (for example program gets into infinite circulation or the like) might cause system resource to be taken for a long time by a certain work; Even system works as machine, and this phenomenon is referred to as system resource and exhausts.
For whether the detecting system resource exhausts; Known techniques usually adopts three kinds of methods: first method is that to find priority level initializing be minimum work; If this work is not performed fully in a setting-up time; Judge that then system resource is exhausted by other work, though the method is simple, shortcoming is to judge being that which work causes system resource to exhaust actually; Second method is to utilize logic analyser (LogicAnalyzer) to receive each general input and output (General Purpose Input/Output in the system; GPIO) pin; It is to cause system resource to exhaust when carrying out which work that the change of keeping watch on each GPIO pin voltage quasi position when execution work is found out; Because the GPIO pin is numerous in the system, it is a very complicated job that these pins are connected to logic analyser; The third method is that to utilize software program to monitor that the practice condition of each work when being performed find out be that which work has occupied system resource; Retouching operation system (Operation System) for example; Information when the each work of record is switched; The shortcoming of the method is the burden that can increase OS, because OS need carry out extra work, so overall efficiency can be relatively poor.
Summary of the invention
But technical matters to be solved by this invention provides a kind of method and electronic installation of monitoring own system resources, but whether the surveillance resource is exhausted.
In order to solve above technical matters, the invention provides a kind of.
The invention provides a kind of method of supervisory system resource, this system carries out one first work and one second work, and this method includes: add up one first of this first work and accomplish number of times; Add up one second of this second work and accomplish number of times; And first accomplish number of times and this second and accomplish number of times and judge whether the resource of this system is exhausted according to this.
The present invention also provides a kind of method of supervisory system resource, and this system carries out one first work and one second work, and this method includes: one first of this first work of statistics accomplishes number of times in a schedule time; One second of this second work of statistics accomplishes number of times in this schedule time; And first accomplish number of times and judge with this second completion number of times whether the resource of this system is exhausted according to this.
At last, the invention provides a kind of electronic installation with monitoring own system resources, include: one first functional module is used for carrying out one first work; One second functional module is coupled to this one first functional module, is used for carrying out one second work; Wherein this first functional module judges according to one first completion number of times of this first work and one second completion number of times of this second work whether the system resource of this electronic installation is exhausted.
But the method and the electronic installation of the monitoring own system resources that the present invention adopts; Mutual monitoring by each workplace; Monitor the practice condition of each work by connecting external instrument, saved the online engineering of complicated hardware, also need not take the resource of operating system; Overall operation usefulness is kept same grade; Because have certain priority relationship or cause-effect relationship between each work, therefore as long as keep watch on the lower work of priority with the higher work of priority, just can find out is that which work exhausts system resource.
Description of drawings
Fig. 1 monitors the first embodiment synoptic diagram of the method for a system resource for the present invention.
Fig. 2 monitors the synoptic diagram that two different workplaces in the method for a system resource are carried out relation each other for the present invention.
Fig. 3 monitors the second embodiment synoptic diagram of the method for a system resource for the present invention.
Fig. 4 monitors the 3rd embodiment synoptic diagram of the method for a system resource for the present invention.
Fig. 5 has the calcspar of the electronic installation 40 of monitoring own system resources for the present invention.
Fig. 6 is that first work and global position system are judged the process flow diagram whether resource has exhausted.
Fig. 7 is second workflow diagram.
[primary clustering symbol description]
10,20,30 systems
40 electronic installations
41,42 functional modules
70~74,600~665 steps
Embodiment
Please refer to Fig. 1; Fig. 1 is the first embodiment synoptic diagram of the present invention's method of monitoring a system resource; System 10 carries out first work and second work simultaneously, has certain relevance between first work and second work, when for example the completion number of times of first work reaches first default value; The completion number of times of second work must reach second default value, and this kind concerns the design of visible system 10 and decide.Therefore; The completion number of times of statistics first work and the completion number of times of second work are just known the degree that this two work is accomplished; If the completion number of times of first work has reached first default value; And the completion number of times of second work does not reach second default value, then can know system's 10 resources by inference to have exhausted, so second work can't be reached the former completion number of times that should accomplish.For instance, if first default value is n and second default value is 1, and n is the integer more than or equal to 1; As shown in Figure 2; When the first work A accomplished n time, the second work B need accomplish 1 time in theory, and in fact during system's 10 execution multitasks; System is that the first work A mixes execution with the second work B, that is carries out the second work B at the neutral gear that the first work A carries out.If the priority of the hypothesis first work A is higher than the second work B; Then when the second work B generation problem causes system's 10 resources to be exhausted; The first work A is because of the relation of execution priority prior to the second work B, and system 10 is at real time operating system (real-time operating system; RTOS) (context switch) can preferentially carry out the first work A during switch operating; That is the completion number of times of working as the first work A still can reach first tolerant value n; And the second work B be can't be reached original predetermined second default value of reaching 1 time because of system's 10 resources exhaust, and in other words, accomplishes number of times and reached first default value if system 10 monitors first of first work; And the second completion number of times of second work does not reach second default value, can judge that then system's 10 resources exhaust.
Please refer to Fig. 3; Fig. 3 is the second embodiment synoptic diagram of the present invention's method of monitoring a system resource; As shown in the figure, if system's 20 multitasks carry out a plurality of work, then can successively sort and keep watch on the lower work of priority by the higher work of priority according to each workplace priority with the serial connection mode; For example; If the priority of first work is worked greater than the 3rd greater than the priority of second work and second work, then according to the described method of first embodiment, system 20 can judge whether the resource of this system is exhausted by second work according to the relative completion number of times of this first work and this second work; Same; System 20 can judge whether the resource of this system is exhausted by the 3rd work according to the relative completion number of times of this second work and the 3rd work; By that analogy, its performed all working can be kept watch on by system 20, and finds out the work that causes system's 20 resource exhaustions.
Complexity according to system; Its performed work maybe be only with simple serial connection relation expression; Please refer to Fig. 4, Fig. 4 is the 3rd an embodiment synoptic diagram of the present invention's method of monitoring a system resource, and system 30 carries out a plurality of work; The priority relativeness of these a plurality of workplaces is complicated; Need with series connection with parallelly connected hybrid representation, wherein series relationship is represented to implement the lower work of priority in regular turn by the higher work of priority, the work after also can keeping watch in the series relationship by work more preceding in the series relationship; And the priority of parallel connection relation expression two work equates or two work are independent mutually; Two work can be kept watch on by the higher work of connected priority simultaneously under this situation; For example; The 3rd work can be kept watch on by second work with the 4th work simultaneously, and second work and the 5th work or the like are then kept watch in first work simultaneously.
Aforesaid embodiment also can change more use a little; For example with the concept introduction of frequency; Set a schedule time earlier; And in this schedule time this first work of statistics one first accomplish number of times, then in this schedule time, one second of this second work of statistics accomplish number of times, judge according to the completion number of times of this first work and this second completion number of times of working whether the resource of this system is exhausted at last; That is utilize the proportionate relationship of the frequency that first work finishes the work with second workplace to come the resource of surveillance whether to be exhausted.For instance; Suppose that satellite positioning device generally can whenever can measure the parameter of a satellite-signal (being made as first work) in 0.1 second, calculated once the position and the speed (being made as second work) of this satellite positioning device in per 1 second, then be made as the schedule time with 1 second; In the given time; First work needs complete 10 times and second work needs to accomplish 1 time, therefore if first work is accomplished 10 times and second work is accomplished less than 1 time in 1 second, can judge that then system resource is exhausted.
Please refer to Fig. 5, Fig. 5 is the calcspar that the present invention has the electronic installation 40 of monitoring own system resources, and electronic installation 40 includes one first functional module 41, is used for carrying out one first work; One second functional module 42 is coupled to this one first functional module, is used for carrying out one second work, and wherein this first functional module judges according to the completion number of times of this first work and this second work whether the system resource of this electronic installation is exhausted.As previously mentioned; Have certain relevance between first work and second work, therefore can first work judge with the completion number of times of second work whether the system resource of this electronic installation is exhausted, and is example with the satellite positioning device; Because having one, satellite positioning device measures engine (Measurement Engine); Measured the parameter of a satellite-signal in per 0.1 second, and a location engine (Position Engine), calculating in per 1 second is the position and the speed of this satellite positioning device once; Therefore can set this measurement engine is first functional module 41; And this location engine is second functional module 42, and the method for the supervisory system resource of application of aforementioned can have the function of monitoring own system resources, repeats no more at this.Same, also can comprise the more function module in the electronic installation 40, reach the purpose of each workplace mutual monitoring with the serial or parallel connection mode.
Please refer to the 6th, 7 figure, the 6th, 7 figure are process flow diagrams that the method for supervisory system resource of the present invention is applied in global position system, and wherein Fig. 6 is that first work and global position system are judged the process flow diagram whether resource has exhausted, and Fig. 7 is the process flow diagram of second work.Do not have only two need execution works in the global position system; Lifting the measurement engine at this is first work; Location engine is that second work is example, and all the other other engines are as timing engine (Timer Engine), signal acquisition engine (Acquisition Engine) or the like can the rest may be inferred.In addition, this process flow diagram is n with first default value, and second default value is 1 to illustrate.Please earlier with reference to figure 7, its process step is explained as follows:
Step 70: global position system begins to carry out second work, execution in step 71;
Step 71: global position system is carried out index (Running_flag) with inside second work and is made as 1, execution in step 72;
Step 72: location engine begins to calculate the Position And Velocity of satellite positioning device, execution in step 73;
Step 73: judge whether location engine finishes whole calculating of the Position And Velocity of required calculating, if, execution in step 74; If not, rebound step 72 then;
Step 74: finish second work, global position system is carried out index with second work and is made as 0.
Please again with reference to figure 6, its process step is explained as follows:
Step 600: system initial (Initialization), execution in step 605;
Step 605: reset (Reset) carries out time counter, makes the counting value returns of carrying out time counter, execution in step 610;
Step 610: global position system begins to carry out first work, execution in step 615;
Step 615: global position system is carried out index with inside with first work and is made as 1, execution in step 620 and step 645;
Step 620: measure the parameter that engine begins to measure satellite-signal, execution in step 630;
Step 630: judge that the work whether other higher-priority is arranged in the global position system need handle, if skip to step 640; If not, execution in step 635;
Step 635: whether first work of judging is finished, if, execution in step 640; If not, skip to step 610;
Step 640: global position system be because must carry out other work or first work has been performed and finishes, and therefore interrupts or finishes first work, and the first execution index of working is made as 0, and rebound step 600 is carried out flow process again;
Step 645: it is 1 that index is carried out in second work that judges whether, can know that by the explanation of Fig. 7 when second work had in execution, index is carried out in second work can be set as 1, skips to step 655; If second work is not in execution or executed finishes, index is carried out in second work can be set as 0, continues execution in step 650;
Step 650: reset and carry out time counter, make the counting value returns of carrying out time counter, continue to carry out first work, skip to step 620;
Step 655: work this moment first has been performed 1 time, adds 1, execution in step 660 so carry out time counter;
Step 660: the count value that judges whether to carry out time counter is greater than n; Because this process flow diagram is n with first default value, second default value is 1 to illustrate, therefore if the count value of carrying out time counter greater than n; Expression first work has been performed n time and second work still in commission (second work execution index still be 1); That is second work accomplish once as yet, so execution in step 665 judges that system resource is exhausted; Be not more than n if carry out the count value of time counter, number no show still first tolerant value n is accomplished in expression first work, therefore skips to step 620.
Please note; Though be n with first default value in the foregoing description; Second default value is 1 to illustrate, and does not exceed with this numeral yet in fact use, and knows art in this area and all can make simple change and extend to other numerical scale with the know-why that the present invention discloses; This still belongs to the category that the present invention discloses, and does not repeat them here.
Only the above person is merely preferred embodiment of the present invention, and when not limiting the scope that the present invention implements with this, the equivalence of promptly being done according to claim of the present invention and description of the invention content changes and modifies, and all belongs to the scope that patent of the present invention possibly contain.

Claims (13)

1. the method for a supervisory system resource, this system are carried out one first work and one second work, and the execution priority system of this first work is higher than the execution priority of this second work, it is characterized in that this method includes:
Add up one first of this first work and accomplish number of times;
Add up one second of this second work and accomplish number of times; And
When this first is accomplished number of times and reach one first default value, and this judges that the resource system of this system is exhausted second when accomplishing number of times and not reaching one second default value as yet in the same time.
2. the method for supervisory system resource as claimed in claim 1 is characterized in that, this first default value system is more than or equal to this second default value.
3. the method for supervisory system resource as claimed in claim 1 is characterized in that, it includes in addition:
Carry out one the 3rd work; And according to this second work and the 3rd work relative completion number of times judge whether the resource of this system is exhausted; Wherein the execution priority system of this first work, second work and the 3rd work is higher than this second work for this first work, and this second work is higher than the 3rd work.
4. the method for supervisory system resource as claimed in claim 1 is characterized in that, this systems is the system of a satellite positioning device.
5. the method for a supervisory system resource, this system are carried out one first work and one second work, and the execution priority system of this first work is higher than the execution priority of this second work, it is characterized in that this method includes:
One first of this first work of statistics accomplishes number of times in a schedule time;
One second of this second work of statistics accomplishes number of times in this schedule time; And
When this first accomplish that number of times reaches one first default value and this second when accomplishing number of times and not reaching one second default value as yet, judge that the resource system of this system is exhausted.
6. the method for supervisory system resource as claimed in claim 5 is characterized in that, this first default value system is more than or equal to this second default value.
7. the method for supervisory system resource as claimed in claim 5 is characterized in that, it includes in addition:
Carry out one the 3rd work; One the 3rd of statistics the 3rd work accomplishes number of times in this schedule time; And second accomplish the proportionate relationship that number of times and the 3rd accomplishes number of times and judge whether the resource of this system is exhausted according to this; Wherein the execution priority system of this first work, second work and the 3rd work is higher than this second work for this first work, and this second work is higher than the 3rd work.
8. the method for supervisory system resource as claimed in claim 5 is characterized in that, this systems is the system of a satellite positioning device.
9. the electronic installation with monitoring own system resources is characterized in that, includes:
One first functional module is used for carrying out one first work;
One second functional module is coupled to this one first functional module, is used for carrying out one second work;
The execution priority system of this first work is higher than the execution priority of this second work;
When the completion number of times of this first work reaches one first default value, and the completion number of times of this second work is not when reaching one second default value as yet in the same time, and then this first functional module judges that the system resource of this electronic installation is exhausted.
10. the electronic installation with monitoring own system resources as claimed in claim 9 is characterized in that, this first default value system is more than or equal to this second default value.
11. the electronic installation with monitoring own system resources as claimed in claim 9 is characterized in that, this electronic installation system is a satellite positioning device.
12. the electronic installation with monitoring own system resources as claimed in claim 11; It is characterized in that; This first functional module system is a measurement engine (Measurement Engine); Be used for measuring the parameter of satellite-signal, and this second functional module system is a location engine (Position Engine), is used for position and speed according to this this satellite positioning device of calculation of parameter.
13. the electronic installation with monitoring own system resources as claimed in claim 9 is characterized in that, more includes:
One the 3rd functional module is coupled to this second functional module, is used for carrying out one the 3rd work;
Wherein this second functional module judges according to the relative completion number of times of this second work and the 3rd work whether the system resource of this electronic installation is exhausted; The priority system of this first work, second work and the 3rd work is that first work is higher than second work, and second work is higher than the 3rd work.
CN200910130020XA 2009-03-26 2009-03-26 Method capable of monitoring own system resources and electric device Expired - Fee Related CN101847115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910130020XA CN101847115B (en) 2009-03-26 2009-03-26 Method capable of monitoring own system resources and electric device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910130020XA CN101847115B (en) 2009-03-26 2009-03-26 Method capable of monitoring own system resources and electric device

Publications (2)

Publication Number Publication Date
CN101847115A CN101847115A (en) 2010-09-29
CN101847115B true CN101847115B (en) 2012-10-31

Family

ID=42771740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910130020XA Expired - Fee Related CN101847115B (en) 2009-03-26 2009-03-26 Method capable of monitoring own system resources and electric device

Country Status (1)

Country Link
CN (1) CN101847115B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6520962B2 (en) * 2017-01-18 2019-05-29 トヨタ自動車株式会社 Monitoring system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1740973A (en) * 2004-08-23 2006-03-01 中兴通讯股份有限公司 A real-time task management and scheduling method
CN1898651A (en) * 2003-12-23 2007-01-17 株式会社Ntt都科摩 Performing checks on the resource usage of computer programs
US7178146B1 (en) * 2002-03-26 2007-02-13 Emc Corporation Pizza scheduler

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7178146B1 (en) * 2002-03-26 2007-02-13 Emc Corporation Pizza scheduler
CN1898651A (en) * 2003-12-23 2007-01-17 株式会社Ntt都科摩 Performing checks on the resource usage of computer programs
CN1740973A (en) * 2004-08-23 2006-03-01 中兴通讯股份有限公司 A real-time task management and scheduling method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开平10-63517A 1998.03.06

Also Published As

Publication number Publication date
CN101847115A (en) 2010-09-29

Similar Documents

Publication Publication Date Title
CN102722434B (en) Performance test method and tool aiming at Linux process scheduling
CN101847123B (en) Construction method of airborne computer software testing general system
Zhang et al. Design of the data acquisition system based on STM32
CN101853200B (en) High-efficiency dynamic software vulnerability exploiting method
CN105446885A (en) Regression testing case priority ranking technology based on needs
CN104182332A (en) Methods and devices for judging resource leakage and predicting resource use conditions
CN102541942B (en) Data bulk transfer system and method thereof
CN106919462A (en) A kind of method and device for generating processor fault record
CN104035747A (en) Method and device for parallel computing
CN101847115B (en) Method capable of monitoring own system resources and electric device
Sharma et al. Performance evaluation of real-time systems
CN101021721A (en) Three-bus structure-based intelligent monitoring unit special integrated circuit
CN103186447B (en) Bus read-write detection device
CN103677991A (en) Task execution method based on single chip microcomputer system framework and single chip microcomputer system framework
Nahas et al. Ways for implementing highly-predictable embedded systems using time-triggered co-operative (TTC) architectures
TWI486762B (en) Method of monitoring system resource and electronic device capable of monitoring system resource
CN112465281A (en) Stability control strategy prejudging method under real-time power system scene
Elsayed et al. An optimal transition-based recovery policy for controlling deadlock within flexible manufacturing systems using graph technique
Calvez et al. Performance monitoring and assessment of embedded HW/SW systems
CN103677849B (en) Embedded software credibility guaranteeing method
CN114239538A (en) Assertion processing method and device, computer equipment and storage medium
Salmon et al. Scheduling real-time systems with periodic tasks using a model-checking approach
Kapur et al. A new insight into software reliability growth modeling
CN104698929B (en) Take the real-time control method of control intelligent electric energy meter
CN103927157A (en) Method for building distributed computing system entity

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121031

Termination date: 20190326