CN105404577B - A kind of partition operating system time monitoring method based on information sharing treatment mechanism - Google Patents
A kind of partition operating system time monitoring method based on information sharing treatment mechanism Download PDFInfo
- Publication number
- CN105404577B CN105404577B CN201510901582.5A CN201510901582A CN105404577B CN 105404577 B CN105404577 B CN 105404577B CN 201510901582 A CN201510901582 A CN 201510901582A CN 105404577 B CN105404577 B CN 105404577B
- Authority
- CN
- China
- Prior art keywords
- subregion
- time
- operating system
- run time
- run
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention belongs to embedded real-time operating system development field, and in particular to a kind of partition operating system time monitoring method based on information sharing treatment mechanism.This method comprises the following steps:1st, shared data block is established;2nd, accumulator resource is established;3rd, the outer run time of subregion is calculated;4th, will be by outside this subregion on operating time log shared data block;5th, time monitoring is carried out to run entity in subregion;This method is to realize the time monitoring to process in subregion, subregion and the empty time that interrupts, and helps embedded real-time operating system developer to obtain the true operation information of system from run time angle.
Description
Technical field
The invention belongs to embedded real-time operating system development field, and in particular to one kind is based on information sharing treatment mechanism
Partition operating system time monitoring method.
Background technology
With synthesization, the development of modular system, embedded OS from the operating system of single plate armature,
Develop into the operating system of the multi partition structure of complexity.In partition operating system, the scheduling of two levels be present.
In the core, multiple subregions configure the time sequencing operation of distribution according to dispatch list, in a zone time window
After the completion of operation, next partition running can be switched to;
In subregion, the process in subregion uses the dispatching algorithm based on priority, and subregion internal weakness is interrupted and can also taken point
The run time in area, process and empty interruption can not perceive whether there occurs subregion switching in its run time.Time is to embedded
Using being extremely critical resource, embedded system development person is generally concerned about process in subregion and subregion, the empty execution interrupted very much
Time is, it is necessary to which passage time monitoring data obtains the true operation information of system.For partition operating system, due to entering in subregion
Journey, empty interruption can not perceive the switching of subregion in core, be brought to the process in monitored partition, the empty true run time of interruption
It is difficult.
The content of the invention
In order to solve the problems, such as in background technology, the present invention, which provides one kind, allows system developer to obtain subregion and subregion
The partition operating system time monitoring method based on information sharing treatment mechanism of interior process, the empty time monitoring data interrupted.
The concrete technical scheme of the present invention:
1) it is that each subregion distribution one is total to for what core and subregion accessed jointly in operating system kernel initial phase
Enjoy data block;The shared data block is used for subregion outer run time, this cut-in timing of subregion of each subregion;
2) during partition initialization, accumulator resource is initialized;The accumulator resource includes being used to record one
Partition running time while the subregion accumulator of the last renewal time of record partitioning, when being interrupted for recording a void
Between it is empty interrupt accumulator, for recording multiple process accumulators of multiple process run times;
3) the outer run time of subregion is calculated;
3.1) obtain subregion and cut out the time;
In kernel operating system operation, when subregion switching occurs, for each subregion, kernel operating system record
The time that this subregion last time cuts out;
3.2) this cut-in timing of acquisition subregion;
When cutting this subregion again, kernel operating system record cuts this cut-in timing of this subregion;
3.3) the outer run time of subregion is calculated;
The time cut out according to the subregion last time and this cut-in timing of subregion, calculate when being run outside the subregion of this subregion
Between;
4) run time outside this subregion, this cut-in timing of subregion be recorded into shared data block corresponding to this subregion
On;
5) time monitoring is carried out to run entity in subregion;The run entity include subregion body, in subregion process with
And subregion internal weakness is interrupted;
A, in subregion process time monitoring;
In partition operating system operation, when process switches, query steps 4 first) shared data block in remember
The outer run time of the subregion of record, judges whether that there occurs subregion switching;
If subregion switching does not occur, according to process operation starting time and process end time, difference is asked to calculate in subregion
This run time of process;This run time of process in subregion is increased in process accumulator;
If there occurs subregion switching, this run time is modified, by this run time of process in subregion
Subtract the outer run time of subregion;This run time of process in revised subregion is increased in process accumulator;
B, the time monitoring that subregion internal weakness is interrupted;
In partition operating system operation, when being switched to empty interrupt processing, between recording at the beginning of empty interrupt processing, move back
When going out empty interrupt, the record end time;
If subregion switching does not occur, this empty interrupt processing time is calculated according to end time and time started;
If generation subregion switches, time started and end time are interrupted according to void, asks difference to calculate subregion internal weakness and interrupts this
Secondary run time;Subregion internal weakness is interrupted into this run time increases to empty interrupt in accumulator;
C, the partition running time is monitored;
In partition operating system operation, when process or empty interruption switch, check whether and subregion switching occurs, such as
Fruit is there occurs subregion switching, then to subregion, this run time calculates simultaneously;It is specific as follows:
By the outer run time of subregion described in the renewal time of the last subregion in subregion integrating instrument, step 3) and work as
The preceding time is calculated, and formula is:
Subregion this run time=(current time)-(renewal time of last subregion)-(the outer run time of subregion)
By subregion, this run time increases in subregion accumulator;
6) repeat step 3) to step 5), realize in process and subregion internal weakness in all subregions in operating system, subregion
Disconnected event-monitoring.
The advantage of the invention is that:
1st, The inventive method achieves the time monitoring to process in subregion, subregion and the empty time that interrupts, help
Embedded real-time operating system developer obtains the true operation information of system from run time angle.
Brief description of the drawings
Fig. 1 calculates the schematic diagram of the outer run time of subregion.
The schematic diagram that Fig. 2 cores and subregion pass through the monitoring information transmission of shared data block deadline.
Process, subregion internal weakness break period monitoring flow chart in Fig. 3 subregions.
Embodiment
The invention provides a kind of partition operating system time monitoring method based on information sharing treatment mechanism, this method
Comprise the concrete steps that:
1) it is that each subregion distribution one is total to for what core and subregion accessed jointly in operating system kernel initial phase
Enjoy data block;The shared data block is used for subregion outer run time, this cut-in timing of subregion of each subregion;
2) during partition initialization, accumulator resource is initialized;The accumulator resource includes being used to record one
Partition running time while the subregion accumulator of the last renewal time of record partitioning, when being interrupted for recording a void
Between it is empty interrupt accumulator, for recording multiple process accumulators of multiple process run times;
3) the outer run time of subregion is calculated;
3.1) obtain subregion and cut out the time;
In kernel operating system operation, when subregion switching occurs, for each subregion, kernel operating system record
The time that this subregion last time cuts out;
3.2) this cut-in timing of acquisition subregion;
When cutting this subregion again, kernel operating system record cuts this cut-in timing of this subregion;
3.3) the outer run time of subregion is calculated;
The time cut out according to the subregion last time and this cut-in timing of subregion, calculate when being run outside the subregion of this subregion
Between;
4) run time outside this subregion, this cut-in timing of subregion be recorded into shared data block corresponding to this subregion
On;More new state is arranged to, the process that allows in subregion or empty interrupts the information that can know subregion switching.On shared data block
The outer run time of subregion can be added up, and after run entity (process or empty interruption) reads this data in subregion, will can be shared
The data dump recorded in data block;
5) time monitoring is carried out to run entity in subregion;The run entity include subregion body, in subregion process with
And subregion internal weakness is interrupted;
A, in subregion process time monitoring;
In partition operating system operation, when process switches, query steps 4 first) shared data block in remember
The outer run time of the subregion of record, judges whether that there occurs subregion switching;
If subregion switching does not occur, according to process operation starting time and process end time, difference is asked to calculate in subregion
This run time of process;This run time of process in subregion is increased in process accumulator;
If there occurs subregion switching, this run time is modified, by this run time of process in subregion
Subtract the outer run time of subregion;This run time of process in revised subregion is increased in process accumulator;
B, the time monitoring that subregion internal weakness is interrupted;
In partition operating system operation, when being switched to empty interrupt processing, between recording at the beginning of empty interrupt processing, move back
When going out empty interrupt, the record end time;
If subregion switching does not occur, this empty interrupt processing time is calculated according to end time and time started;
If generation subregion switches, time started and end time are interrupted according to void, asks difference to calculate subregion internal weakness and interrupts this
Secondary run time;Subregion internal weakness is interrupted into this run time increases to empty interrupt in accumulator;
C, the partition running time is monitored;
In partition operating system operation, when process or empty interruption switch, check whether and subregion switching occurs, such as
Fruit is there occurs subregion switching, then to subregion, this run time calculates simultaneously;It is specific as follows:
By the outer run time of subregion described in the renewal time of the last subregion in subregion integrating instrument, step 3) and work as
The preceding time is calculated, and formula is:
Subregion this run time=(current time)-(renewal time of last subregion)-(the outer run time of subregion);
By subregion, this run time increases in subregion accumulator;
6) repeat step 3) to step 5), realize in process and subregion internal weakness in all subregions in operating system, subregion
Disconnected event-monitoring.
Claims (1)
- A kind of 1. partition operating system time monitoring method based on information sharing treatment mechanism, it is characterised in that including following Step:1) it is that each subregion distributes a shared number accessed jointly for core and subregion in operating system kernel initial phase According to block;The shared data block is used for subregion outer run time, this cut-in timing of subregion of each subregion;2) during partition initialization, accumulator resource is initialized;The accumulator resource includes being used to record a subregion The subregion accumulator of the last renewal time of run time while record partitioning, interrupted the time for recording a void Void interrupts accumulator, for recording multiple process accumulators of multiple process run times;3) the outer run time of subregion is calculated;3.1) obtain subregion and cut out the time;In kernel operating system operation, when subregion switching occurs, for each subregion, kernel operating system records this point The time that area is cut out the last time;3.2) this cut-in timing of acquisition subregion;When cutting this subregion again, kernel operating system record cuts this cut-in timing of this subregion;3.3) the outer run time of subregion is calculated;The time cut out according to the subregion last time and this cut-in timing of subregion, calculate the outer run time of subregion of this subregion;4) run time outside this subregion, this cut-in timing of subregion recorded corresponding to this subregion on shared data block;5) time monitoring is carried out to run entity in subregion;The run entity is including process in subregion body, subregion and divides Area's internal weakness is interrupted;A, in subregion process time monitoring;In partition operating system operation, when process switches, query steps 4 first) shared data block in record The outer run time of subregion, judges whether that there occurs subregion switching;If subregion switching does not occur, according to process operation starting time and process end time, difference is asked to calculate process in subregion This run time;This run time of process in subregion is increased in process accumulator;If there occurs subregion switching, this run time is modified, this run time of process in subregion is subtracted The outer run time of subregion;This run time of process in revised subregion is increased in process accumulator;B, the time monitoring that subregion internal weakness is interrupted;In partition operating system operation, when being switched to empty interrupt processing, between recording at the beginning of empty interrupt processing, void is exited During interruption, the record end time;If subregion switching does not occur, this empty interrupt processing time is calculated according to end time and time started;If generation subregion switches, time started and end time are interrupted according to void, asks difference to calculate subregion internal weakness and interrupts this fortune The row time;Subregion internal weakness is interrupted into this run time increases to empty interrupt in accumulator;C, the partition running time is monitored;In partition operating system operation, when process or empty interruption switch, check whether and subregion switching occurs, if hair Subregion switching is given birth to, then this run time calculates to subregion simultaneously;It is specific as follows:By the outer run time of subregion described in the renewal time of the last subregion in subregion integrating instrument, step 3) and it is current when Between calculated, formula is:Subregion this run time=(current time)-(renewal time of last subregion)-(the outer run time of subregion);By subregion, this run time increases in subregion accumulator;6) repeat step 3) to step 5), realize what process and subregion internal weakness in all subregions in operating system, subregion were interrupted Event-monitoring.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510901582.5A CN105404577B (en) | 2015-12-08 | 2015-12-08 | A kind of partition operating system time monitoring method based on information sharing treatment mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510901582.5A CN105404577B (en) | 2015-12-08 | 2015-12-08 | A kind of partition operating system time monitoring method based on information sharing treatment mechanism |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105404577A CN105404577A (en) | 2016-03-16 |
CN105404577B true CN105404577B (en) | 2017-11-28 |
Family
ID=55470075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510901582.5A Active CN105404577B (en) | 2015-12-08 | 2015-12-08 | A kind of partition operating system time monitoring method based on information sharing treatment mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105404577B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106776272B (en) * | 2016-11-11 | 2019-11-05 | 西北工业大学 | Embedded system real-time performance testing method |
CN109542610B (en) * | 2018-12-04 | 2023-06-30 | 中国航空工业集团公司西安航空计算技术研究所 | Method for realizing virtual interrupt standard component of multi-partition operating system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799512A (en) * | 2012-07-04 | 2012-11-28 | 南京邮电大学 | Virtual machine monitoring method in vector-autoregression-based cloud computing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4660058B2 (en) * | 2002-09-24 | 2011-03-30 | 株式会社東芝 | Network information terminal for monitoring and measurement |
-
2015
- 2015-12-08 CN CN201510901582.5A patent/CN105404577B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799512A (en) * | 2012-07-04 | 2012-11-28 | 南京邮电大学 | Virtual machine monitoring method in vector-autoregression-based cloud computing |
Non-Patent Citations (1)
Title |
---|
时间分区的设计与实现;李运喜 等;《航空计算学报》;20100731;第40卷(第4期);第76-69页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105404577A (en) | 2016-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103098032B (en) | Emulation mode and system | |
CN103080903B (en) | Scheduler, multi-core processor system and dispatching method | |
CN105404577B (en) | A kind of partition operating system time monitoring method based on information sharing treatment mechanism | |
CN102667745B (en) | Multicore system, multicore system control method and program stored in a non-transient readable medium | |
EP3623971A1 (en) | Information processing device and anomaly response method | |
AU2001267749A1 (en) | Monitoring the health of a power plant | |
CN107003891A (en) | Virtual machine switching method, device, electronic equipment and computer program product | |
CN104932329B (en) | Frequency converter control method and system, frequency converter | |
EP3151116B1 (en) | Vehicle control apparatus | |
CN103366022A (en) | Information processing system and processing method for use therewith | |
CN106528065B (en) | A kind of thread acquisition methods and equipment | |
CN104615492B (en) | A kind of EMS memory management process of multi-core parallel concurrent discrete events simulation | |
CN104657150A (en) | Automatic operation and maintenance method in cluster environment | |
CN102508717A (en) | Memory scheduling method and memory scheduling device for multi-core processor | |
EP3531709B1 (en) | Communication method, central control device and individual control device | |
CN106412088B (en) | Data synchronization method and terminal | |
CN110232053A (en) | Log processing method, relevant device and system | |
CN106776032B (en) | The treating method and apparatus of the I/O request of distributed block storage | |
US11275621B2 (en) | Device and method for selecting tasks and/or processor cores to execute processing jobs that run a machine | |
CN102541646A (en) | Task scheduling method suitable for hard real-time system | |
CN111240829B (en) | Multi-core task scheduling method and device based on time slices, storage medium and electronic equipment | |
CN106028292B (en) | A kind of channel distribution method and system sending short message | |
CN110083441A (en) | A kind of distributed computing system and distributed computing method | |
CN115118733A (en) | Data processing method and device based on block chain, electronic equipment and storage medium | |
CN103618643A (en) | Method and device for dynamic alarm type monitoring of message queue |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |