CN108958157A - Control process control dispatching method, device, computer equipment and storage medium - Google Patents

Control process control dispatching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108958157A
CN108958157A CN201810746025.4A CN201810746025A CN108958157A CN 108958157 A CN108958157 A CN 108958157A CN 201810746025 A CN201810746025 A CN 201810746025A CN 108958157 A CN108958157 A CN 108958157A
Authority
CN
China
Prior art keywords
control program
scheduling
program
time piece
scheduling time
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
CN201810746025.4A
Other languages
Chinese (zh)
Other versions
CN108958157B (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.)
Kyland Technology Co Ltd
Original Assignee
Kyland Technology 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 Kyland Technology Co Ltd filed Critical Kyland Technology Co Ltd
Priority to CN201810746025.4A priority Critical patent/CN108958157B/en
Publication of CN108958157A publication Critical patent/CN108958157A/en
Application granted granted Critical
Publication of CN108958157B publication Critical patent/CN108958157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output

Abstract

The embodiment of the invention discloses a kind of control process control dispatching method, device, computer equipment and storage mediums.The described method includes: determining the scheduling time piece for controlling program in each operating system according to the time span of scheduling periods;According to the scheduling time piece adjustment information received, the corresponding scheduling time piece of the scheduling time piece adjustment information is adjusted;Judge whether current time is in the corresponding updated scheduling time piece of any control program;If it is, being run according to configuration scheduling rule switching control program;Otherwise it is switched to the control program operation of highest priority in two priority classes program queue.The embodiment of the present invention can improve the reliability and real-time of operating system with reasonable distribution time resource.

Description

Control process control dispatching method, device, computer equipment and storage medium
Technical field
The present embodiments relate to the information processing technology more particularly to a kind of control process control dispatching methods, device, meter Calculate machine equipment and storage medium.
Background technique
In order to realize higher utilization rate of equipment and installations, multi-core central processing unit is generallyd use in industry, realizes and computer is provided The integration in source maximally utilizes the resource of computer, saves cost.
It is directed to multi-core central processing unit at present, usually more virtual machines of corresponding creation, will directly run on reality originally The operating system of hardware platform is placed in virtual machine and runs.By using more virtual machines, subregion, part can be carried out to task Real time operating system is run in virtualized partition, runs real-time application thereon, and operation is non real-time in partial virtual machine subregion Operating system runs non real-time application program thereon.Since some equipment (equipment of such as PLC controls) are right The requirement of real-time of operating system is higher, and real time operating system real-time operation programmable logic controller (PLC) can be set (Programmable Logic Controller, PLC) indirect real-time realtime control equipment.For example, an operating system Kernel supports 4 kernels, non-real time operating system windows to occupy a kernel, and remaining 3 kernels run a PLC, this The kernel of a little operation PLC can be used as micro-kernel, and each kernel runs PLC by time scheduling table.
Currently, the time slicing operation that each PLC is temporally distributed in dispatch list, long-range if the timeslice of PLC distribution In the time that PLC task execution needs, time resource waste will cause, the real-time for also resulting in motion control is poor;And by Precision of timer influences, and PLC can not complete task in the timeslice of distribution and switch to next PLC execution task, causes PLC reliability and real-time decline.
Summary of the invention
The embodiment of the invention provides a kind of control process control dispatching method, device, computer equipment and storages to be situated between Matter can improve the reliability and real-time of operating system with reasonable distribution time resource.
In a first aspect, the embodiment of the invention provides a kind of control process control dispatching methods, comprising:
According to the time span of scheduling periods, the scheduling time piece that program is controlled in each operating system is determined;
According to the scheduling time piece adjustment information received, when adjusting the corresponding scheduling of the scheduling time piece adjustment information Between piece;
Judge whether current time is in the corresponding updated scheduling time piece of any control program;If it is, It is run according to configuration scheduling rule switching control program;Otherwise it is switched to the control of highest priority in two priority classes program queue Processing procedure sort run.
Second aspect, the embodiment of the invention also provides a kind of control process control dispatching devices, comprising:
Scheduling time piece determining module is determined and is controlled in each operating system for the time span according to scheduling periods The scheduling time piece of processing procedure sequence;
Scheduling time piece adjusts module, for the scheduling time piece adjustment information that basis receives, when adjusting the scheduling Between the corresponding scheduling time piece of piece adjustment information;
Equipment scheduling module, when for judging whether current time is in the corresponding updated scheduling of any control program Between in piece;If it is, being run according to configuration scheduling rule switching control program;Otherwise it is switched to two priority classes program queue The control program of middle highest priority is run.
The third aspect the embodiment of the invention also provides a kind of computer equipment, including memory, processor and is stored in It is realized on memory and when processor described in the computer program that can run on a processor executes described program as the present invention is real Apply any control process control dispatching method in example.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes the control process control dispatching method as described in any in the embodiment of the present invention when program is executed by processor.
The embodiment of the present invention passed through according to scheduling time piece adjustment information, the scheduling time of corresponding each control program of adjustment Piece, solve distribute in the prior art control program execute task timeslice it is excessive or it is too small cause time resource waste Problem realizes reasonable distribution time resource, improves the real-time and reliability of real time operating system.
Detailed description of the invention
Fig. 1 is a kind of flow chart for control process control dispatching method that the embodiment of the present invention one provides;
Fig. 2 a is a kind of flow chart for controlling process control dispatching method provided by Embodiment 2 of the present invention;
Fig. 2 b is the flow chart of S250 in a kind of control process control dispatching method provided by Embodiment 2 of the present invention;
Fig. 3 a is a kind of flow chart for control process control dispatching method that the embodiment of the present invention three provides;
Fig. 3 b is a kind of schematic diagram for application scenarios that the embodiment of the present invention three is applicable in;
Fig. 3 c is a kind of schematic diagram for application scenarios that the embodiment of the present invention three is applicable in;
Fig. 4 is a kind of structural schematic diagram for control process control dispatching device that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although operations (or step) are described as the processing of sequence by flow chart, Many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be pacified again Row.The processing can be terminated when its operations are completed, it is also possible to have the additional step being not included in attached drawing.Institute Stating processing can correspond to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is a kind of flow chart for control process control dispatching method that the embodiment of the present invention one provides, and the present embodiment can The situation of equipment is controlled by control real-time performance of the program suitable for the multi-core central processing unit on industrial service device, this method can be with It is executed by control process control dispatching device provided in an embodiment of the present invention, which can be used the side of software and/or hardware Formula realizes, and generally can be in integrated terminal equipment, for example, PC machine etc..As shown in Figure 1, the method for the present embodiment specifically includes:
S110 determines the scheduling time piece that program is controlled in each operating system according to the time span of scheduling periods.
In the present embodiment, scheduling time piece can be the default operation duration for accusing processing procedure sequence, it is to be understood that press Dispatching each control program according to scheduling time piece can refer to, each control program carries out wheel transhipment according to corresponding default operation duration Row;Scheduling periods are the total durations of the rotation operation of the multiple control programs operations of setting, wherein scheduling periods can be with It only include setting at least one corresponding scheduling time piece of control program, when also may include the free time without control program operation Between, after a scheduling periods, the scheduling periods can be executed with repetitive cycling;Control program, which can refer to, to be set Preparation controller, such as PLC.
Specifically, the scheduling time piece of control program can be correspondingly arranged according to the duration of configuration scheduling time cycle, In, the duration of scheduling time piece is less than or equal to the duration of the scheduling periods.Such as it can according to need the control journey of operation The duration equalization of scheduling periods is divided into multiple scheduling time pieces by the number of sequence, and scheduling time piece is distributed to need to The control program to be run.It should be noted that the priority for the control program that can also be run as needed, by scheduling time The duration in period is divided into multiple timeslices, distributes to corresponding control program, in this regard, the embodiment of the present invention does not do specific limit System.
It is corresponding to adjust the scheduling time piece adjustment information according to the scheduling time piece adjustment information received by S120 Scheduling time piece.
Wherein, scheduling time piece adjustment information is for adjusting the corresponding scheduling time piece of each control program, specifically, scheduling Timeslice adjustment information may include the vacant information of scheduling time piece and scheduling time piece warning message.
It in the present embodiment, can be according to operating status of each control program in the scheduling time piece of its distribution, adjustment It is each to control the corresponding scheduling time piece of program, each control program is dispatched according to updated scheduling time piece and is run.
Optionally, the scheduling time piece adjustment information is the vacant information of scheduling time piece;When the adjustment scheduling Between the corresponding scheduling time piece of piece adjustment information, comprising: be directed to the corresponding scheduling time piece of each control program, in opening for task Moment beginning and the finish time of task add mark information respectively;According to the mark information of the start time and it is described at the end of The mark information at quarter determines free time of each control program in the scheduling time piece currently distributed;According to the free time Time reduces the scheduling time piece of each control program.
Specifically, mark information can refer to timestamp, for marking each control program in the scheduling time piece of its distribution Time used in interior completion task;Free time can refer to that control program is excluded in scheduling time piece executes the required by task time Corresponding remaining time.When being more than preset time threshold between specifically can be set when idle, control program distribution is determined Scheduling time piece is too long, it is desirable to reduce the duration of the scheduling time piece of control program distribution, for discharging extra time money Source is supplied to other control programs and executes task.
By existing at the beginning of each control program execution task with finish time addition label, each control program of acquisition Free time in scheduling time piece, and each scheduling time piece for controlling program is adjusted according to free time, scheduling can be discharged Remaining time resource in timeslice, reduces the waste of time resource, to improve the utilization rate of time resource.
Optionally, the scheduling time piece adjustment information is scheduling time piece warning message;When the adjustment scheduling Between the corresponding scheduling time piece of piece adjustment information, comprising: determine corresponding with scheduling time piece warning message control program; The scheduling time piece for obtaining the control program increases the scheduling time of the control program according to scheduling time piece warning message Piece.
Specifically, scheduling time piece warning message can refer to for indicating control program in the scheduling time piece of distribution Abortive information.It in the present embodiment can be according to the knot for whether thering is control program to complete task in scheduling time piece Beam moment corresponding mark information judges to control whether program completes task in the scheduling time piece of its distribution, when confirmation should Control program its distribution scheduling time piece in without completion task when, generate scheduling time piece warning message, increase the control The scheduling time piece of processing procedure sequence.
It should be noted that individually can increase and/or reduce its corresponding scheduling time piece for each control program Duration, and the durations of scheduling periods is redefined according to each control updated scheduling time piece of program, can also be straight It connects increase and/or reduces a scheduling periods, and increase according to setting ratio and/or reduce in the scheduling periods The duration of all scheduling time pieces.
S130, judges whether current time is in the corresponding updated scheduling time piece of any control program;If It is then to execute S140;Otherwise S150 is executed.
It is understood that in a scheduling periods, may include each control program scheduling time piece and Free time.
S140 is run according to configuration scheduling rule switching control program.
Specifically, configuration scheduling rule can be according to the preferential of at least one corresponding control program of the scheduling time piece Grade, task difficulty, task complete the required time, are arranged, and according to the successively selection control program operation that puts in order.
S150 is switched to the control program operation of highest priority in two priority classes program queue.
In the present embodiment, it can execute according to preset scheduling rule, in scheduling periods to each control program Scheduling: if current time is the scheduling time piece for controlling program, each control program is run according to configuration scheduling rule;If current Moment is free time, then selects highest priority from two priority classes program queue and the control program in ready state is transported Row.Wherein, the control program in the queue of two priority classes program is the tactic control agenda according to priority, just The control program of thread state can refer to that the control program obtains whole resources in addition to cpu resource, just wait operating system Cpu resource is distributed, and when the control program of ready state once execution task can be started by obtaining cpu resource, while state becomes More run mode.
The embodiment of the present invention passed through according to scheduling time piece adjustment information, the scheduling time of corresponding each control program of adjustment Piece, solve distribute in the prior art control program execute task timeslice it is excessive or it is too small cause time resource waste Problem realizes reasonable distribution time resource, improves the real-time and reliability of real time operating system.
Embodiment two
Fig. 2 a be it is provided by Embodiment 2 of the present invention it is a kind of control process control dispatching method flow chart, the present embodiment with It is embodied based on above-described embodiment, in the present embodiment, will be run according to configuration scheduling rule switching control program, had Body are as follows: when being scheduled using first timer and second timer to each control program, be switched at current time It is run in the control program of ready state, wherein the first timer is described each for controlling in a scheduling periods Program switching is controlled, the second timer is for controlling scheduling periods switching;When being not provided with the first timer When with the second timer, be in the priority of the control program of ready state the current time, with the priority control The priority of the control program of highest priority is compared in processing procedure sequence queue, switches to the control program fortune of highest priority Row.
Correspondingly, the method for the present embodiment may include:
S210 determines the scheduling time piece that program is controlled in each operating system according to the time span of scheduling periods.
It is corresponding to adjust the scheduling time piece adjustment information according to the scheduling time piece adjustment information received by S220 Scheduling time piece.
S230, judges whether current time is in the corresponding updated scheduling time piece of any control program;If It is then to execute S240;Otherwise S260 is executed.
S240 is switched to and is worked as when being scheduled using first timer and second timer to each control program The preceding moment is in the control program operation of ready state, wherein the first timer is used in a scheduling periods internal control Each control program switching is made, the second timer is for controlling scheduling periods switching.
In the present embodiment, ready state, which can be, accuses that processing procedure sequence has service condition, positive that operating system is waited to distribute CPU Resource is to run;Current time is in the control program of ready state, can refer in the scheduling time piece pair where current time The control program and the control program answered are in ready state.In addition, if the corresponding control of scheduling time piece where current time Program is in non-ready state namely current time is not on the control program of ready state, can be from two priority classes program team Highest priority is selected in column and the control program in ready state is run.
It is understood that in view of existing scheduling periods are switched over using system clock, in fact it could happen that every It is just interrupted there is a phenomenon where primary every lesser time interval, this frequent interruption may cause the generation of time scheduling time cycle Delay.For example, it is assumed that the total duration of scheduling periods is 500ms, the first control program (such as PLC1) corresponding scheduling time The when a length of 100ms of piece, and assume that the interrupt processing time is 1ms, if producing 10 interruptions in PLC1 operational process, that Will result in the delay of 10ms, that is to say, that PLC1 has run 110ms and has just switched to the second control program (such as PLC2), then Correspondingly, when deployed between period corresponding duration 500ms when reaching, it is practical also in the scheduling time in scheduling periods Piece or in free time, need to can just back switch to first scheduling time piece in scheduling periods until 510ms, Therefore scheduling periods switching can produce the delay of 10ms.
In order to avoid the delay of the switching of the switching and scheduling periods of control program, the present embodiment is scheduling time Period is provided with two timers, wherein is timed by first timer to scheduling timeslice (control program), with control The switching of scheduling time piece (control program), is timed scheduling periods by second timer, when controlling scheduling Between the period switching.
Wherein, the method for first timer control scheduling time piece switching is specifically: determining corresponding to the first timer When the period reach when, current scheduled time piece in scheduling periods is switched to adjacent next scheduling time piece.First is fixed When device timing cycle be the corresponding duration of each scheduling time piece, and timing cycle can be with scheduling time piece Switching, automatically switches to duration corresponding to current scheduled time piece.Accordingly, first timer can be set in initialization shape Timing cycle under state is the corresponding duration of the first scheduling time piece in current scheduled time period, when timing meets first tune When spending the corresponding duration of timeslice, i.e., when timing cycle reaches, the first scheduling time piece is switched into the second scheduling time piece, and Timing cycle is changed to the corresponding duration of the second scheduling time piece, and so on.From this point of view, so-called scheduling time piece is cut It changes, it is understood that for the switching between control program (PLC).For example, the first scheduling time piece and the second scheduling time piece are equal For the busy time, and it is placed with PLC1 and PLC2 in ready state respectively, then the first scheduling time piece switches to Two scheduling time pieces, that is to say, that PLC1 is switched into PLC2.
Wherein, the method for second timer control scheduling periods switching is specifically: corresponding to second timer When timing cycle reaches, current scheduled time piece in current scheduled time period is switched to adjacent week next scheduling time Interim first scheduling time piece.Wherein, the timing cycle of second timer is scheduling periods, i.e. week scheduling time The total duration of phase, such as 500ms.That is, i.e. timing cycle reaches when timing meets the total duration of current scheduled time period When, it no matter is currently at which scheduling time piece, is switched to first scheduling time piece of next scheduling periods, and From the beginning timing, to realize the synchronization of scheduling periods.
To which the method run according to configuration scheduling rule switching equipment is specifically: determining corresponding to the first timer When the period reach when, current scheduled time piece in current scheduled time period is switched to adjacent next scheduling time first Piece is determining that next scheduling time piece is the busy time later, is obtaining from the busy time after switching at current time The first control program in ready state is simultaneously run.It, first will be current when the timing cycle corresponding to the second timer reaches Current scheduled time piece is switched to first scheduling time piece in adjacent next scheduling periods in scheduling periods, And when determining above-mentioned first scheduling time piece is the busy time, obtained when current from the busy time after switching It carves the first control program in ready state and runs.
It should be noted that being in the corresponding update of any control program switching to current time by free time every time In scheduling time piece afterwards, need to reacquire current time be in ready state first control program operation, if working as at this time The corresponding control program of scheduling time piece where the preceding moment is in non-ready state, then directly from two priority classes program queue It selects highest priority and the control program in ready state is run.
By setting, there are two timers, and first timer determines the corresponding scheduling time piece of each control program When, for controlling each control program switching in a scheduling periods, second timer determines scheduling periods When, for controlling scheduling periods switching, it can effectively avoid scheduling periods using system clock as switching moment Standard, cause control program switching and scheduling periods switching generate delay the phenomenon that.
The current time is in just by S250 when being not provided with the first timer and the second timer The priority of the control program of highest priority in the priority of the control program of thread state, with the two priority classes program queue It is compared, switches to the control program operation of highest priority.
In the present embodiment, in the case where being not provided with timer, can compare in the scheduling where current time Between piece it is corresponding control program priority, wherein the control program is in excellent in ready state, with two priority classes program queue The priority of first grade highest and the control program in ready state selects the control program operation that priority is high.
Specifically, as shown in Figure 2 b, when being not provided with the first timer and the second timer, according to setting The method namely S250 of scheduling rule switching control program operation can specifically include:
S251, when being not provided with the first timer and the second timer, and current time is in any control When in the corresponding updated scheduling time piece of program, obtain the current time be in ready state first control program, with And in the two priority classes program queue highest priority second control program.
S252 compares the priority of the first control program and the second control program.
S253, if the priority of the first control program is optionally greater than the priority of the second control program, the first control of operation Program.
In a specific example, current time is in first scheduling time piece, and current time is in ready state The priority of PLC1 be 7, and highest priority and the PLC4 in ready state are obtained from the two priority classes program queue Priority is 4.Compare the priority of PLC1 and PLC4, can determine that the priority of PLC4 is higher, so that PLC4 be selected to run.
In another specific example, current time is in first scheduling time piece, and current time is in ready The priority of the PLC1 of state is 4, and obtains highest priority from two priority classes program queue and be in the PLC4 of ready state Priority be 4.Compare the priority of PLC1 and PLC4, the priority of the two is identical, preferentially PLC1 can be selected to run.
S260 is switched to the control program operation of highest priority in two priority classes program queue.
It is understood that there may be multiple with equal priority in two priority classes program queue and is in just Multiple control programs can be carried out rotation operation by the control program of thread state at this time, and each control program distributes preset duration.Example Such as, the number for obtaining the control program for having highest priority in the queue of two priority classes program and being in ready state is 3, Preset duration is 10ms, then 3 control programs are successively run according to setting sequence, and each control program runtime is 10ms。
The embodiment of the present invention is by combining each control program of scheduling for scheduling periods, priority, scheduling time piece Operation, meets the needs of different users, and eliminates the clocking error of accumulation, improves the utilization rate of time resource and cpu resource, improves The real-time and reliability of real time operating system.
Embodiment three
Fig. 3 a is the flow chart of a kind of control process control dispatching method that the embodiment of the present invention three provides, the present embodiment with It is embodied based on above-described embodiment, in the present embodiment, the operation that switching control program is run, specifically: pass through Interrupt operation is switched to any control program operation.
Correspondingly, the method for the present embodiment may include:
S310 determines the scheduling time piece that program is controlled in each operating system according to the time span of scheduling periods.
It is corresponding to adjust the scheduling time piece adjustment information according to the scheduling time piece adjustment information received by S320 Scheduling time piece.
S330, judges whether current time is in the corresponding updated scheduling time piece of any control program;If It is then to execute S340;Otherwise S350 is executed.
S340 is run according to configuration scheduling rule by interrupt operation switching control program.
S350 is run by the control program that interrupt operation is switched to highest priority in two priority classes program queue.
In the present embodiment, switching control program is run, and can be realized by interrupt operation.
It is external in symmetric multiprocessor (Symmetrical Multi-Processing, SMP) framework of x86 platform The interrupt line of equipment is connected to input/output Advanced Programmable Interrupt Controllers APICs (Input/Output Advanced Programmable Interrupt Controller, I/O APIC) on, and the corresponding CPU of each operating system is arranged There is a local Advanced Programmable Interrupt Controllers APICs (Local Advanced Programmable Interrupt Controller, Local APIC), all Local APIC are all connected to I/O APIC, thus, multiple Local APIC and I/O APIC can be operated mutually by APIC bus as a whole, the system for forming APIC more than one.
There are 24 interrupt lines, i.e. 24 interrupt pins on usual I/O APIC, each interrupt pin corresponds to a weight It orients table clause (Redirection Table Entry, RTE), includes interruption masking code, triggering mode, interrupt pin in RTE Polarity interrupts delivery mode, transmission state, purpose domain model, purpose domain and interrupt vector.It controls program and generates interrupt operation letter Number when, I/O APIC is formatted into interrupt message according to internal RTE, and the interrupt message is sent to the Local of target CPU APIC, then handled by Local APIC notice target CPU.
It is understood that control Program Manager system can be set for the interrupt operation that supervisor control program is initiated One management.Specifically it can be, it will be by the interrupt line of the external equipment of control process control and in input/output advanced programmable Disconnected controller connection, each external equipment can initiate interrupt operation by control program, and be believed interrupt operation by interrupt line Number it is sent to input/output Advanced Programmable Interrupt Controllers APICs, is managed during each control program initiates by control Program Manager Disconnected operation.
It may include: to work as to detect in control program initiation specifically, being run by interrupt operation switching control program When disconnected operation, interrupt message is generated according to redirection table entry;It will by the input/output Advanced Programmable Interrupt Controllers APICs The interrupt message is sent to the central processing unit of the corresponding operating system of the control program, by the center of the operating system Processor executes the interrupt operation.
But there is usually one I/O APIC in actual hardware environment, multiple operating systems operate I/O simultaneously The redirection table entry of APIC will lead to the confusion of true I/O APIC data.So generally by control Program Manager (such as void Quasi- machine manager) management that carries out interrupt message delivers, and when generating external interrupt, control Program Manager is intercepted and captured and causes to transport The CPU of the row control program generates control program and exits (such as virtual machine exits operation (VM-exit)) operation.At control program Virtual interrupt controller the interruption ends information is notified again after having managed interruption, which can cause the second secondary control program to exit behaviour Make.Namely when interrupting every time, it can all generate two secondary control programs and exit operation, thus every secondary control program, which exits, is related to The transfer of control stream can all bring huge context handover overhead, to cause the decline and delay of interrupt processing efficiency Increase, for real time operating system, will lead to the real-time for reducing real time operating system, wherein control Program Manager can be with It is virtual machine manager (Virtual Machine Monitor, VMM).
Therefore, in the present embodiment in order to improve the real-time of real time operating system, control Program Manager passes through interception Operation of the operating system to the redirection table entry of I/O APIC, by control Program Manager come mandatory modification RTE, to reach Interrupt message is directly delivered to the purpose of real time operating system.Optionally, interrupt message is being generated according to redirection table entry Before, further includes: according to the physical address of the input/output Advanced Programmable Interrupt Controllers APICs, respectively each control journey Sequence establishes corresponding extension page table;Input/output is advanced described in the operating system access corresponding with the control program compiles When journey interrupt control unit, triggers the control Program Manager and execute extension page table abnormality processing operation, wherein the extension page The logical address of the operating system of the corresponding control program of table does not map the input/output Advanced Programmable Interrupt Controllers APICs Physical address;By extension page table abnormality processing operation, determine occur extension page table exception address it is corresponding virtually it is advanced can Program interrupt control unit;Modifying that the input/output is advanced by the corresponding virtual Advanced Programmable Interrupt Controllers APICs can Program the redirection table entry of interrupt control unit and/or virtual Advanced Programmable Interrupt Controllers APICs.
Correspondingly, described generate interrupt message according to redirection table entry, it may include: according to modified re-direction table Entry generates interrupt message.
Wherein, extension page table (extended page-table, EPT) mechanism provides operating system physical address space Virtualization, the isolation of operating system physical address space is realized by EPT mechanism, after EPT is enabled, operating system is used Address be not true physical address, and true physical address could be accessed after needing to convert by EPT.Therefore, may be used With according to the physical address of I/O APIC, respectively each control program establishes corresponding EPT.
The physical address that EPT does not map I/O APIC is set simultaneously, in order in operating system access I/O APIC When, EPT exception handler can be triggered, thus by utilizing EPT mechanism, operating system access I/O in a control program When APIC, control Program Manager can be triggered and enter EPT exception handler, while the CPU for triggering operation control program is generated Control program exits operation.
Further, it by EPT exception handler, the available address that EPT exception occurs, and calls corresponding different Normal instruction simulation function, is parsed, the I/ of available abnormal operation by exceptional instructions of the function to the EPT exception of generation O API table entry index and data and instruction code etc., wherein data expression needs that redirection table entry is written The data of (Redirection Table Entry, RTE).
It optionally, may include: by controlling Program Manager before establishing corresponding EPT for each control program Initialization of virtual APIC, and by the read-write interface address registration of virtual APIC to management bus.Further, according to generation EPT Corresponding virtual APIC is searched from management bus (such as I/O BUS bus), and then calls writing for virtual APIC in abnormal address Interface realizes the write operation to the RTE of I/O APIC.
Specifically, during by control Program Manager initialization of virtual APIC, mandatory modification I/O APIC's RTE, as each control program establish corresponding modified RTE, are detecting operating system access corresponding with control program When I/O APIC, namely control program is when interrupting, according to modified RTE, can by true I/O APIC will in Disconnected message is directly delivered to corresponding operating system.
It optionally, can be specific to the write operation of the RTE of I/O APIC can include: judge the I/O APIC table of abnormal operation Whether the corresponding RTE of entry index distributes to control program, if it is, interface is write by corresponding virtual APIC, according to number According to the corresponding RTE of modification I/O APIC and virtual APIC, interface is otherwise write by corresponding virtual APIC, is repaired according to data Change the corresponding RTE of virtual APIC.
Wherein, interface is write by corresponding virtual APIC, according to the corresponding RTE of data modification I/O APIC, specifically If may include: corresponding RTE be multiple Peripheral Component Interconnect standards (Peripheral Component Interconnect, PCI) collaborative share then modifies the interruption in RTE and delivers mode as fixed delivery mode, and purpose domain model is logical schema, and Increase the APIC ID of the operating system in equipment in purpose domain.
At this point, monopolizing a RTE since non-device PCI is to monopolize an I/O APIC interrupt line, therefore at this moment will The data got directly write to RTE, and corresponding operation system is allowed to monopolize the I/O APIC's for using non-device PCI Interrupt line.But for device PCI, it is understood that there may be multiple device PCIs use the same I/O APIC interrupt line, and therefore, it is necessary to repair Mode, purpose domain model are delivered in the interruption changed in data, and increase the APIC of corresponding real time operating system in purpose domain ID, at this point, since real time operating system is easy to get its source code, and the requirement of real-time of real time operating system is higher, therefore, In the embodiment of the present invention, corresponding RTE can be modified mainly for real time operating system, so that real time operating system is corresponding Device PCI interrupts, i.e., can be straight by I/O APIC when the corresponding control program of device PCI initiates interrupt operation signal Meet the CPU that interrupt message is delivered to corresponding real time operating system.
Wherein, interface is write by corresponding virtual APIC, according to the corresponding RTE of the virtual APIC of data modification, specifically It may include: to judge whether the corresponding RTE of I/O APIC table item index distributes to the equipment pair in interface in writing for virtual APIC The control program answered occurs control program and exits the control program of operation, if it is, needing simultaneously in I/O APIC and void Data are written in quasi- APIC, that is, modify corresponding RTE, if control program interrupt occurs later at this time, true I/O APIC can To be based on the modified RTE, interrupt message is directly sent to the CPU of corresponding operation system;It otherwise is I/O APIC table The corresponding RTE of entry index is not allocated to the control program, it is only necessary to be written in virtual APIC and be managed, and be not written into true I/O APIC, only realize a virtual mapping as a result,.When controlling program transmission interruption, due to true I/O The RTE of APIC is not allocated to the control program, therefore, interrupt message would not be also sent to the control program, reduce control Processing procedure sequence exits the generation of operation, to improve interrupt processing efficiency.
Correspondingly, if control program is the corresponding control program of non-device PCI, and the equipment monopolizes one of I/O APIC Interrupt message is then directly sent to the CPU of corresponding operating system by RTE by I/O APIC;If the control program sets for PCI Standby corresponding control program, and a RTE of the equipment and other collaborative share I/O APIC, then will be interrupted by I/O APIC Message is broadcast to the CPU of corresponding operating system.
In the embodiment of the present invention, using EPT mechanism, EPT exception is triggered, into the abnormality processing journey of control Program Manager Sequence, and write interface by virtual APIC, modifies the RTE of I/O APIC, realizes monitor operating system to the RTE's of I/O APIC The purpose of read-write, and the modification of RTE corresponding to operating system may be implemented, and then when control program generation interrupt operation, root According to modified RTE, interrupt message can be directly delivered to the CPU of corresponding operation system by I/O APIC, without passing through control Program Manager processed is managed delivery, reduces each interrupt processing process bring in the prior art and repeatedly controls program and moves back Operate out, reduce therefrom stopping pregnancy it is raw to interrupt processing function it is called between time delay, so as to improve real-time oss The real-time of system, and improve the access efficiency of I/O control program.
Based on the above embodiment, above-described embodiment can be made further specifically using a specific application scenarios Bright, specific as shown in Figure 3b, the interruption processing method between the corresponding operating system of multi-core central processing unit can specifically include:
S371, PLC manager initialization of virtual APIC, and the corresponding read-write driving interface of the virtual APIC is registered to I/ O BUS bus.
The logical address of S372, the operating system being arranged in the EPT of each control program do not map the physics of I/O APIC Address.
Such as the physical address of I/O APIC is 0xFE000000-0xFE001000, is not mapped in the EPT of control program The physical address.This is entered to when controlling the operating system access I/O APIC in program, trigger EPT exception EPT exception handler achievees the purpose that monitor operating system reads and writes the RTE of I/O APIC using EPT mechanism to realize, And then modify corresponding RTE.
It is abnormal to generate EPT when controlling the operating system initialization I/O APIC in program, and causes to run the control by S373 The CPU of program generates PLC and exits operation, and triggering PLC manager enters EPT exception handler.
Specifically, the I/O APIC is accessed in each operating system initialization I/O APIC by setting EPT, due to It is not mapped into the physical address of the I/O APIC, therefore, EPT exception can be triggered, into EPT exception handler.
S374 obtains the address that EPT exception occurs by EPT exception handler, and analog function is called to simulate the exception The execution of instruction, analog function is according to the address resolution exceptional instructions that EPT exception occurs, the I/O of acquisition instruction code, abnormal operation APIC table item index and data.
Wherein, data indicate to need to be written the data of EPT.
S375 drives according to the virtual APIC control program that registration is searched in the address that EPT exception occurs from I/O BUS bus It is dynamic, call the I/O APIC's of registration to write interface.
S376, when virtual APIC write the corresponding RTE of I/O APIC table item index in interface distribute to generate PLC exit behaviour When the control program of work, write data into the data structure of true I/O APIC and virtual APIC.
S377, when virtual APIC write the corresponding RTE of I/O APIC table item index in interface be not yet assigned to generate PLC exit When the control program of operation, write data into the data structure of virtual APIC.
It by the operation of interception control Program Manager, forces to distort RTE using operating system, finally to control journey After sequence is interrupted, interrupt message can be directly sent to the CPU of operating system by I/O APIC, without managing by PLC Device is managed, reduces PLC and exits operation, improve interrupt processing efficiency.
S378, if RTE is that multiple PCI control procedure sharing, the RTE of true I/O APIC is only by non-real time operating system Write operation is carried out, while modifying the interruption in its data and delivering mode as fixed delivery mode, purpose domain model is logical schema, And the APIC ID of purpose domain increase real time operating system.
As a result, by modifying RTE when I/O APIC is initialized, PLC only occurs in initialization at this time and exits operation, When control program is interrupted, only interrupt message directly need to be sent to by phase by true I/O APIC according to modified RTE The CPU for the operating system answered, the PLC for not needing to reduce by PLC manager control program exits operation, and then improves Interrupt processing efficiency guarantees the real-time of embedded real time operating system.
Based on the above embodiment, above-described embodiment can be made further specifically using a specific application scenarios Bright, specific as shown in Figure 3c, the interruption processing method between the corresponding operating system of multi-core central processing unit can specifically include:
S381 initializes I/O APIC by real time operating system and non-real time operating system, it is abnormal to generate EPT, and lead It causes the CPU for running the control program to produce PLC and exits operation.
Wherein, non-real time operating system and real time operating system are separately operable corresponding PLC.
S382, triggering PLC manager enter EPT exception handler.
Also, by EPT exception handler, the address that EPT exception occurs, the I/O APIC of abnormal operation are at least obtained Table item index and data.
S383 searches the virtual APIC control driven by program of registration, calls the I/O APIC's of registration to write interface, to repair Change the RTE of I/O APIC.
S384, when controlling program and interrupting, interrupt message is sent to pair according to modified RTE by I/O APIC The Local APIC of the CPU for the operating system answered, then handled by Local APIC notice CPU, it realizes interrupt message Directly it is delivered to real time operating system.
Example IV
Fig. 4 is the schematic diagram for the control process control dispatching device that the embodiment of the present invention four provides.The present embodiment is to realize The related device for the control process control dispatching method that the above embodiment of the present invention provides, described device specifically include:
Scheduling time piece determining module 410 determines in each operating system for the time span according to scheduling periods Control the scheduling time piece of program;
Scheduling time piece adjusts module 420, for adjusting the scheduling according to the scheduling time piece adjustment information received The corresponding scheduling time piece of timeslice adjustment information;
Program scheduler module 430 is controlled, after judging whether current time is in the corresponding update of any control program Scheduling time piece in;If it is, being run according to configuration scheduling rule switching control program;Otherwise two priority classes are switched to The control program operation of highest priority in program queue.
The embodiment of the present invention passed through according to scheduling time piece adjustment information, the scheduling time of corresponding each control program of adjustment Piece, solve distribute in the prior art control program execute task timeslice it is excessive or it is too small cause time resource waste Problem realizes reasonable distribution time resource, improves the real-time and reliability of real time operating system.
Further, the scheduling time piece adjustment information is the vacant information of scheduling time piece.
Further, the scheduling time piece adjustment module 420 is also used to: when scheduling corresponding for each control program Between piece, at the beginning of task and the finish time of task adds mark information respectively;According to the label of the start time The mark information of information and the finish time, when determining free time of each control program in the scheduling time piece currently distributed Between;According to the free time, reduce the scheduling time piece of each control program.
Further, the scheduling time piece adjustment information is scheduling time piece warning message.
Further, the scheduling time piece adjustment module 420 is also used to: the determining and scheduling time piece warning message Corresponding control program;The scheduling time piece for obtaining the control program, increases the control according to scheduling time piece warning message The scheduling time piece of processing procedure sequence.
Further, the control program scheduler module 430 is also used to: when using first timer and second timer pair When each control program is scheduled, be switched to current time be in ready state control program operation, wherein described first Timer is adjusted for controlling each control program switching, the second timer in a scheduling periods for controlling Spend time cycle switching;When being not provided with the first timer and the second timer, the current time is in The control program of highest priority is preferential in the priority of the control program of ready state, with the two priority classes program queue Grade is compared, and switches to the control program operation of highest priority.
Further, described device further include: switchover operation module, for being switched to any control journey by interrupt operation Sort run.
Further, control Program Manager manages the interrupt operation that each control program is initiated.
Further, the switchover operation module includes: interrupt message generation module, detects control program hair for working as When the interrupt operation risen, interrupt message is generated according to redirection table entry;Interrupt operation sending module, for by described defeated Enter/export Advanced Programmable Interrupt Controllers APICs to send the interrupt message in the corresponding operating system of the control program Central processor executes the interrupt operation by the central processing unit of the operating system.
Further, described device is also used to: physically according to the input/output Advanced Programmable Interrupt Controllers APICs Location, respectively each control program establish corresponding extension page table;When operating system access corresponding with control program institute When stating input/output Advanced Programmable Interrupt Controllers APICs, triggers the control Program Manager and execute extension page table abnormality processing Operation, wherein it is high that the logical address of the operating system for extending the corresponding control program of page table does not map the input/output The physical address of grade programmable interrupt controller;By extending the operation of page table abnormality processing, determines and extension page table exception occurs The corresponding virtual Advanced Programmable Interrupt Controllers APICs in address;Pass through the corresponding virtual Advanced Programmable Interrupt Controllers APICs modification The redirection table entry of the input/output Advanced Programmable Interrupt Controllers APICs and/or virtual Advanced Programmable Interrupt Controllers APICs.
Further, the interrupt message generation module is also used to: being generated and is interrupted according to modified redirection table entry Message.
Control process control dispatching method provided by any embodiment of the invention can be performed in above-mentioned dispatching device, has and holds The capable corresponding functional module of control process control dispatching method and beneficial effect.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention five provides.Fig. 5, which is shown, to be suitable for being used to Realize the block diagram of the exemplary computer device 501 of embodiment of the present invention.The computer equipment 501 that Fig. 5 is shown is only one A example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 5, computer equipment 501 is showed in the form of universal computing device.The component of computer equipment 501 can To include but is not limited to: one or more processor or processing unit 502, system storage 503 connect not homologous ray group The bus 504 of part (including system storage 503 and processing unit 502).
Bus 504 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (Industry Standard Architecture, ISA) bus, microchannel architecture (Micro Channel Architecture, MCA) bus, enhancing Type isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local Bus and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Computer equipment 501 typically comprises a variety of computer system readable media.These media can be it is any can The usable medium accessed by computer equipment 501, including volatile and non-volatile media, moveable and immovable Jie Matter.
System storage 503 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (Random Access Memory, RAM) 505 and/or cache memory 506.Computer equipment 501 can be with It further comprise other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, Storage system 507 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 5 do not show, commonly referred to as " hard drive Device ").Although being not shown in Fig. 5, the disk for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided and driven Dynamic device, and to removable anonvolatile optical disk (such as compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other Optical medium) read-write CD drive.In these cases, each driver can be connect by one or more data medium Mouth is connected with bus 504.System storage 503 may include at least one program product, the program product have one group (such as At least one) program module, these program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 509 with one group of (at least one) program module 508, can store and deposit in such as system In reservoir 503, such program module 508 include --- but being not limited to --- operating system, one or more application program, It may include the reality of network environment in other program modules and program data, each of these examples or certain combination It is existing.Program module 508 usually executes function and/or method in embodiment described in the invention.
Computer equipment 501 can also be with one or more external equipments 510 (such as keyboard, sensing equipment, display 511 etc.) it communicates, the equipment interacted with the computer equipment 501 communication can be also enabled a user to one or more, and/or (such as network interface card is adjusted with any equipment for enabling the computer equipment 501 to be communicated with one or more of the other calculating equipment Modulator-demodulator etc.) communication.This communication can be carried out by input/output (Input/Output, I/O) interface 512.And And computer equipment 501 can also pass through network adapter 513 and one or more network (such as local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and/or public network, such as internet) communication. As shown, network adapter 513 is communicated by bus 504 with other modules of computer equipment 501.Although should be understood that It is not shown in Fig. 5, other hardware and/or software module can be used in conjunction with computer equipment 501, including but not limited to: micro- generation Code, device driver, redundant processing unit, external disk drive array, disk array (Redundant Arrays of Inexpensive Disks, RAID) system, tape drive and data backup storage system etc..
Processing unit 502 by the program that is stored in system storage 503 of operation, thereby executing various function application with And data processing, such as realize a kind of control process control dispatching method provided by the embodiment of the present invention.
That is, the processing unit is realized when executing described program: according to the time span of scheduling periods, determining each The scheduling time piece of program is controlled in operating system;According to the scheduling time piece adjustment information received, when adjusting the scheduling Between the corresponding scheduling time piece of piece adjustment information;Judge whether current time is in the corresponding updated tune of any control program It spends in timeslice;If it is, being run according to configuration scheduling rule switching control program;Otherwise it is switched to two priority classes program The control program operation of highest priority in queue.
Embodiment six
The embodiment of the present invention six provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The control process control dispatching method provided such as all inventive embodiments of the application is provided when sequence is executed by processor:
That is, realization when the program is executed by processor: according to the time span of scheduling periods, determining each operation system The scheduling time piece of program is controlled on system;According to the scheduling time piece adjustment information received, the scheduling time piece tune is adjusted The corresponding scheduling time piece of whole information;Judge whether current time is in any control program corresponding updated scheduling time In piece;If it is, being run according to configuration scheduling rule switching control program;Otherwise it is switched in two priority classes program queue The control program of highest priority is run.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, RAM, read-only memory (Read Only of one or more conducting wires Memory, ROM), erasable programmable read only memory (Erasable Programmable Read Only Memory, EPROM), flash memory, optical fiber, portable CD-ROM, light storage device, magnetic memory device or above-mentioned any appropriate combination. In this document, it includes or the tangible medium of storage program that the program can be by that computer readable storage medium, which can be any, Instruction execution system, device or device use or in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be Any computer-readable medium other than computer readable storage medium, which can send, propagate or Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In --- wireless, electric wire, optical cable, radio frequency (RadioFrequency, RF) etc. or above-mentioned any appropriate group It closes.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? It is related in the situation of remote computer, remote computer can pass through the network of any kind --- including LAN or WAN --- even It is connected to subscriber computer, or, it may be connected to outer computer (such as pass through internet using ISP Connection).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of control process control dispatching method characterized by comprising
According to the time span of scheduling periods, the scheduling time piece that program is controlled in each operating system is determined;
According to the scheduling time piece adjustment information received, the scheduling time piece adjustment information corresponding scheduling time is adjusted Piece;
Judge whether current time is in the corresponding updated scheduling time piece of any control program;If it is, according to The operation of configuration scheduling rule switching control program;Otherwise it is switched to the control journey of highest priority in two priority classes program queue Sort run.
2. the method according to claim 1, wherein the scheduling time piece adjustment information is that scheduling time piece is empty Remaining information;
It is described to adjust the corresponding scheduling time piece of the scheduling time piece adjustment information, comprising:
For the corresponding scheduling time piece of each control program, added respectively at the beginning of task with the finish time of task Mark information;
According to the mark information of the mark information of the start time and the finish time, determine each control program current Free time in the scheduling time piece of distribution;
According to the free time, reduce the scheduling time piece of each control program.
3. method according to claim 1 or 2, which is characterized in that the scheduling time piece adjustment information is scheduling time Piece warning message;
It is described to adjust the corresponding scheduling time piece of the scheduling time piece adjustment information, comprising:
Determine control program corresponding with the scheduling time piece warning message;
The scheduling time piece for obtaining the control program increases the scheduling of the control program according to scheduling time piece warning message Timeslice.
4. the method according to claim 1, wherein described transport according to configuration scheduling rule switching control program Row, comprising:
When being scheduled using first timer and second timer to each control program, being switched to current time is in The control program of ready state is run, wherein the first timer in a scheduling periods for controlling each control The switching of processing procedure sequence, the second timer is for controlling scheduling periods switching;
When being not provided with the first timer and the second timer, be in the control of ready state the current time The priority of program is compared with the priority of the control program of highest priority in the two priority classes program queue, Switch to the control program operation of highest priority.
5. being run the method according to claim 1, wherein being switched to any control program by interrupt operation.
6. according to the method described in claim 5, it is characterized in that, control Program Manager management each control program is initiated Interrupt operation;
It is described that any control program operation is switched to by interrupt operation, comprising:
When detecting the interrupt operation that control program is initiated, interrupt message is generated according to redirection table entry;
The corresponding behaviour of the control program is sent by the interrupt message by input/output Advanced Programmable Interrupt Controllers APICs The central processing unit for making system executes the interrupt operation by the central processing unit of the operating system.
7. according to the method described in claim 6, it is characterized in that, according to redirection table entry generate interrupt message before, Further include:
According to the physical address of the input/output Advanced Programmable Interrupt Controllers APICs, respectively each control program foundation pair The extension page table answered;
When the input/output Advanced Programmable Interrupt Controllers APICs described in the operating system access corresponding with the control program, touching Sending out control Program Manager described executes extension page table abnormality processing operation, wherein the corresponding control program of the extension page table The logical address of operating system do not map the physical address of the input/output Advanced Programmable Interrupt Controllers APICs;
By extension page table abnormality processing operation, determine in the corresponding virtual advanced programmable in address that extension page table exception occurs Disconnected controller;
The input/output advanced programmable interrupt control is modified by the corresponding virtual Advanced Programmable Interrupt Controllers APICs The redirection table entry of device and/or virtual Advanced Programmable Interrupt Controllers APICs;
It is described that interrupt message is generated according to redirection table entry, comprising:
Interrupt message is generated according to modified redirection table entry.
8. a kind of control process control dispatching device characterized by comprising
Scheduling time piece determining module determines for the time span according to scheduling periods and controls journey in each operating system The scheduling time piece of sequence;
Scheduling time piece adjusts module, for adjusting the scheduling time piece according to the scheduling time piece adjustment information received The corresponding scheduling time piece of adjustment information;
Program scheduler module is controlled, when for judging whether current time is in the corresponding updated scheduling of any control program Between in piece;If it is, being run according to configuration scheduling rule switching control program;Otherwise it is switched to two priority classes program queue The control program of middle highest priority is run.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes the control as described in any in claim 1-7 when executing described program Process control dispatching method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The control process control dispatching method as described in any in claim 1-7 is realized when execution.
CN201810746025.4A 2018-07-09 2018-07-09 Control program control scheduling method, control program control scheduling device, computer equipment and storage medium Active CN108958157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810746025.4A CN108958157B (en) 2018-07-09 2018-07-09 Control program control scheduling method, control program control scheduling device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810746025.4A CN108958157B (en) 2018-07-09 2018-07-09 Control program control scheduling method, control program control scheduling device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108958157A true CN108958157A (en) 2018-12-07
CN108958157B CN108958157B (en) 2020-09-18

Family

ID=64482484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810746025.4A Active CN108958157B (en) 2018-07-09 2018-07-09 Control program control scheduling method, control program control scheduling device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108958157B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947548A (en) * 2019-03-15 2019-06-28 美智光电科技有限公司 The method and apparatus that the method and apparatus and control task for distributing timeslice execute
CN110703677A (en) * 2019-09-29 2020-01-17 四川中曼电气工程技术有限公司 PLC control system integrated on industrial personal computer
CN111027101A (en) * 2019-12-17 2020-04-17 北京交大思诺科技股份有限公司 Safe computer platform with flexibly distributed operation cycles
CN111026037A (en) * 2019-11-26 2020-04-17 西安航天精密机电研究所 Industrial robot motion controller based on WINDOWS platform and control method
CN111099306A (en) * 2019-11-22 2020-05-05 珠海格力智能装备有限公司 Method and device for determining clamping plate of tooling plate
CN111371815A (en) * 2018-12-25 2020-07-03 上海亮衡信息科技有限公司 Communication method, system and communication equipment based on time slice triggering
CN112198839A (en) * 2019-07-08 2021-01-08 发那科株式会社 PLC device
CN113051198A (en) * 2021-03-08 2021-06-29 惠州Tcl移动通信有限公司 Mobile terminal module processing method and device, mobile terminal and storage medium
CN114281404A (en) * 2021-12-24 2022-04-05 科东(广州)软件科技有限公司 Method and device for transplanting algorithm codes of industrial personal computer
CN114879593A (en) * 2022-05-07 2022-08-09 科东(广州)软件科技有限公司 Method, device and equipment for real-time system to operate PLC (programmable logic controller) and storage medium
CN115048206A (en) * 2022-08-15 2022-09-13 阿里巴巴(中国)有限公司 Resource scheduling method and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929772A (en) * 2012-10-16 2013-02-13 苏州迈科网络安全技术股份有限公司 Monitoring method and system of intelligent real-time system
CN103049332A (en) * 2012-12-06 2013-04-17 华中科技大学 Virtual CPU scheduling method
CN103678003A (en) * 2013-12-18 2014-03-26 华中科技大学 Virtual CPU scheduling method capable of enhancing real-time performance
CN106470228A (en) * 2015-08-19 2017-03-01 研祥智能科技股份有限公司 Network communication method and system
CN107506234A (en) * 2017-07-03 2017-12-22 北京东土科技股份有限公司 A kind of dispatching method of virtual machine and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929772A (en) * 2012-10-16 2013-02-13 苏州迈科网络安全技术股份有限公司 Monitoring method and system of intelligent real-time system
CN103049332A (en) * 2012-12-06 2013-04-17 华中科技大学 Virtual CPU scheduling method
CN103678003A (en) * 2013-12-18 2014-03-26 华中科技大学 Virtual CPU scheduling method capable of enhancing real-time performance
CN106470228A (en) * 2015-08-19 2017-03-01 研祥智能科技股份有限公司 Network communication method and system
CN107506234A (en) * 2017-07-03 2017-12-22 北京东土科技股份有限公司 A kind of dispatching method of virtual machine and device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111371815A (en) * 2018-12-25 2020-07-03 上海亮衡信息科技有限公司 Communication method, system and communication equipment based on time slice triggering
CN109947548A (en) * 2019-03-15 2019-06-28 美智光电科技有限公司 The method and apparatus that the method and apparatus and control task for distributing timeslice execute
CN109947548B (en) * 2019-03-15 2020-11-20 美智光电科技股份有限公司 Method and device for distributing time slices and method and device for controlling task execution
CN112198839A (en) * 2019-07-08 2021-01-08 发那科株式会社 PLC device
CN112198839B (en) * 2019-07-08 2024-03-08 发那科株式会社 PLC device
CN110703677A (en) * 2019-09-29 2020-01-17 四川中曼电气工程技术有限公司 PLC control system integrated on industrial personal computer
CN111099306A (en) * 2019-11-22 2020-05-05 珠海格力智能装备有限公司 Method and device for determining clamping plate of tooling plate
CN111026037A (en) * 2019-11-26 2020-04-17 西安航天精密机电研究所 Industrial robot motion controller based on WINDOWS platform and control method
CN111026037B (en) * 2019-11-26 2021-01-08 西安航天精密机电研究所 Industrial robot motion controller based on WINDOWS platform and control method
CN111027101B (en) * 2019-12-17 2021-11-12 北京交大思诺科技股份有限公司 Safe computer platform with flexibly distributed operation cycles
CN111027101A (en) * 2019-12-17 2020-04-17 北京交大思诺科技股份有限公司 Safe computer platform with flexibly distributed operation cycles
CN113051198A (en) * 2021-03-08 2021-06-29 惠州Tcl移动通信有限公司 Mobile terminal module processing method and device, mobile terminal and storage medium
CN114281404A (en) * 2021-12-24 2022-04-05 科东(广州)软件科技有限公司 Method and device for transplanting algorithm codes of industrial personal computer
CN114879593A (en) * 2022-05-07 2022-08-09 科东(广州)软件科技有限公司 Method, device and equipment for real-time system to operate PLC (programmable logic controller) and storage medium
CN115048206A (en) * 2022-08-15 2022-09-13 阿里巴巴(中国)有限公司 Resource scheduling method and server

Also Published As

Publication number Publication date
CN108958157B (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN108958157A (en) Control process control dispatching method, device, computer equipment and storage medium
US11861203B2 (en) Method, apparatus and electronic device for cloud service migration
US9697041B2 (en) Method for dynamic interrupt balanced mapping based on current scheduling states of VCPUs
CN104714846A (en) Resource processing method, operating system and equipment
CN109522087B (en) Virtual mechanism building method and system based on domestic Shenwei processor
CN104866374A (en) Multi-task-based discrete event parallel simulation and time synchronization method
US8108879B1 (en) Method and apparatus for context switching of multiple engines
US20200012507A1 (en) Control system for microkernel architecture of industrial server and industrial server comprising the same
CN103677990B (en) Dispatching method, device and the virtual machine of virtual machine real-time task
US20220222111A1 (en) Deep learning framework scheduling
US20190042151A1 (en) Hybrid framework of nvme-based storage system in cloud computing environment
US10002016B2 (en) Configuration of virtual machines in view of response time constraints
US11831410B2 (en) Intelligent serverless function scaling
US20130054860A1 (en) Optimistic interrupt affinity for devices
CN105786674A (en) Scheduling method and electronic device
US20230048833A1 (en) Method, apparatus, and storage medium for scheduling tasks
CN103617088A (en) Method, device and processor of device for distributing core resources in different types of threads of processor
US10318456B2 (en) Validation of correctness of interrupt triggers and delivery
CN109729113B (en) Method, server system and computer program product for managing dedicated processing resources
US11366679B2 (en) Guest operating system wake-up method, device, electronic apparatus, and readable medium
US7467289B1 (en) Indicating acknowledge of stable state of pipeline resource when freeze bit set and context switch inhibited
CN113296926A (en) Resource allocation method, computing device and storage medium
CN114860387B (en) I/O virtualization method of HBA controller for virtualization storage application
US11556371B2 (en) Hypervisor task execution management for virtual machines
CN103562869B (en) Audio-frequency processing method under virtualized environment and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20181207

Assignee: Beijing Shuili Intelligent Building Technology Co.,Ltd.

Assignor: KYLAND TECHNOLOGY Co.,Ltd.

Contract record no.: X2022990000047

Denomination of invention: Control program control scheduling method, device, computer equipment and storage medium

Granted publication date: 20200918

License type: Common License

Record date: 20220121