Background technique
With the development of avionics and the raising of synthesis degree, the application of multi partition operating system platform is also increasinglyIt is more.For multi partition operating system, kernel operating system reporting equipment interrupts the method applied to subregion and generallys use empty interruptionMode.Due to multi partition operating system can only by one application report empty interruption, when in system there are multiple applications need usingWhen void is interrupted, existing multi partition operating system void implement of interruption function mechanism exists following insufficient:
(1) without unified standard and standard.Because of different model different application, multi partition operating system void implement of interruption function mechanismHaving differences property.
(2) lack independence and flexibility.Multi partition operating system void implement of interruption function mechanism in system using unified by managingReason, but process is complicated, exists between multiple applications and intercouples.The empty implement of interruption function mechanism of application lacks independence.
The content of present invention
For the deficiency in foregoing description, the invention proposes a kind of realizations of multi partition operating system void interrupt criteria componentMethod.Multi partition operating system void implement of interruption function mode is made to have the specification of standard and the pipe of unified standard through the inventionReason effectively avoids multiple conflicts for applying empty implement of interruption function in system, improves the independence between application, flexibility and can tie upShield property.
Specific technical solution of the present invention is as follows: the present invention is based on multi partition operating system system platforms, propose a kind of voidInterrupt criteria component realization method, including standard void interrupt module norm-setting and standard void interrupt module execute two parts.
The standard void interrupt module norm-setting, the specific steps are as follows:
Step 1, it formulates system void and interrupts the criteria for classifying;
Step 2, unified planning system draws empty interrupt code;
Step 3, partition sub-system void interrupt code;
Step 4, it formulates empty interrupt and initializes standard interface;
Step 5, empty interruption registration interface processing specification is formulated;
Step 6, subsystem void interrupt processing standard interface is formulated;
Step 7, it arbitrates the empty of generation and interrupts subsystem;
Step 8, executive subsystem void interrupt processing standard interface.
The step 1, system void interrupt the criteria for classifying and refer mainly to division principle, and division principle includes dividing according to producer,It is divided according to major field, divided according to module etc..
The step 2, unified planning system void interrupt code refers to according to the criteria for classifying, selects division principle.
The step 3, partition sub-system void interrupt code refer to according to step 2, divide each subsystem void interrupt code according to number section.
In the step 4, void interrupts initialization standard interface and refers to the standard api interface that system needs to be implemented, system shareApi interface.
In the step 5, void is interrupted registration interface processing specification and is referred to according to the criteria for classifying, defines subsystem and takes over empty interruptProcessing specification.Default value 0 is not take over empty interrupt processing.Setting value is 1, takes over empty interrupt processing.
In the step 6, subsystem void interrupt processing standard interface includes the api interface format of Subsystem standard, and API connectsMouth parameter.
In the step 7, the empty subsystem that interrupts for arbitrating generation refers to when void is interrupted and arrived, and needs to judge that the void is interruptedWhich subsystem belonged to.
The standard void interrupt module carries into execution a plan, the specific steps are as follows:
Step A, dividing system void interrupt code;
Step B, partition sub-system void interrupt code;
Step C, judges whether subsystem takes over interruption;
Step D executes empty interrupt and initializes standard interface if adapter tube;
Step E waits arrival to be interrupted;
Step F executes empty interruption registration interface processing specification;
Step G, executive subsystem void interrupt processing standard interface.
Standard void interrupt module norm-setting and standard void interrupt module in step of the present invention carry into execution a plan and have dependenceRelationship.Standard void interrupt module norm-setting is that standard void interrupt module carries into execution a plan providing method, scheme and standard foundation.MarkQuasi- void interrupt module carries into execution a plan the reasonability and correctness of further validation criteria void interrupt module norm-setting.
Make the empty implement of interruption function mode process based on multi partition operating system platform unified through the invention, management ruleModel, interface standard effectively avoid multiple conflicts for applying empty implement of interruption function in system, improve the independence between application, spiritActivity and maintainability.
Specific embodiment:
The present invention provides a kind of multi partition operating system void interrupt criteria component for multi partition operating system system configurationImplementation method.For a better understanding of the present invention, the present invention is further described in the following with reference to the drawings and specific embodiments.
As shown in Figure 1, specific step is as follows for standard void interrupt module norm-setting of the present invention:
Step 100, system void interrupts the criteria for classifying and refers mainly to division principle;
Step 101, according to the criteria for classifying, division principle is selected;
Step 102, according to step 101, each subsystem void interrupt code is divided according to number section;
Step 103, the standard initialization api interface that system needs to be implemented, the api interface of system share.
Step 104, it according to the criteria for classifying, defines subsystem and takes over empty interrupt processing specification.Default value 0 is not adapter tube voidInterrupt processing.Setting value is 1, takes over empty interrupt processing and registers empty interruption callback routines.
Step 105, subsystem void interrupt processing standard interface includes the api interface format of Subsystem standard, api interface ginsengNumber.
Step 106, it when there is empty interrupt response, according to pre-registered empty interruption callback routines, arbitrates in the void of generationIt is disconnected which subsystem belonged to.
Step 107, according to arbitration result, according to step 105, executive subsystem void interrupt processing standard interface.
In the step 100, division principle includes a variety of principles, simple for three examples herein: divided according to producer,It divides according to major field, divided according to module.According to the number of interruptions demand of each subsystem, number section is distributed unitedly.The empty number section of interrupting that the principle of number section distribution follows each subsystem cannot repeat.
In the step 101, according to the different criteria for classifying, it can choose specific classified types, such as according to producerDivide, divide according to major field and divided according to module etc..
In the step 102, according to demand of each subsystem to number of interruptions after the selected criteria for classifying and division, pressEach subsystem void interrupt code (dividing in this embodiment with equivalent number of interrupts to carry out empty interrupt) is divided according to number section.If according toProducer divides empty interrupt number, specific as shown in table 1.
Table 1 presses producer's partition sub-system
If dividing empty interrupt number according to major field, specifically as shown in table 2, major field can be to fly control, electromechanics, boatThe types such as electricity.
Table 2 presses major field partition sub-system
| Major field | Void interrupts number section |
| Profession 1 | 0---100 |
| Profession 2 | 101---200 |
| Profession 3 | 201---300 |
| Profession 4 | 301---400 |
| Profession 5 | 401---500 |
It is specific as shown in table 3 if dividing empty interrupt number according to module.
Table 3 loads control response message
| Module | Void interrupts number section |
| Module 1 | 0---100 |
| Module 2 | 101---200 |
| Module 3 | 201---300 |
| Module 4 | 301---400 |
| Module 5 | 401---500 |
In the step 103, the api interface initialization interface naming rule of system share is as follows: return typePubSysnameExtVInt (marker).Wherein return type can refer to public for int type or other desired type, PubInterface, Sysname refer to subsystem title, and ExTVInt refers to that extension is empty and interrupts initialization, and parameter identification position refers to whether take overVoid interrupts mark.Illustrate the Naming conventions, it is assumed that be to name with major field, avionics major field initialization interface canWith is defined as: int PubAvionicsExtVInt (marker);Electromechanical speciality direction initialization interface can be with is defined as: intPubMechaExtVInt (marker).
In the step 104, according to the criteria for classifying, defines subsystem and take over empty interrupt processing specification.Default each subsystemThe initial value of marker is 0 (not taking over empty interrupt processing).If some subsystem takes over empty interrupt processing, place value will be identifiedIt is set as 1, and registers empty interruption callback routines.
In the step 105, after some subsystem takes over empty interrupt processing, according to the subsystem api interface lattice of standardFormula and api interface parameter handle void interruption.The subsystem api interface Naming conventions of standard are as follows: return typeSubSysnameExtVInt (int SysInt, int SubInt, parameter 1, parameter 2, parameter 3, parameter 4).Wherein return typeIt can be int type or other desired type, Sub refers to that subsystem calling interface, Sysname refer to subsystem title,ExTVInt, which refers to that extension is empty, to interrupt, and first parameter SysInt refers to that system break code, second parameter SubInt refer to subsystemSystem interrupt code, subsequent parameter, which carries out increasing as needed, to be changed.Illustrate the Naming conventions, it is assumed that it is to be named with producer, factoryFamily's 1API interface can be defined as int SubManu1ExtVInt (int SysInt, int SubInt, parameter 1, parameter 2, ginsengNumber 3, parameter 4), producer's 2API interface can be defined as int SubManu2ExtVInt (int SysInt, int SubInt, ginsengNumber 1, parameter 2, parameter 3, parameter 4).
In the step 106, when there is empty interrupt response, pre-registered void interrupt handling program is arbitrated, foundationArbitration result determines which subsystem the empty interruption generated belongs to.For example subsystem is to be divided with producer, and divide markQuasi- and number section is as shown in table 1, it is assumed that subsystem void interrupt number is 188, then is determined as the empty interrupt code of producer 2.
Step 107, it according to the arbitration result of step 106 and the empty interrupt criteria api interface of step 105 subsystem, executesSubsystem void interrupt processing standard interface.As in step 106, such as it is 188 that subsystem void, which is interrupted, then executes the standard of producer 2Api interface int SubManu2ExtVInt (int SysInt, int SubInt, parameter 1, parameter 2, parameter 3, parameter 4).
As shown in Fig. 2, standard void interrupt module of the present invention carries into execution a plan, specific step is as follows:
Step 200, according to step 101 integrated system void interrupt code;
Step 201, according to step 102, each subsystem void interrupt code is divided according to number section;
Step 202, if adapter tube interrupts, interruption initialization standard interface is executed, and the ident value of the subsystem is setIt is set to 1, if not taking over interruption, scheme terminates;
Step 203, it arrives if there is interrupting, then empty interruption registration interface processing specification is executed, if it is not, continuingIt is to be interrupted;
Step 204, after empty interruption registration is completed, executive subsystem void interrupt processing.