CN101169791A - Sharing chained list error detection method and system - Google Patents

Sharing chained list error detection method and system Download PDF

Info

Publication number
CN101169791A
CN101169791A CNA200710178612XA CN200710178612A CN101169791A CN 101169791 A CN101169791 A CN 101169791A CN A200710178612X A CNA200710178612X A CN A200710178612XA CN 200710178612 A CN200710178612 A CN 200710178612A CN 101169791 A CN101169791 A CN 101169791A
Authority
CN
China
Prior art keywords
chained list
list item
list
magic number
item
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
CNA200710178612XA
Other languages
Chinese (zh)
Other versions
CN100547595C (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.)
Beijing Zhigu Tech Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CNB200710178612XA priority Critical patent/CN100547595C/en
Publication of CN101169791A publication Critical patent/CN101169791A/en
Application granted granted Critical
Publication of CN100547595C publication Critical patent/CN100547595C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an error detection method for a shared chained list and a system thereof. When releasing chained list entries, the method comprises detecting whether the memory space released by a memory unit has the chained list entries, and if yes, reporting error. When releasing the chained list entries, the invention can detect whether the entries are removed from the chained list and report error, so as to found the error from the source, omit subsequent error checking, and save time and manpower.

Description

A kind of shared chained list error detection method and system
Technical field
The present invention is about device management techniques, especially in regard to a kind of shared chained list error detection method and system.
Background technology
At present, along with communication and development of computer network, each enterprise buys and uses more and more equipments, for example, and web server computer, network switch workstation, router, terminal server; Telephone exchange, telephone terminal; Telecommunication transmission equipment such as PCM multiplex equipment, fiber optic, carrier terminal equipment, microwave machine etc.
Need simultaneously these equipment are managed.Equipment control just is meant to be monitored various device operation conditions, various working environment, allows management platform handle many intermediate links, and simplification work, minimizing managerial personnel workload reduce the equipment failure reaction time, improve equipment operating efficiency.
At present, the server by management platform in the prior art manages equipment, carries out equipment control as calling the management software system that is stored in the storer by the processor in the server.And, in modular management software system, shared data structure between the module is often arranged, particularly in built-in field, system performance is very important, in order to realize high-performance, sometimes several modules are merged, shared memory space is to obtain faster speed.Therefore, each module needs shared data structure, and chained list is exactly a data structure that is in daily use.Below to use chained list to describe as example.
For example, in equipment control: administrative unit 1 management all devices, set up an equipment chained list, be responsible for traversal and check all devices.Administrative unit 2 management categories are the equipment of a, when increasing an a kind equipment this equipment are added in equipment chained list, delete in this a kind equipment slave unit chained list when certain a kind equipment of deletion.Administrative unit 3 management categories are the equipment of b, when increasing a b kind equipment this equipment are added in equipment chained list, delete in this b kind equipment slave unit chained list when certain b kind equipment of deletion.
If the said equipment chained list is a doubly linked list, be illustrated in figure 1 as the doubly linked list synoptic diagram.Wherein, doubly linked list head 100, list item 1, list item 2, list item 3, list item 4, list item 5, above-mentioned each list item is stored in the same storer.In Fig. 1, each list item of chained list has leading and follow-up, and as shown in Figure 1, solid line points to the follow-up of this list item, and dotted line points to the leading of this list item.For example, the leading of list item 2 is list item 1, and follow-up is list item 3.The traversing operation of chained list is exactly from doubly linked list head 100, visits successively that it is follow-up.As traversal among Fig. 1 then is to visit list item 1-successively〉list item 2-〉list item 3-〉list item 4-〉list item 5.
With chained list shown in Figure 1 problems of the prior art are described below.In Fig. 1, suppose that first administrative unit manages all list items, comprise list item 1, list item 2, list item 3, list item 4 and list item 5, main these list items of traversal visit of being responsible for, the second administrative unit control table entry 1, list item 2, the 3rd administrative unit control table entry 3, the four administrative unit control table entries 4, list item 5.At this moment, if the 3rd administrative unit discharges list item 3, the memory headroom of list item 3 correspondences has not belonged to the control of the 3rd administrative unit like this, but this moment is owing to various possible reasons, make this list item 3 also be present in the chained list, still return the management of first administrative unit, at this moment, have a list item that has discharged in the chained list.
As shown in Figure 2, the memory headroom of list item 3 may be used as its usefulness owing to be released, and causes its leading and follow-up confusion.At this moment, if first administrative unit is carried out traversing operation to chained list, visited and can continue visit behind the list item 2 it is follow-up, promptly list item 3, but because list item 3 has been released, this list item 3 is wrong (then claiming list item 3 to be that fault produces point), can't continue to visit list item 4 after visit this list item 3, and traveling through this moment then can confusion, can cause the whole software system crash, can cause whole management equipment to die like this, need reset, the content that this management equipment was handled at that time also will all be lost.
Though above-mentioned software systems collapse is to be caused by the 3rd administrative unit, but its collapse is to produce (this operation is to be initiated by first administrative unit) in traversing operation, can't know which administrative unit this wrong list item 3 belonged to originally this moment, because first administrative unit is responsible for the traversal visit, not responsible its faulty operation, and might be the maloperation of second administrative unit, the 3rd administrative unit or the 4th administrative unit, therefore can not from fault, directly find reason.Like this, just need spend the plenty of time correlative code (because this chained list is shared by these 3 administrative units) of second, third and the 4th administrative unit that goes to attend a day school, need in these 3 administrative units, increase debugging code, reappear fault, find out root, spend a large amount of manpowers and time.
Summary of the invention
Whether fundamental purpose of the present invention is to provide a kind of shared chained list error detection method, when discharging the chained list list item, report an error from the chained list excision by detecting the chained list list item, need not follow-up debugging, saves time and manpower.
The present invention also aims to provide a kind of equipment management system, when discharging the chained list list item, whether this system can detect this chained list list item and report an error from the chained list excision, has solved problems of the prior art.
To achieve these goals, the invention provides a kind of shared chained list error detection method, when discharging the chained list list item, the method comprising the steps of: detect in the memory headroom that this storage unit discharges whether described chained list list item is arranged; If the result who detects then quotes mistake, to know the chained list list item of makeing mistakes for described chained list list item is arranged.
To achieve these goals, the present invention also provides a kind of equipment management system, and this system comprises: storage unit is used to store the chained list list item; Administrative unit is connected with described storage unit, when discharging the chained list list item, whether described administrative unit is used for detecting the memory headroom that described storage unit discharges described chained list list item, if the result who detects then quotes mistake, to know the chained list list item of makeing mistakes for described chained list list item is arranged.
Whether beneficial effect of the present invention is when discharging the chained list list item, report an error from the chained list excision by detecting the chained list list item, thereby can need not follow-up debugging from the above-mentioned mistake of root discovery, has saved time and manpower.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, does not constitute limitation of the invention.In the accompanying drawings:
Fig. 1 is a doubly linked list synoptic diagram in the prior art;
Fig. 2 is that the list item 3 among Fig. 1 is released back traversing operation synoptic diagram;
Fig. 3 is a present device management system structural representation;
Fig. 4 is that the present invention shares the chained list error detection method process flow diagram;
Fig. 5 A is an embodiment of the present invention page table structure synoptic diagram;
Fig. 5 B is page or leaf, page table and the interrelated synoptic diagram of bitmap;
Fig. 6 is that the chained list list item inserts process flow diagram when adopting the record sheet of Fig. 4;
Fig. 7 is that the chained list list item discharges process flow diagram when adopting the record sheet of Fig. 4;
Fig. 8 is chained list list item deletion process flow diagram when adopting the record sheet of Fig. 4;
Fig. 9 is that the chained list list item inserts process flow diagram when adopting the page table structure of Fig. 5 A;
Figure 10 is that the chained list list item discharges process flow diagram when adopting the page table structure of Fig. 5 A;
Figure 11 is a chained list list item deletion process flow diagram when adopting the page table structure of Fig. 5 A;
Figure 12 is the chain hoist pennants of one embodiment of the invention;
Figure 13 is a record sheet synoptic diagram when detecting;
Figure 14 is another record sheet synoptic diagram when detecting.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer,, embodiment of the present invention is described in further details below in conjunction with embodiment and accompanying drawing.At this, exemplary embodiment of the present invention and explanation thereof are used to explain the present invention, but not as a limitation of the invention.
Below in conjunction with accompanying drawing embodiments of the present invention are elaborated.
The invention provides a kind of equipment management system.As shown in Figure 3, be present device management system structural representation, as shown in Figure 3, this system comprises: storage unit 302 is used to store chained list list item (not shown); Administrative unit 301 is connected with storage unit 302, when discharging the chained list list item, whether administrative unit 301 is used for the memory headroom that detection of stored unit 302 discharged this chained list list item, if the result who detects then quotes mistake for the chained list list item is arranged, like this, can know the chained list list item of makeing mistakes.
From the above, when discharging the chained list list item, whether report an error by detecting this list item, thereby can find that above-mentioned mistake appear in which chained list, need not follow-up debugging, can save time and manpower from root from the chained list excision.And, in embodiment of the present invention, quote mistake and be meant to dish out and assert, make software out of service, to make things convenient for error detection.
In embodiment of the present invention, in the memory headroom that administrative unit 301 can come detection of stored unit 302 to be discharged according to the memory address of the magic number of this chained list list item correspondence that writes down in magic number that inserts the chained list list item and the record sheet whether this chained list list item is arranged.
When in chained list, inserting the chained list list item, the magic number of this chained list list item is set.In addition, in storage unit 302, set up the record sheet (not shown), write down the memory address of the magic number of this chained list list item.Like this, in storage unit 302, also store the record sheet (not shown), the magic number memory address of this chained list list item correspondence of record in this record sheet.
In embodiments of the present invention, magic number can be arbitrary value, as is 32bit, promptly can be the value of 4 bytes, also can be value of 8 bytes or the like.
In addition, also magic number can be provided with certain content, for example, the magic number of the chained list list item in the chained list is consistent with the magic number of this chained list.Like this, when a plurality of chained list, add infatuated number in advance on chained list, magic number divides by chained list, and each chained list has specific magic number, so that after knowing the chained list list item of makeing mistakes, magic number can be read from storage unit 302, fast the alignment error chained list.But be not limited thereto, also can in magic number, content corresponding be set according to specific circumstances.
In an embodiment of the invention, record sheet can adopt structure shown in Figure 4, directly writes down the memory address of the magic number on all list items that are inserted into chained list.For example, when inserting list item 1, at first this list item 1 is provided with magic number, and increases by one in record sheet, its value is the memory address of list item 1 magic number; In like manner, when inserting list item 2, this list item 2 is provided with magic number, in record sheet, increases by one again, memory address that its value is list item 2 magic numbers or the like.Like this, when discharging the chained list list item, search records table at first, whether the memory address of judging the magic number that is write down in this record sheet is in the memory headroom that storage unit 302 is discharged; If the result who judges is for being, then the memory headroom that discharged of storage unit 302 has this chained list list item, then reports an error, and can know the chained list list item of makeing mistakes like this.
When the magic number of chained list list item is consistent with the magic number of chained list, report an error know the chained list list item of makeing mistakes after, can find the magic number of this chained list list item correspondence according to the memory address of magic number, report an error according to this evil spirit number again, knowing the chained list of makeing mistakes, thus alignment error chained list fast.
In yet another embodiment of the present invention, when the memory headroom of storage unit 302 is divided according to page or leaf, page table structure shown in Fig. 5 A, memory address is corresponding with page or leaf, at this moment, record sheet can adopt the bitmap that is associated with this page, and this bitmap records the information relevant with the memory address of magic number, shown in Fig. 5 A.
For example the memory headroom of 32M may be partitioned into 8192 pages.A general page size is 4KByte, and each page or leaf can have 1024 magic numbers, uses the bitmap of a 1024bit to represent, shown in Fig. 5 A, the 32bit on the corresponding page or leaf of each on the bitmap is if this 32bit has magic number, then bitmap puts 1, if do not have, then bitmap puts 0.
When dividing memory headroom in the manner described above, each address of internal memory belongs in certain page or leaf naturally.For example, 0x100004 is many again 4 bytes of 1M, and 1M has 256 pages or leaves, then 0x100004 address just on the 256th page (according to the software programming custom, homepage is commonly referred to as the 0th page, because array indexing generally is 0 to begin).
Like this, when the chained list list item inserts, the magic number of chained list list item is set, on position corresponding on the bitmap, puts 1 according to the memory address of the magic number of this chained list list item.When discharging this chained list list item, the pairing bitmap scope of memory address of the magic number of the memory headroom correspondence that retrieval is discharged; Judge in the position in this bitmap scope whether set is arranged; If the result who judges is for having, then the memory headroom that discharged of storage unit 302 has this chained list list item.At this moment, quote mistake, to know the chained list list item of makeing mistakes.
When if a plurality of chained lists exist simultaneously, quoting after mistake knows the chained list list item of makeing mistakes, can find the memory address of magic number, finding corresponding magic number according to magic number memory address then according to the position that set is arranged, report an error according to this evil spirit number again, thus alignment error chained list fast.
In embodiments of the present invention, shown in Fig. 5 A, 5B, can adopt page table that page or leaf and bitmap are associated, page table and page or leaf are corresponding one by one, generally speaking, the position of page table is pre-set to be known, can find corresponding page table according to page address, finds corresponding bitmap according to the bitmap address that stores in the page table then.Shown in Fig. 5 A and Fig. 5 B, wherein, Fig. 5 B is page or leaf, page table and the interrelated synoptic diagram of bitmap (is example with 6 pages) in the embodiment of the present invention.
Therefore, find out its place page or leaf according to memory address, find the bitmap related with this page again by page table then, this bitmap records the information relevant with the memory address of magic number.Wherein, page table can be continuous array, and its position can configure, for known.Page or leaf of in the page table each correspondence, shown in Fig. 5 B, page table entry 0 corresponding page or leaf 0, page table entry 1 corresponding page or leaf 1 ...And also preserve in this page table and the related bitmap address of above-mentioned page or leaf, find corresponding bitmap, for example,, can find page table entry 5, and the bitmap of the page or leaf 5 of this page 5 correspondences is found in the bitmap address of reading and recording in page table for page or leaf 5 according to this bitmap address.
Be that example describes shared chained list error detection method of the present invention with equipment management system shown in Figure 3 below.
The invention provides a kind of shared chained list error detection method, when discharging the chained list list item, the method comprising the steps of: detect in the memory headroom that this storage unit 302 discharged whether this chained list list item is arranged; If the result who detects then quotes mistake, to know the chained list list item of makeing mistakes for this chained list list item is arranged.
Therefore, when discharging the chained list list item, whether report an error by detecting this list item, thereby can find above-mentioned mistake, need not follow-up debugging, saved time and manpower from root from the chained list excision.
In the above-described embodiment, detect and whether have this chained list list item can be in the following way in the memory headroom that this storage unit 302 discharged: according in the memory address of the magic number that writes down in the magic number that inserts the chained list list item and the record sheet or the memory headroom that the information relevant with the memory address of described magic number comes detection of stored unit 302 to be discharged whether the chained list list item being arranged.
Be that example is elaborated to detection method of the present invention at the record sheet shown in Fig. 4, Fig. 5 A respectively below.
The first, employing record sheet as shown in Figure 4.
Fig. 6 chained list list item when adopting the record sheet of Fig. 4 inserts process flow diagram; Fig. 7 is that the chained list list item discharges process flow diagram when adopting the record sheet of Fig. 4; Fig. 8 is a deletion chained list list item process flow diagram when adopting the record sheet of Fig. 4.
As shown in Figure 6, when inserting the chained list list item, can be in the following way:
Step 601 is inserted the chained list list item to chained list, and the magic number of this chained list list item is set; This evil spirit numerical value can be a 32bit, i.e. the value of 4 bytes, but be not limited thereto;
Step 602 records the memory address of the magic number of correspondence in the record sheet, promptly increases an item in record sheet, and its value is the memory address of magic number.
After inserting the chained list list item, if when unloading, do not delete this chained list list item for various reasons, and directly discharged the memory headroom that contains this chained list list item, then can detect by following manner.
As shown in Figure 7, step 701, search records table;
Whether step 702, the memory address of the magic number of judging in the record sheet to be write down be in the memory headroom that is discharged;
Step 703 has the chained list list item if the result who judges in the step 702 for being, illustrates in the memory headroom of release, then reports an error, with the chained list list item of knowing that this is made mistakes.
If a plurality of chained lists are when existing simultaneously, quoting after mistake knows the chained list list item of makeing mistakes, also can know which chained list makes mistakes by following steps, as shown in Figure 7:
Step 704 is obtained corresponding magic number according to the memory address of this evil spirit number;
Step 705 reports an error according to this evil spirit number, and the magic number that is about to this chained list list item correspondence reads out and reports an error, and like this, can know which chained list makes mistakes according to this evil spirit number.
Therefore, after inserting the chained list list item,, and directly discharged the memory headroom that contains this chained list list item if when unloading, do not delete this chained list list item for various reasons, then can detect the chained list list item of makeing mistakes by the way, and know that according to the magic number that is provided with which chained list makes mistakes.
In addition, also comprise step 706, if the result who judges in the step 702 illustrates and deleted this chained list list item when unloading that then internal memory discharges and finishes for not.
When adopting aforesaid way to insert the chained list list item, when this chained list list item of deletion, as shown in Figure 8, can be in the following way:
Step 801, deletion chained list list item, the magic number that this chained list list item is set is 0;
Step 802 is searched record sheet, and the memory address of this evil spirit number of correspondence is deleted from record sheet.
From the above, when adopting record sheet shown in Figure 4 to detect, method is simple, effective.
The second, the page table structure of employing shown in Fig. 5 A.
Fig. 9 is that the chained list list item inserts process flow diagram when adopting the page table structure of Fig. 5 A; Figure 10 is that the chained list list item discharges process flow diagram when adopting the page table structure of Fig. 5 A; Figure 11 is a deletion chained list list item process flow diagram when adopting the page table structure of Fig. 5 A.
As shown in Figure 9, when inserting the chained list list item, can be in the following way:
Step 901 is inserted the chained list list item to chained list, and this chained list list item evil spirit number is set;
Step 902 finds the page or leaf corresponding with the memory address of this evil spirit number;
Step 903 judges whether the bitmap related with this page exists;
Step 904, if the result who judges in the step 903 is for existing, the pairing position of memory address superset that should the evil spirit number in bitmap then, present embodiment mid-1; Wherein, shown in Fig. 5 A, 5B, adopt page table that page or leaf and bitmap are associated, can find corresponding page table entry, find corresponding bitmap according to the address of the bitmap that stores in the page table then, at last in the mid-position of bitmap according to page address;
In addition, also can comprise step 905, if the result who judges in the step 903 then applies for the bitmap space for there not being bitmap, the position superset under then should the memory address of evil spirit number in bitmap like this, can be saved the memory headroom of storage unit 302.Certainly, in embodiment of the present invention, also can directly bitmap be set and do not need as above to judge, application process.
After inserting the chained list list item, if when unloading, do not delete this chained list list item for various reasons, and directly discharged the memory headroom that contains this chained list list item, then can detect by following manner.
As shown in figure 10, step 1001, with the memory address of magic number with the alignment of integer size; After the alignment, make this address and bitmap corresponding one by one easily; For example, in the embodiment of the present invention, 32 of integer supposition, then the 1st of the corresponding bitmap of the 0th, the 2nd integer of the corresponding bitmap of first integer on the page or leaf ..., the 1023rd of corresponding bitmap of last integer, but be not limited thereto, also can adopt other modes;
Step 1002, the bitmap scope of retrieval institute releasing memory space correspondence; Wherein, can find corresponding page table entry, find corresponding bitmap according to the address of the bitmap that stores in the page table then according to page address; Step 1003 judges on the position in this bitmap scope whether set is arranged, and promptly puts 1;
Step 1004 is in step 1003, if judged result for set is arranged, then reports an error, to know the chained list list item of makeing mistakes.
If a plurality of chained lists are when existing simultaneously, quoting after mistake knows the chained list list item of makeing mistakes, also can know which chained list makes mistakes by following steps, as shown in figure 10:
Step 1005, then find put 1 the position pairing magic number memory address;
Step 1006 finds corresponding magic number according to the memory address of the magic number that finds;
Step 1007 reports an error according to this evil spirit number, to know the chained list of makeing mistakes.
In addition, also comprise step 1008, in step 1003,, illustrate that then internal memory discharges end if the judged result position does not have set.
After adopting mode shown in Figure 9 to insert the chained list list item, when deletion chained list list item, as shown in figure 11, can be in the following way:
Step 1101, deletion chained list list item, it is 0 that this chained list list item evil spirit number is set;
Step 1102 finds the page or leaf of the memory address correspondence of this evil spirit number;
Step 1103 finds corresponding bitmap according to page table, then memory address pairing position zero clearing that should the evil spirit number in bitmap.Wherein, find corresponding bitmap in foregoing, to describe, repeat no more herein by page table.
From the above, when discharging the chained list list item, whether report an error by detecting this list item, thereby can find above-mentioned mistake, need not follow-up debugging, can save time and manpower from root from the chained list excision.
The present invention is similar applicable to all and chained list, and the global data structures that multimode is shared as tree, Hash table etc., checks that node space discharges the problem that fashion does not remove from global structure.
Be example below with the timer processing, 12,13,14 pairs of method and systems of the present invention describe with reference to the accompanying drawings.Figure 12 is the chain hoist pennants of one embodiment of the invention; Figure 13 is a record sheet synoptic diagram when detecting; Figure 14 is another record sheet synoptic diagram when detecting.
As shown in figure 12, administrative unit A (not shown): timer units, itself safeguard a timer chain, every 10 milliseconds, travel through overdue timer in chained list, overdue timer is taken out the expire function of timer association of execution.This administrative unit A control table entry a, list item a is the chained list gauge outfit, manages whole chained list.
Administrative unit B (not shown): oneself applies for timer (internal memory application), and the timer with application is suspended in the chain of administrative unit A management then, allows it carry out once every 1 minute.This administrative unit B management list item b.
Administrative unit C (not shown): oneself applies for timer (internal memory application), and the timer with application is suspended in the chain of administrative unit A management then, allows it carry out once every 10 minutes.This administrative unit C management list item c.
Administrative unit D (not shown): oneself applies for timer (internal memory application), and the timer with application is suspended in the chain of administrative unit A management then, allows it carry out once every 1 hour.This administrative unit D management list item d.
With above-mentioned 4 administrative units is example:
Administrative unit D loaded in start in 10 minutes, and the timer that adds self is in the chained list of administrative unit A, and its timer triggered in start in 1 hour 10 minutes like this.If administrative unit D is unloaded after the half an hour of starting shooting, do not delete this timer before the unloading, directly discharged memory headroom.So, in start 1 hour 10 minutes the time, if adopt prior art, administrative unit A travels through overdue at that time timer chain meter, when traversing the residual timer of administrative unit D, because this timer is deleted, value on the memory headroom is undesired, has then caused system crash.
This situation will as a child could occur at 1 of the timer that administrative unit D adds, and fault is very hidden, and common test is difficult to find this problem.If this class fault occurs at the user scene, have no way of having looked at all, can only in code, increase debugging, to take environment and reappear fault, expectation can reappear fault and solve, and so needs to spend a large amount of manpower and materials.
If used method of the present invention, add a magic number member in the timer the inside, in the present embodiment, the evil spirit number can be placed on stem, and this evil spirit number is the first member of timer, because the timer address is exactly first member's address, therefore, the memory address of magic number is identical with the timer address value.For example, timer be [100,120), take 20 bytes, magic number be [100,104), account for 4 bytes, magic number is in timer the inside, two addresses are identical.But be not limited thereto kind of a situation, magic number also can be arranged in the middle of the timer, and like this, the memory address of magic number can be different with the timer address value.
When administrative unit D is suspended to timer chain meter with timer, according to method of the present invention, in the memory address adding record sheet with magic number.When administrative unit D in unloading during the release timer memory headroom, can detect this memory headroom discharging the function the inside, be easy to just find mistake.
As being example with record sheet shown in Figure 13, this moment administrative unit B, C, D has respectively added a timer to chained list, and the address of these 3 timers is respectively 0,64,4064, promptly also be the memory address of magic number, the memory address of the magic number of 3 timer the insides all has been recorded in the record sheet.
Administrative unit D unloading this moment is not deleted timer from the chained list the inside, directly the memory headroom [4032,4095] with its management discharges, and timer is just in time in this memory headroom.When discharging this piece memory headroom, internal memory discharges function and has traveled through record sheet, and then there is the chained list list item address 4064 of the 3rd record of discovery record sheet in the memory headroom that explanation is discharged, so will quote mistake in this spatial dimension.
As being example with page table structure shown in Figure 14, the memory address of the magic number of 3 timer the insides all is recorded in the page or leaf.As Figure 14,3 timers and for example are homepages at internal memory all in same page or leaf, and promptly the 0th page, each row has 8 in the bitmap, has 1024.Timer b is in the address 0, the position of corresponding bitmap (the 0th) value 1; Timer c is in the address 64, and corresponding bitmap bits (the 16th) also puts 1; Timer d is 4064 (the 1016th) in the address, and corresponding bitmap bits also puts 1.
Administrative unit D unloading this moment is not deleted timer from the chained list the inside, directly the space 4032 to 4095 with its management discharges, and timer is just in time in this space.When discharging this block space, internal memory discharges the 1008th to 1023 of bitmap that function has been checked the address correspondence of this memory field, the 1016th place value of finding record sheet is 1, the page address 4064 that the 1016th correspondence is described has a magic number (illustrating with shade), read the magic number of address 4064 correspondences, can know that this is a timer, therefore quote mistake.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; and be not intended to limit the scope of the invention; within the spirit and principles in the present invention all, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (15)

1. a shared chained list error detection method is characterized in that, when discharging the chained list list item, the method comprising the steps of:
Whether described chained list list item is arranged in the memory headroom that the detection of stored unit is discharged;
If the result who detects then quotes mistake, to know the chained list list item of makeing mistakes for described chained list list item is arranged.
2. method according to claim 1, it is characterized in that whether having described chained list list item to be meant in the memory headroom that described detection of stored unit is discharged: detect in the memory headroom that described storage unit discharges according to the memory address of the magic number of the described chained list list item correspondence that writes down in the magic number that inserts described chained list list item and the record sheet or the information relevant whether described chained list list item is arranged with the memory address of described magic number.
3. method according to claim 2 is characterized in that, whether the memory headroom that described detection of stored unit is discharged has described chained list list item, comprises step:
Retrieve described record sheet;
Whether the memory address of judging the magic number that is write down in the described record sheet is in the memory headroom that described storage unit discharged;
If the result who judges is for being that then the memory headroom that described storage unit discharged has described chained list list item.
4. method according to claim 3 is characterized in that, before the memory headroom in discharging storage unit, also comprises the step of inserting in the extremely corresponding chained list of described chained list list item, comprising:
Insert described chained list list item to described chained list;
Described chained list list item is provided with magic number;
The memory address of the magic number of described chained list list item correspondence is recorded in the described record sheet.
5. method according to claim 4 is characterized in that, the magic number of described chained list list item is consistent with the magic number of described chained list.
6. method according to claim 5 is characterized in that, is quoting after mistake knows the chained list list item of makeing mistakes, and also comprises step:
Find the magic number of this chained list list item correspondence according to the memory address of described magic number;
Report an error according to described magic number, to know the chained list of makeing mistakes.
7. method according to claim 2, it is characterized in that when the memory headroom of described storage unit was divided according to page or leaf, memory address was corresponding with described page or leaf, described record sheet comprises the bitmap that is associated with described page or leaf, and this bitmap records the information relevant with the memory address of described magic number;
Whether there is described chained list list item to be meant in the memory headroom that described detection of stored unit is discharged: to detect in the memory headroom that described storage unit discharges according to the relevant information of the memory address with described magic number of magic number that inserts described chained list list item and record whether described chained list list item is arranged.
8. method according to claim 7 is characterized in that, whether the memory headroom that described detection of stored unit is discharged has described chained list list item, comprises step:
The pairing bitmap scope of memory headroom that retrieval is discharged;
Judge in the position in the described bitmap scope whether set is arranged;
If the result who judges is for having, then the memory headroom that described storage unit discharged has described chained list list item.
9. method according to claim 8 is characterized in that, before the chained list list item in discharging storage unit, also comprises the step of inserting in the extremely corresponding chained list of described chained list list item, comprising:
Insert described chained list list item to described chained list;
Described chained list list item is provided with magic number;
Find the pairing page or leaf of memory address of this evil spirit number;
Judge whether the bitmap related with this page exists;
If the result who judges is for existing, the pairing position of memory address superset that should the evil spirit number in bitmap then.
10. method according to claim 9, it is characterized in that, the judged result whether described judgement bitmap related with this page exists is that described bitmap does not exist, and then applies for the bitmap space, then the pairing position of memory address that should the evil spirit number in this bitmap superset.
11. method according to claim 9 is characterized in that, the magic number of described chained list list item is consistent with the magic number of described chained list.
12. method according to claim 11 is characterized in that, is quoting after mistake knows the chained list list item of makeing mistakes, and also comprises step:
Find the memory address of the pairing described magic number in position of set;
Find the magic number of this chained list list item correspondence according to the memory address of described magic number;
Report an error according to described magic number, to know the chained list of makeing mistakes.
13. an equipment management system is characterized in that, this system comprises:
Storage unit is used to store the chained list list item;
Administrative unit is connected with described storage unit, when discharging the chained list list item, whether described administrative unit is used for detecting the memory headroom that described storage unit discharges described chained list list item, if the result who detects then quotes mistake, to know the chained list list item of makeing mistakes for described chained list list item is arranged.
14. system according to claim 13, it is characterized in that whether having described chained list list item to be meant in the memory headroom that described administrative unit detection of stored unit is discharged: detect in the space that described storage unit discharges according to the magic number that inserts described chained list list item and the memory address of building the magic number that writes down in the record sheet in advance whether described chained list list item is arranged;
Described storage unit also stores described record sheet, the memory address of the magic number of the described chained list list item correspondence of record in this record sheet.
15. system according to claim 13, it is characterized in that whether having described chained list list item to be meant in the memory headroom that described administrative unit detection of stored unit is discharged: according to the magic number that inserts described chained list list item with build the information relevant that write down in the record sheet in advance and detect in the space that described storage unit discharges whether described chained list list item is arranged with memory address magic number;
Described storage unit also stores described record sheet, the record information relevant with the memory address of described magic number in this record sheet.
CNB200710178612XA 2007-12-03 2007-12-03 A kind of shared chained list error detection method and system Active CN100547595C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200710178612XA CN100547595C (en) 2007-12-03 2007-12-03 A kind of shared chained list error detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200710178612XA CN100547595C (en) 2007-12-03 2007-12-03 A kind of shared chained list error detection method and system

Publications (2)

Publication Number Publication Date
CN101169791A true CN101169791A (en) 2008-04-30
CN100547595C CN100547595C (en) 2009-10-07

Family

ID=39390417

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200710178612XA Active CN100547595C (en) 2007-12-03 2007-12-03 A kind of shared chained list error detection method and system

Country Status (1)

Country Link
CN (1) CN100547595C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676906B (en) * 2008-09-18 2013-06-05 中兴通讯股份有限公司 Method of managing memory database space by using bitmap
CN107025256A (en) * 2015-11-06 2017-08-08 国际商业机器公司 The method and system for reactivating the time for reducing the service based on cloud
CN110069418A (en) * 2011-12-29 2019-07-30 英特尔公司 Assemble page mistake signaling and processing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676906B (en) * 2008-09-18 2013-06-05 中兴通讯股份有限公司 Method of managing memory database space by using bitmap
CN110069418A (en) * 2011-12-29 2019-07-30 英特尔公司 Assemble page mistake signaling and processing
CN110069418B (en) * 2011-12-29 2023-07-18 英特尔公司 Aggregate page fault signaling and handling
CN107025256A (en) * 2015-11-06 2017-08-08 国际商业机器公司 The method and system for reactivating the time for reducing the service based on cloud
CN107025256B (en) * 2015-11-06 2020-05-19 国际商业机器公司 Method and system for reducing reactivation time of cloud-based services
US10834228B2 (en) 2015-11-06 2020-11-10 International Business Machines Corporation Method to reduce reactivation time of cloud based services

Also Published As

Publication number Publication date
CN100547595C (en) 2009-10-07

Similar Documents

Publication Publication Date Title
CN104090897B (en) Method, server and the system of accesses meta-data
US20040078457A1 (en) System and method for managing network-device configurations
CN104598376A (en) Data driving layered automation test system and method
CN110046168A (en) A kind of incremental data consistency implementation method and device
JP2006526226A (en) Tree-based memory structure
CN101131697A (en) System and method for moving records between partitions
CN102253991A (en) Uniform resource locator (URL) storage method, web filtering method, device and system
CN103164312A (en) Method and system for preparing interface testing data
CN100378663C (en) Method, system and module for dynamic downloading of applied programe to user identification
CN100547595C (en) A kind of shared chained list error detection method and system
CN104657435A (en) Storage management method for application data and network management system
CN106844676A (en) Date storage method and device
CN1987864A (en) Method and system for access data base
CN106095678A (en) Automatization's result inspection method of data bank service operation under windows platform
CN110109931B (en) Method and system for preventing data access conflict between RAC instances
CN113704790A (en) Abnormal log information summarizing method and computer equipment
US7542985B1 (en) System and method for log retrieval priority
CN101877603A (en) Data transmitting method and equipment thereof
CN103051478B (en) A kind of Large Copacity telecom network management system and and methods for using them is set
CN104580428A (en) Data routing method, data management device and distributed storage system
CN105701605B (en) A kind of waveform library management equipment applied in integrated communication Navigation Identification System
CN102426601B (en) Data deleting method and device
CN106603727A (en) Method and device for integrating and accessing system data
CN104394518B (en) A kind of note transmission method and SMS platform
CN102867029B (en) A kind of method managing distributive catalogue of document system and distributed file system

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
ASS Succession or assignment of patent right

Owner name: BEIJING Z-GOOD TECHNOLOGY SERVICE CO., LTD.

Free format text: FORMER OWNER: FUJIAN XINGWANGRUIJIE NETWORK CO., LTD.

Effective date: 20141222

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 350015 FUZHOU, FUJIAN PROVINCE TO: 100085 HAIDIAN, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20141222

Address after: 100085 Beijing city Haidian District No. 33 Xiaoying Road 1 1F06 room

Patentee after: BEIJING ZHIGU TECHNOLOGY SERVICES CO., LTD.

Address before: 350015 M9511 Industrial Park, fast road, Mawei District, Fujian, Fuzhou

Patentee before: Fujian Xingwangruijie Network Co., Ltd.

EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20080430

Assignee: Fujian Xingwangruijie Network Co., Ltd.

Assignor: BEIJING ZHIGU TECHNOLOGY SERVICES CO., LTD.

Contract record no.: 2015990000029

Denomination of invention: Sharing chained list error detection method and system

Granted publication date: 20091007

License type: Common License

Record date: 20150116

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model