CN101188583B - Design method for table-driven parallel machine - Google Patents
Design method for table-driven parallel machine Download PDFInfo
- Publication number
- CN101188583B CN101188583B CN2006101458050A CN200610145805A CN101188583B CN 101188583 B CN101188583 B CN 101188583B CN 2006101458050 A CN2006101458050 A CN 2006101458050A CN 200610145805 A CN200610145805 A CN 200610145805A CN 101188583 B CN101188583 B CN 101188583B
- Authority
- CN
- China
- Prior art keywords
- state machine
- affairs
- parallel state
- parallel
- rollback
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000013461 design Methods 0.000 title abstract description 9
- 238000012545 processing Methods 0.000 claims abstract description 20
- 230000004044 response Effects 0.000 claims description 15
- 230000008569 process Effects 0.000 claims description 12
- 230000007704 transition Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 230000007812 deficiency Effects 0.000 description 3
- 230000009467 reduction Effects 0.000 description 2
- 230000002950 deficient Effects 0.000 description 1
- 238000012938 design process Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Multi Processors (AREA)
Abstract
The invention discloses a design method for a table-driven parallel state machine, aiming at problems that the prior method can bring complex design and low efficiency of a state machine. In order to solve the problems, the invention comprises the following steps: firstly, the parallel state machine makes initialization to the table according to transactions processed in parallel; secondly, each transaction registered in the table is started in parallel, a timer is arranged to each transaction, and the parallel state machine jumps to a transaction processing state; thirdly, if each transaction can be successfully processed within the set time of the timer, the parallel state machine jumps to a transaction completion state, and the procedure is finished; otherwise, the parallel state machine jumps to a failure rollback state, and enters into step four; fourthly, the parallel state machine performs rollback processing to the successfully processed transactions, and after the processing is completely finished, the parallel state machine jumps to an end state. The invention can ensure that the burden of a state machine system is largely reduced.
Description
Technical field
The present invention relates to the method for controlling operation thereof of communication network or computer network, especially user mode machine method that a plurality of asynchronous transactions are controlled.
Background technology
In communication or the computer realm, often need control a plurality of asynchronous transactions, such as the NodeB of 3G WCDMA, in the process that Radio Link is set up, need carry out the A affairs: the distribution of baseband board resource, simultaneously also need to carry out the B affairs: user plane bearer pre-established, A handles different resources respectively with B, relates to different veneers, and is relatively independent each other, after any one failure, also need to carry out the recovery of resource, traditional control method has two kinds, the serial state machine, carry out the A operation earlier, carry out the B operation again, if failure, also serialization of the operation of rollback, asynchronous transaction exists a plurality of, is difficult to realize the good response time; Parallel state machine carries out A simultaneously, the B operation, wait for A, the result of B operation is if A result arrives first, transit to the state of waiting for B result,, transit to the state of waiting for A result if B result arrives first, need two intermediatenesses, if consider the resource rollback, the design of state machine is just more complicated, for the asynchronous operation that has more than three or three, the design of state machine is just complicated unusually, and the design of traditional parallel state machine is to be worthless basically for the programmer.
Communication system or computer realm, for time and resource all be highstrung, based on above deficiency, patent CN03147316 has proposed the solution of a seed state machine, a kind of method of asynchronous operation being controlled with state machine, this method is decomposed into level and at least one sequential section more than at least two according to the complexity of the asynchronous operation of business and causality with business processing flow, for corresponding state machine is disposed in each operating process of each level, layer state machine feedback states transition result makes progress after lower floor's state machine state transition, the upper strata state machine carries out the transition of state according to the transition between states result of the lower floor's state machine in the sequential section, all finishes up to professional all asynchronous operations.Such scheme makes that the state of whole service processing procedure is less, and control procedure is clear, and is therefore higher to the control efficiency of asynchronous operation, and makes the program that adopts the method for the invention establishment be easy to safeguard and expand.
Patent CN03147316 can reduce the complexity of parallel state machine design, the deficiency that exists is to have designed multilayered state machine structure, each state machine need take the resource of system separately, exist more mutual between upper strata state machine and the lower floor's state machine, the initialization of lower floor's state machine need be controlled in the upper strata, lower floor's state machine need feed back the transition result of upper strata state machine self, exist more mutual, in Embedded Application for resource and the efficient responsive communications field especially, more what bring alternately is performance decrease, and system is unacceptable often for this.
Summary of the invention
At defective and the deficiency that prior art exists, the invention provides a kind of method for designing of parallel state machine of table driving, reduce the complexity of parallel state machine operation operation, reduce the resource that takies, improve system effectiveness, and improve the reliability of rollback.
In order to reach the foregoing invention purpose, the method for designing of the parallel state machine of table driving of the present invention may further comprise the steps:
(1) parallel state machine carries out initialization according to the affairs of parallel processing to form;
(2) each affairs of registering in the parallel starting form, and timer is set for described each affairs, parallel state machine transits to transaction status;
(3) if in the timer setting-up time, each affairs is all handled success, and parallel state machine transits to the transaction completion status, and flow process finishes; Otherwise parallel state machine transits to failure rollback state, enters step (4);
(4) parallel state machine carries out the rollback processing to handling successful affairs, and after all processing finished, parallel state machine transitted to done state.
In the method for designing of the parallel state machine of above-mentioned table driving, described step (3) further comprises:
(31), enter step (32) if parallel state machine is received receiveing the response of affairs; If parallel state machine is received the message that the transaction timer arrives, enter step (34);
(32) parallel state machine is handled these affairs, successfully enters step (33) if handle; Enter step (34) if handle failure;
(33) parallel state machine watches whether all affairs have all been handled success, is that then flow process finishes, otherwise remains on transaction status, returns step (31);
(34) parallel state machine transits to failure rollback state, enters step (4).
In the method for designing of the parallel state machine of above-mentioned table driving, when parallel state machine carries out the rollback processing to handling successful affairs in the step (4),, will carry out rollback to these affairs once more and handle, up to the rollback success if unsuccessful.
In the method for designing of the parallel state machine of above-mentioned table driving, the content of described form comprises: the failure rollback of handling function pointer, each affairs of receiveing the response of the start-up control function pointer of each affairs, the number of receiveing the response of each affairs, each affairs is handled the process limited requirement of function pointer, each affairs, the treatment state of each affairs.
Adopt the method for designing of the parallel state machine of table driving of the present invention, only there is a host state machine, for system, there is not extra resource overhead, owing to avoided mutual between host state machine and the sub-state machine, the reduction on also inefficent, and corresponding table initialization, the form transaction, form rollback processing procedure can be accomplished general and consistent, convenient programming realizes.
Description of drawings
Fig. 1 is that a utilization parallel state machine SDL figure of the present invention describes.
Embodiment
Below in conjunction with the drawings and specific embodiments technical scheme of the present invention is described in further detail:
In the design process of WCDMA NodeB base station software, often there is the situation of a plurality of concurrent transactions, Fig. 1 and table 1 have just described the situation of typical three concurrent transactions.
Table 1 is to handle parallel A, B, and the concrete form of C affairs correspondence, the content of form is the state behind the initialization form.
The affairs numbering | Transaction result | The start-up control function pointer | The number of receiveing the response | The response process function pointer | Rollback is handled function pointer | Processing time restriction (ms) |
A | Beginning | PStartA | EV_A_ACK | PAckA | PRoolBackA | 300 |
B | Beginning | PStartB | EV_B_ACK | PAckB | PRoolBackB | 500 |
C | Beginning | pStartC | EV_C_ACK | PAckC | PRoolBackC | 1000 |
Table 1
Shown in Fig. 1 and table 1,, there is affairs A simultaneously in some moment, B, C need to handle A, B, there is not the priority requirement of processing between the C, in concrete WCDMA NodeB, A, B, the C correspondence the inner different veneer of configuration NodeB, and waits for the response of different veneers, uses the concrete mode of parallel state machine design of table driving of the present invention as follows:
One: analyze the A that needs processing, B, the C affairs, the initialization form,
Hereinafter adopt false code to be described: (FSM Finite-State Machine)
InitParallelFSMTable(‘A’,pStartA,EV_A_ACK,pAckA,pRoolbackA,300);
InitParallelFSMTable(‘B’,pStartB,EV_B_ACK,pAckB,pRoolbackB,500);
InitParallelFSMTable(‘C’,pStartC,EV_C_ACK,pAckC,pRoolbackC,1000);
Concrete work: all transaction initializes are initial state, and the start-up control function pointer pStartA of the different affairs of initialization, pStartB, pStartC, the EV_A_ACK of receiveing the response of the different affairs of initialization, EV_B_ACK, EV_C_ACK and response process function pointer, rollback is handled function pointer pAckA, pAckB, pAckC, PRoolBackA, PRoolBackB, PRoolBackC, the time limit of finishing of the different affairs of initialization requires 300ms, 500ms, and 1000ms.
Initializedly the results are shown in Table 1.
Two: under initial state, start affairs A, B, the start-up course of C according to the form after the initialization.
False code is described below:
StartParallelFSM();
Concrete process: according to the affairs A in the form, B, C calls start-up control function pStartA respectively, pStartB, pStartC, and start affairs A, B, the maximum 1000ms of C timer; Start-up control function pStartA, pStartB, pStartC finish the work that sends message toward different veneers respectively.State machine switches to transaction status.
Three: under transaction status,, call the transaction function and handle, under this state, need processing transactions A according to form, B, C's receives the response, affairs overtime timer message.
False code is described:
ProcessParallelFSM();
The concrete work of finishing:
1. receive receiveing the response of A or B or C, call response process function PAckA corresponding in the form or PAckB or PAckC and handle:
If the result who handles is success, the result of upgrading corresponding affairs is successfully, checks whether all affairs are all finished, if all finish, kill the regularly phase, and transition between states is to handling successful state.
If the result of transaction is failure, it is failure that the transaction result is set, and transits to failure rollback state and handles.
2. receive regularly phase time exceeded message: illustrate that affairs to finish in official hour, transit to failure rollback state and handle.
Four: under failure rollback state, according to the fail processing of rollback of form.
False code is described:
RoolbackParallelFSM();
The concrete work of finishing:
According to affairs A corresponding in the form, B, the treatment state of C is if success is called corresponding rollback processing function PRoolbackA or PRoolBackB or PRoolbackC and handled.
Separately another purpose of this state of design can provide more reliable a kind of fallback mechanism, can carry out to a certain degree expansion to form, if under the unsuccessful situation of rollback, carry out repeatedly rollback, has improved the reliability of rollback.
Adopt the method for designing of the parallel state machine of a kind of table driving of the present invention, only there is a host state machine, for system, there is not extra resource overhead, owing to avoided mutual between host state machine and the sub-state machine, also without any the reduction on the efficient, this to resource and efficient sensitivity communicate by letter or computer system in, be fit closely a kind of mode.
Adopt the method for designing of the parallel state machine of a kind of table driving of the present invention, parallel affairs form initial method InitParallelFSMTable, parallel affairs start method StartParallelFSM, parallel transaction methods ProcessParallelFSM, parallel transaction rollback method RoolbackParallelFSM can accomplish unanimity, this mode makes things convenient for the support platform rank to realize that public method is for using on the one hand, on the other hand, for the programming personnel, this also is a kind of very directly perceived and wieldy mode, compare traditional mode, improved development efficiency greatly.
Claims (3)
1. the method for designing of the parallel state machine of a table driving is characterized in that: only have a host state machine, i.e. parallel state machine may further comprise the steps:
(1) parallel state machine carries out initialization according to the affairs of parallel processing to form, and the content of described form comprises: the failure rollback of handling function pointer, each affairs of receiveing the response of the start-up control function pointer of each affairs, the number of receiveing the response of each affairs, each affairs is handled the process limited requirement of function pointer, each affairs, the treatment state of each affairs;
(2) each affairs of registering in the parallel starting form, and timer is set for described each affairs, parallel state machine transits to transaction status;
(3) if in the timer setting-up time, each affairs is all handled success, and parallel state machine transits to the transaction completion status, and flow process finishes; Otherwise parallel state machine transits to failure rollback state, enters step (4);
(4) parallel state machine carries out the rollback processing to handling successful affairs, and after all processing finished, parallel state machine transitted to done state.
2. the method for designing of the parallel state machine of table driving according to claim 1, it is characterized in that: described step (3) further comprises:
(31), enter step (32) if parallel state machine is received receiveing the response of affairs; If parallel state machine is received the message that the transaction timer arrives, enter step (34);
(32) parallel state machine is handled these affairs, successfully enters step (33) if handle; Enter step (34) if handle failure;
(33) parallel state machine watches whether all affairs have all been handled success, is that then flow process finishes, otherwise remains on transaction status, returns step (31);
(34) parallel state machine transits to failure rollback state, enters step (4).
3. the method for designing of the parallel state machine of table driving according to claim 1, it is characterized in that: when parallel state machine carries out the rollback processing to handling successful affairs in the step (4), if unsuccessful, will carry out rollback to these affairs once more and handle, up to the rollback success.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006101458050A CN101188583B (en) | 2006-11-17 | 2006-11-17 | Design method for table-driven parallel machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006101458050A CN101188583B (en) | 2006-11-17 | 2006-11-17 | Design method for table-driven parallel machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101188583A CN101188583A (en) | 2008-05-28 |
CN101188583B true CN101188583B (en) | 2010-12-08 |
Family
ID=39480778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2006101458050A Expired - Fee Related CN101188583B (en) | 2006-11-17 | 2006-11-17 | Design method for table-driven parallel machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101188583B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102468978B (en) * | 2010-11-19 | 2014-09-10 | 中兴通讯股份有限公司 | Service configuration method and device |
CN112233498B (en) * | 2020-10-14 | 2023-01-06 | 烟台鼎钰电子科技有限公司 | Tabular programmable display controller |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5950212A (en) * | 1997-04-11 | 1999-09-07 | Oracle Corporation | Method and system for workload based group committing for improved performance |
CN1567906A (en) * | 2003-07-05 | 2005-01-19 | 华为技术有限公司 | A method for controlling asynchronous operation by using state machine |
CN1606738A (en) * | 2001-07-17 | 2005-04-13 | Bea系统公司 | System and method for transaction processing with delegated commit feature |
CN1714342A (en) * | 2002-11-20 | 2005-12-28 | 诺基亚公司 | Concurrent operation of a state machine family |
-
2006
- 2006-11-17 CN CN2006101458050A patent/CN101188583B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5950212A (en) * | 1997-04-11 | 1999-09-07 | Oracle Corporation | Method and system for workload based group committing for improved performance |
CN1606738A (en) * | 2001-07-17 | 2005-04-13 | Bea系统公司 | System and method for transaction processing with delegated commit feature |
CN1714342A (en) * | 2002-11-20 | 2005-12-28 | 诺基亚公司 | Concurrent operation of a state machine family |
CN1567906A (en) * | 2003-07-05 | 2005-01-19 | 华为技术有限公司 | A method for controlling asynchronous operation by using state machine |
Non-Patent Citations (4)
Title |
---|
李国徽等.一种高效的合作实行事务并行检验点算法.计算机科学32 7.2005,32(7),第69-75页. |
李国徽等.一种高效的合作实行事务并行检验点算法.计算机科学32 7.2005,32(7),第69-75页. * |
李金友等.如何利用事务处理保证数据的一致性.通化师范学院学报26 2.2005,26(2),第20-21页. |
李金友等.如何利用事务处理保证数据的一致性.通化师范学院学报26 2.2005,26(2),第20-21页. * |
Also Published As
Publication number | Publication date |
---|---|
CN101188583A (en) | 2008-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104834506B (en) | A kind of method of use multiple threads service application | |
EP2235625B1 (en) | Method and system for deploying non-backward compatible server versions in a client/server computing environment | |
CN101188583B (en) | Design method for table-driven parallel machine | |
CN104220985A (en) | Method and apparatus for enhancing a hibernate and resume process using user space synchronization | |
CN103164244A (en) | Firmware system long-distance updating methods based on unified extensible firmware interface | |
CN102164363A (en) | Base station version updating realization method and base station | |
CN108519918A (en) | Distributed transaction processing method based on transaction chain | |
CN108038141A (en) | Ensure the method for data consistency under micro services framework HTTP interactive modes | |
CN102437869A (en) | Method for concurrently upgrading software of power line carrier communication modules | |
CN103905498B (en) | Service information management method and service information management system | |
CN108289030A (en) | A kind of base station fault identifying processing method and device | |
CN113726828B (en) | High concurrency trusted blockchain system and method supporting micro-services | |
CN101621792A (en) | Method for upgrading telesoftware of wireless fixed phone terminal | |
CN109450719A (en) | A kind of node upgrade method and system based on lorawan agreement | |
CN109727595A (en) | A kind of software design approach of speech recognition server | |
CN109189718A (en) | A kind of SOCKET Component that supporting multiple network interface and method | |
CN101281473B (en) | Method and device for allocating pipe foot | |
CN1744595A (en) | Web-based financial self-help service system and its control method | |
CN101222355B (en) | Remote assisting method and system | |
CN100463410C (en) | Method for gateway service node processing business service node restarting | |
CN1133343C (en) | Systemic control method for distributed base stations | |
EP2169552A1 (en) | System and method for transactional application lifecycle management for mobile devices | |
CN107977206A (en) | A kind of batch service data file processing method and device | |
CN114116141A (en) | Transaction processing method and device for distributed system, storage medium and electronic device | |
CN101924715A (en) | Gateway server and bank data processing 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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20101208 |
|
CF01 | Termination of patent right due to non-payment of annual fee |