CN110928657A - Embedded system certainty analysis method - Google Patents

Embedded system certainty analysis method Download PDF

Info

Publication number
CN110928657A
CN110928657A CN201911126637.4A CN201911126637A CN110928657A CN 110928657 A CN110928657 A CN 110928657A CN 201911126637 A CN201911126637 A CN 201911126637A CN 110928657 A CN110928657 A CN 110928657A
Authority
CN
China
Prior art keywords
task
time
utilization rate
resources
analysis
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
CN201911126637.4A
Other languages
Chinese (zh)
Other versions
CN110928657B (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.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
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 Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN201911126637.4A priority Critical patent/CN110928657B/en
Publication of CN110928657A publication Critical patent/CN110928657A/en
Application granted granted Critical
Publication of CN110928657B publication Critical patent/CN110928657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for analyzing the determinacy of an embedded system, which is used for solving the technical problem of poor practicability of the existing method for analyzing the determinacy of the embedded system. The technical scheme is that the interrupt of an embedded system is abstracted, a mathematical model of periodic interrupt and non-periodic interrupt is established, the influence of the interrupt on the task response time is considered in the task execution process, the delay of the interrupt on the task execution is analyzed, and the analysis precision of task execution certainty is improved; abstracting space resources in the embedded system, and checking whether the space resources can meet the requirements during task execution to obtain accurate task response time. According to the relation between the task response time and the worst execution time and the requirements for the space resources, a time utilization rate and space utilization rate model of the task is established, the use conditions of the time resources and the space resources in the embedded system are quantitatively analyzed, specific numerical values of the time resources and the space resource utilization rate are obtained, the accuracy of determining and analyzing the embedded system is improved, and the practicability is good.

Description

Embedded system certainty analysis method
Technical Field
The invention relates to a method for analyzing the certainty of an embedded system.
Background
The document "strict periodic task schedulability determination under single processor platform [ J ] computer engineering, 2016,42(05): 288-. Analyzing the time constraint of conflict-free operation of the strict-period task under the single processor platform, calculating all spare time which can be used by the task, further defining whether the continuous spare time meets the requirement of task execution or not, and obtaining a sufficient condition for schedulability judgment. In an actual embedded system, the execution of the periodic task is influenced by interruption, so that the delay of the periodic task even cannot be executed; when a task is executed, besides the time constraint needs to be considered, factors such as space resources in the system, for example, memory, also affect the response time of the task, and uncertainty is brought to the schedulability of the task.
Disclosure of Invention
In order to overcome the defect of poor practicability of the existing embedded system certainty analysis method, the invention provides the embedded system certainty analysis method. The method abstracts the interruption of an embedded system, establishes a mathematical model of periodic interruption and non-periodic interruption, has interruption priority higher than that of a task, considers the influence of the interruption on the response time of the task in the task execution process, adopts a truncation method to simulate the time generated by the non-periodic interruption, analyzes the delay brought by the interruption on the task execution, and improves the analysis precision of task execution certainty; abstracting space resources in the embedded system, and checking whether the space resources can meet the requirements or not during task execution so as to obtain more accurate task response time. According to the relation between the task response time and the worst execution time and the requirements for the space resources, a time utilization rate and space utilization rate model of the task is established, the use conditions of the time resources and the space resources in the embedded system are quantitatively analyzed, specific numerical values of the time resource and space resource use rates are obtained, the accuracy of determining and analyzing the embedded system is improved, and the practicability is good.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for analyzing the certainty of an embedded system is characterized by comprising the following steps:
step one, establishing an embedded system interrupt model.
Modeling periodic interruption and non-periodic interruption of the embedded system, wherein the periodic interruption model is represented by an octave group:
Ip=<idI,typeI,priorityI,off,periodI,resptimeI,exetimeI,pubevent>(1)
wherein idIFor a unique identifier of the interrupt, typeIIndicates the type of interrupt, where the interrupt type is a periodic interrupt, priorityIIndicating the priority of the interrupt, the larger the value, the higher the priority, off indicating the offset between the period and the start position, periodIFor the period of interruption, i.e. the time interval between two interruptions, resptimeIIndicating the interrupt response time, the time between the issuance of an interrupt request and the entry into the interrupt handling, exetimeIThe interrupt execution time is represented, namely the time between the start of the interrupt execution and the exit of the interrupt, and the pubovent is an event generated by the interrupt, and the event can trigger the corresponding task to execute.
For non-periodic interrupts, the interrupt is defined for a certain time period t0,t1]The internal clothes simulate the occurrence time of the non-periodic interruption by generating random numbers by a rounding method from a specific distribution function, and the model of the non-periodic interruption is represented by a nine-tuple:
Iap=<idI,typeI,priorityI,off,F(x),timeinterval,resptimeI,exetimeI,pubevent>(2)
the non-periodic interruption is distinguished by the addition of f (x) as a distribution function obeyed by the non-periodic interruption, compared to the periodic interruption; timenterval is the range of values in the distribution function for time x.
And step two, establishing a periodic task model of the embedded system.
Defining a model of a periodic task in an embedded system, and regarding the description of the periodic task, not only considering the time characteristics, but also bringing the requirements of space resources into the model:
Tp=<idT,periodT,priorityT,resptimeT,exetimeT,deadline,spacesize,status>(3)
in the formula, idTFor task identifiers, used in the system to uniquely represent tasks, periodTIs the period of a task, and refers to the time interval, priority, between two triggers of the taskTFor task priority, in preemption mode, high priority tasks would preempt low priority tasks, resptimeTIndicating the response time of the task, the time interval between the task establishment and the start of the task execution, exectimeTThe task scheduling method comprises the steps of representing the time overhead required by task execution, deadline representing the task deadline, and before the time, the task is not executed and is overtime, space representing the size of space resources required by the task execution, sub-tasks being added into a task sequence and being scheduled by a task scheduler, status representing the state of the task, and adopting a classical three-state model comprising a ready state, a blocking state and a running state. In the analysis process, the task state is blocked to the ready state: the task obtains the required resources, and the analysis time is SC + +; the operation state is changed into a ready state: high priority task preemption, task switching time ST + +, analysis time SC + +; ready state to run state: the current task has the highest priority, the task execution time ET + +, and the analysis time SC + +; running state to blocking state: resources could not be satisfied and SC + + was used for analysis.
And step three, a task scheduler model of the embedded system.
Task scheduling strategies in the embedded system are divided into two types, namely preemptive scheduling and non-preemptive scheduling, and accordingly a task scheduler model is established. Preemptive scheduling allows a high priority task to preempt a low priority task, whereas non-preemptive scheduling does not allow a high priority task to preempt a low priority task unless the low priority task is actively relinquishing processor resources. In both types of task scheduling modes, the interrupt preempts the task.
And fourthly, managing the space resources of the embedded system.
The resources in the system are divided into special space resources and shared space resources, the special space resources can be used only by specific tasks, other tasks are not authorized to use, the shared space resources are used as public space resources, and all tasks have use right.
And step five, calculating the utilization rate of system resources.
Resource utilization in the system includes time resource utilization and space resource utilization.
The space resource utilization rate comprises a dedicated space resource utilization rate RLSiAnd public space resource utilization rate RSGThe calculation formula is as follows:
Figure BDA0002277044680000031
in the formula, RLSiIndicating the utilization of the proprietary spatial resources,
Figure BDA0002277044680000032
indicating used proprietary spatial resources, LSiIndicating the exclusive space resource provided by the system, and i indicates the ith exclusive space resource.
Figure BDA0002277044680000033
In the formula, RSGRepresenting the utilization rate of the public space resources,
Figure BDA0002277044680000034
indicating the used public space resources, SGRepresenting the public space resources provided by the system.
The time resource utilization rate of the system is expressed as the ratio of the actual use time to the total analysis time, and is specifically expressed as:
Figure BDA0002277044680000035
in the formula, RT represents the utilization rate of system time resources, S represents the total simulation duration of the system, and RTxIndicating the response time of the x-th task, ETxDenotes the x-th taskExecution time of the transaction, STyThe time spent on the y-th task switching is shown, x and y respectively show the number of tasks in the system and the number of task switching times, m shows the total number of tasks, and n shows the total number of task switching times.
And step six, calculating the utilization rate of the key task resources.
The resource utilization of the critical tasks includes two aspects: a time resource utilization and a space resource utilization. In the analysis process, the system space resource utilization rate and the time resource utilization rate of the task in the execution process of the key task are marked. The space resource utilization rate of the key task refers to the use condition of space resources in the execution process of the key task.
Figure BDA0002277044680000041
Where k denotes the kth mission critical, RSkRepresents the spatial resource utilization of the critical task,
Figure BDA0002277044680000043
indicating used spatial resources, TSkTotal amount of spatial resources for critical tasks.
The critical task time resource utilization rate represents the ratio of the time interval from the beginning to the completion of the execution of the critical task to the preset dead time interval from the beginning to the completion of the task. In the analysis process, recording the moment BT at which the key task starts to be executedCTAnd a preset dead time DTCTAnd according to the analysis result, obtaining the time ET when the task is completedCTAnd calculating the time resource utilization rate RT of the key task according to the formula (8)CT
Figure BDA0002277044680000042
And seventhly, analyzing the certainty of the embedded system.
Before starting analysis, specifying the space resource utilization rate of a key task in a system and the space resource utilization rate of the system, specifying the time resource utilization rate relative to the task deadline in the task execution process, simulating a system clock by adopting a virtual clock in the analysis, and performing the deterministic analysis process of the task as follows:
firstly, setting system analysis total time, and obtaining key task parameters when the SC is 0 during initialization analysis;
judging whether the total analysis time is reached, stopping analysis if the total analysis time is reached, recording an analysis result, and continuing if the total analysis time is not reached;
judging whether the system is in an IDLE state, if no running task exists in the system, executing an IDLE task of an IDLE state, and adding 1 to the analysis time SC;
judging a preemption mode of a system, scheduling tasks by adopting different scheduling strategies according to the preemption mode, determining the currently executed task, and adding 1 to the analysis time;
analyzing the space resource utilization rate of the system and the key task at the current moment, if the space resource utilization rate does not meet the requirement, terminating the analysis, and recording the analysis result;
and analyzing the time resource utilization rate of the current system and the key task, if the time resource utilization rate does not meet the requirement, terminating the analysis, and recording the analysis result.
The invention has the beneficial effects that: the method abstracts the interruption of an embedded system, establishes a mathematical model of periodic interruption and non-periodic interruption, has interruption priority higher than that of a task, considers the influence of the interruption on the response time of the task in the task execution process, adopts a truncation method to simulate the time generated by the non-periodic interruption, analyzes the delay brought by the interruption on the task execution, and improves the analysis precision of task execution certainty; abstracting space resources in the embedded system, and checking whether the space resources can meet the requirements or not during task execution so as to obtain more accurate task response time. According to the relation between the task response time and the worst execution time and the requirements for the space resources, a time utilization rate and space utilization rate model of the task is established, the use conditions of the time resources and the space resources in the embedded system are quantitatively analyzed, specific numerical values of the time resource and space resource use rates are obtained, the accuracy of determining and analyzing the embedded system is improved, and the practicability is good.
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
Drawings
Fig. 1 is a schematic diagram of a task scheduling process in the method of the present invention.
FIG. 2 is a flow chart of a method for embedded system deterministic analysis of the present invention.
FIG. 3 is a diagram of task state transitions during analysis by the method of the present invention.
Detailed Description
Reference is made to fig. 1-3. The embedded system certainty analysis method of the invention comprises the following steps:
step one, establishing an interruption model.
Respectively modeling periodic interruption and non-periodic interruption in an embedded system, determining periodic activation time by using a period offset for the periodic interruption, restricting the interruption generation time by using an interruption occurrence time interval for the non-periodic interruption, setting a distribution function which is accorded with the non-periodic interruption in the interval, and determining the interruption generation time by using a truncation method.
The periodic interruption model is represented by octaves:
Ip=<idI,typeI,priorityI,off,periodI,resptimeI,exetimeI,pubevent>(1)
wherein idIFor a unique identifier of the interrupt, typeIIndicates the type of interrupt, where the interrupt type is a periodic interrupt, priorityIIndicating the priority of the interrupt, the larger the value, the higher the priority, off indicating the offset between the period and the start position, periodIFor the period of interruption, i.e. the time interval between two interruptions, resptimeIIndicating the interrupt response time, the time between the issuance of an interrupt request and the entry into the interrupt handling, exetimeIThe interrupt execution time is represented, namely the time between the start of the interrupt execution and the exit of the interrupt, and the pubovent is an event generated by the interrupt, and the event can trigger the corresponding task to execute.
The model of the aperiodic interrupt is represented using a nine-tuple:
Iap=<idI,typeI,priorityI,off,F(x),timeinterval,resptimeI,exetimeI,pubevent>(2)
the non-periodic interruption is distinguished by the addition of f (x) as a distribution function obeyed by the non-periodic interruption, compared to the periodic interruption; timenterval is the range of values in the distribution function for time x.
And step two, establishing a task model.
For periodic tasks in an embedded system, time characteristics including priority, period, response time, execution time and deadline are analyzed, and in addition, space resource constraint spacisze for task execution needs to be increased.
Tp=<idT,periodT,priorityT,resptimeT,exetimeT,deadline,spacesize,status>(3)
In formula (3), idTFor task identifiers, used in the system to uniquely represent tasks, periodTIs the period of a task, and refers to the time interval, priority, between two triggers of the taskTFor task priority, in preemption mode, high priority tasks would preempt low priority tasks, resptimeTIndicating the response time of the task, the time interval between the task establishment and the start of the task execution, exectimeTThe task execution method comprises the steps of representing the time overhead required by task execution, deadline representing the task deadline, wherein the task is not executed and is overtime before the deadline, space representing the size of space resources required by the task execution, and status representing the state of the task, wherein a classical three-state model is adopted and comprises a ready state, a blocking state and a running state. In the analysis process, the task state is blocked to the ready state: the task obtains the required resources, and the analysis time is SC + +; the operation state is changed into a ready state: high priority task preemption, task switching time ST + +, analysis time SC + +; ready state to run state: the current task has the highest priority, the task execution time ET + +, and the analysis time SC + +; running state to blocking state: resources could not be satisfied and SC + + was used for analysis.
And step three, establishing a scheduler model.
Task scheduling strategies in the embedded system are divided into two types, namely preemptive scheduling and non-preemptive scheduling, and accordingly a task scheduler model is established. Preemptive scheduling allows a high priority task to preempt a low priority task, whereas non-preemptive scheduling does not allow a high priority task to preempt a low priority task unless the low priority task is actively relinquishing processor resources. In both types of task scheduling modes, the interrupt preempts the task.
Sched=<typesch,tasknum,prioritiessch,taskSW(),taskPrioHighRdy()> (4)
In formula (4), typeschThe method indicates the types of the schedulers and is divided into preemptive scheduling and non-preemptive scheduling, tasknum indicates the maximum number of tasks supported by the task scheduler, prioritiesschThe method comprises the steps that a scheduler supports the highest priority, only one task is allowed to exist under each priority, taskSW () is a task switching function, the function is called to complete switching of the tasks under a preemptive scheduling mode, and taskPrioHighRdy () is used for searching the task with the highest priority in a current ready task queue and is used as the current executed task.
And step four, establishing a system space resource model.
The resources in the system are divided into special space resources and shared space resources, the special space resources can be used only by specific tasks, other tasks are not authorized to use, the shared space resources are used as public space resources, and all tasks have use right.
The special space resource is defined in the task model and can only be used by the task, and other tasks have no permission to use the special space resource; the public space resource is defined independently, and any space resource required to be used in the embedded system is allowed to be applied for use in the public space resource.
And step five, calculating the utilization rate of system resources.
Resource utilization in the system includes time resource utilization and space resource utilization.
Space resource utilization including private spaceResource utilization RLSiAnd public space resource utilization rate RSGThe calculation formula is as follows:
Figure BDA0002277044680000071
in formula (5), RLSiIndicating the utilization of the proprietary spatial resources,
Figure BDA0002277044680000072
indicating used proprietary spatial resources, LSiIndicating the exclusive space resource provided by the system, and i indicates the ith exclusive space resource.
Figure BDA0002277044680000073
RS in equation (6)GRepresenting the utilization rate of the public space resources,
Figure BDA0002277044680000074
indicating the used public space resources, SGRepresenting the public space resources provided by the system.
The time resource utilization rate of the system is expressed as the ratio of the actual use time to the total analysis time, and is specifically expressed as:
Figure BDA0002277044680000075
in formula (7), RT represents the utilization rate of system time resources, S represents the total simulation duration of the system, and RTxIndicating the response time of the x-th task, ETxIndicating the execution time of the x-th task, STyThe time spent on the y-th task switching is shown, x and y respectively show the number of tasks in the system and the number of task switching times, m shows the total number of tasks, and n shows the total number of task switching times.
And step six, establishing a key task resource utilization rate model.
The resource utilization of the critical tasks includes two aspects: a time resource utilization and a space resource utilization. In the analysis process, the system space resource utilization rate and the time resource utilization rate of the task in the execution process of the key task are marked. The space resource utilization rate of the key task refers to the use condition of space resources in the execution process of the key task.
Figure BDA0002277044680000081
In equation (8), k represents the kth key task, RSkRepresents the spatial resource utilization of the critical task,
Figure BDA0002277044680000082
indicating used spatial resources, TSkTotal amount of spatial resources for critical tasks.
The critical task time resource utilization rate represents the ratio of the time interval from the beginning to the completion of the execution of the critical task to the preset dead time interval from the beginning to the completion of the task. In the analysis process, recording the moment BT at which the key task starts to be executedCTAnd a preset dead time DTCTAnd according to the analysis result, obtaining the time ET when the task is completedCTAnd calculating the time resource utilization ratio RT of the key task according to the formula (9)CT
Figure BDA0002277044680000083
And seventhly, analyzing the certainty of the embedded system.
Before starting analysis, specifying the space resource utilization rate of a key task in a system and the space resource utilization rate of the system, specifying the time resource utilization rate relative to the task deadline in the task execution process, simulating a system clock by adopting a virtual clock in the analysis, and performing the deterministic analysis process of the task as follows:
firstly, setting total analysis time, and acquiring key task parameters when the SC is 0 during initialization analysis;
judging whether the total analysis time is reached, stopping analysis if the total analysis time is reached, recording an analysis result, and continuing if the total analysis time is not reached;
judging whether the system is in an IDLE state, if no running task exists in the system, executing an IDLE task of an IDLE state, and adding 1 to the analysis time SC;
judging a preemption mode of a system, scheduling tasks by adopting different scheduling strategies according to the preemption mode, determining the currently executed task, and adding 1 to the analysis time;
analyzing the space resource utilization rate of the system and the key task at the current moment, if the space resource utilization rate does not meet the requirement, terminating the analysis, and recording the analysis result;
and analyzing the time resource utilization rate of the current system and the key task, if the time resource utilization rate does not meet the requirement, terminating the analysis, and recording the analysis result.

Claims (1)

1. A method for analyzing the certainty of an embedded system is characterized by comprising the following steps:
step one, establishing an embedded system interrupt model;
modeling periodic interruption and non-periodic interruption of the embedded system, wherein the periodic interruption model is represented by an octave group:
Ip=<idI,typeI,priorityI,off,periodI,resptimeI,exetimeI,pubevent>(1)
wherein idIFor a unique identifier of the interrupt, typeIIndicates the type of interrupt, where the interrupt type is a periodic interrupt, priorityIIndicating the priority of the interrupt, the larger the value, the higher the priority, off indicating the offset between the period and the start position, periodIFor the period of interruption, i.e. the time interval between two interruptions, resptimeIIndicating the interrupt response time, the time between the issuance of an interrupt request and the entry into the interrupt handling, exetimeIRepresenting the interrupt execution time, namely the time from the start of interrupt execution to the exit of interrupt, wherein the pubovent is an event generated by the interrupt, and the event can trigger the execution of a corresponding task;
for non-periodic interrupts, the interrupt is defined for a certain time period t0,t1]The internal clothes simulate the occurrence time of the non-periodic interruption by generating random numbers by a rounding method from a specific distribution function, and the model of the non-periodic interruption is represented by a nine-tuple:
Iap=<idI,typeI,priorityI,off,F(x),timeinterval,resptimeI,exetimeI,pubevent>(2)
the non-periodic interruption is distinguished by the addition of f (x) as a distribution function obeyed by the non-periodic interruption, compared to the periodic interruption; timenterval is the span of time x in the distribution function;
step two, establishing a periodic task model of the embedded system;
defining a model of a periodic task in an embedded system, and regarding the description of the periodic task, not only considering the time characteristics, but also bringing the requirements of space resources into the model:
Tp=<idT,periodT,priorityT,resptimeT,exetimeT,deadline,spacesize,status>(3)
in the formula, idTFor task identifiers, used in the system to uniquely represent tasks, periodTIs the period of a task, and refers to the time interval, priority, between two triggers of the taskTFor task priority, in preemption mode, high priority tasks would preempt low priority tasks, resptimeTIndicating the response time of the task, the time interval between the task establishment and the start of the task execution, exectimeTRepresenting the time overhead required by task execution, deadline representing the task deadline, before which the task is not executed and is not finished, and other tasks are overtime, space representing the size of space resources required by the task execution, sub-tasks being added into a task sequence and receiving the scheduling of a task scheduler, status representing the state of the task, and adopting a classical three-state model comprising a ready state, a blocking state and a running state; in the analysis process, the task state is blocked to the ready state: the task obtains the required resources, and the analysis time is SC + +; the operation state is changed into a ready state: high priority task preemption, task switching time ST + +, analysis time SC + +; ready state to run state: current task possessionThe highest priority, the task execution time ET + +, and the analysis time SC + +; running state to blocking state: resources are not satisfied, SC + + for analysis;
step three, a task scheduler model of the embedded system;
dividing task scheduling strategies in the embedded system into two types, namely preemptive scheduling and non-preemptive scheduling, and establishing a task scheduler model according to the two types; allowing the high-priority task to preempt the low-priority task during preemptive scheduling, and not allowing the high-priority task to preempt the low-priority task during non-preemptive scheduling, wherein the high-priority task can be executed unless the low-priority task actively gives up processor resources; in the two task scheduling modes, the interrupt can seize the task;
fourthly, managing the space resources of the embedded system;
resources in the system are divided into special space resources and shared space resources, the special space resources can be used only by specific tasks, other tasks are not authorized to use, the shared space resources are used as public space resources, and all tasks have use right;
fifthly, calculating the utilization rate of system resources;
the resource utilization rate in the system comprises time resource utilization rate and space resource utilization rate;
the space resource utilization rate comprises a dedicated space resource utilization rate RLSiAnd public space resource utilization rate RSGThe calculation formula is as follows:
Figure FDA0002277044670000021
in the formula, RLSiIndicating the utilization of the proprietary spatial resources,
Figure FDA0002277044670000022
indicating used proprietary spatial resources, LSiRepresenting a proprietary space resource provided by the system, i representing the ith proprietary space resource;
Figure FDA0002277044670000023
in the formula, RSGRepresenting the utilization rate of the public space resources,
Figure FDA0002277044670000024
indicating the used public space resources, SGRepresenting public space resources provided by the system;
the time resource utilization rate of the system is expressed as the ratio of the actual use time to the total analysis time, and is specifically expressed as:
Figure FDA0002277044670000025
in the formula, RT represents the utilization rate of system time resources, S represents the total simulation duration of the system, and RTxIndicating the response time of the x-th task, ETxIndicating the execution time of the x-th task, STyThe time spent on the y-th task switching is shown, x and y respectively show the number of tasks in the system and the number of task switching times, m shows the total number of tasks, and n shows the total number of task switching times;
step six, calculating the utilization rate of the key task resources;
the resource utilization of the critical tasks includes two aspects: a time resource utilization rate and a space resource utilization rate; in the analysis process, marking the utilization rate of system space resources and the utilization rate of time resources of the task in the execution process of the key task; the space resource utilization rate of the key task refers to the use condition of space resources in the execution process of the key task;
Figure FDA0002277044670000031
where k denotes the kth mission critical, RSkRepresents the spatial resource utilization of the critical task,
Figure FDA0002277044670000033
indicating used spatial resources, TSkKey renTotal amount of spatial resources of the transaction;
the key task time resource utilization rate represents the ratio of the time interval from the beginning to the completion of the execution of the key task to the preset dead time interval from the beginning to the execution of the task; in the analysis process, recording the moment BT at which the key task starts to be executedCTAnd a preset dead time DTCTAnd according to the analysis result, obtaining the time ET when the task is completedCTAnd calculating the time resource utilization rate RT of the key task according to the formula (8)CT
Figure FDA0002277044670000032
Seventhly, an embedded system certainty analysis method;
before starting analysis, specifying the space resource utilization rate of a key task in a system and the space resource utilization rate of the system, specifying the time resource utilization rate relative to the task deadline in the task execution process, simulating a system clock by adopting a virtual clock in the analysis, and performing the deterministic analysis process of the task as follows:
firstly, setting system analysis total time, and obtaining key task parameters when the SC is 0 during initialization analysis;
judging whether the total analysis time is reached, stopping analysis if the total analysis time is reached, recording an analysis result, and continuing if the total analysis time is not reached;
judging whether the system is in an IDLE state, if no running task exists in the system, executing an IDLE task of an IDLE state, and adding 1 to the analysis time SC;
judging a preemption mode of a system, scheduling tasks by adopting different scheduling strategies according to the preemption mode, determining the currently executed task, and adding 1 to the analysis time;
analyzing the space resource utilization rate of the system and the key task at the current moment, if the space resource utilization rate does not meet the requirement, terminating the analysis, and recording the analysis result;
and analyzing the time resource utilization rate of the current system and the key task, if the time resource utilization rate does not meet the requirement, terminating the analysis, and recording the analysis result.
CN201911126637.4A 2019-11-18 2019-11-18 Deterministic analysis method for embedded system Active CN110928657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911126637.4A CN110928657B (en) 2019-11-18 2019-11-18 Deterministic analysis method for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911126637.4A CN110928657B (en) 2019-11-18 2019-11-18 Deterministic analysis method for embedded system

Publications (2)

Publication Number Publication Date
CN110928657A true CN110928657A (en) 2020-03-27
CN110928657B CN110928657B (en) 2023-05-02

Family

ID=69854135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911126637.4A Active CN110928657B (en) 2019-11-18 2019-11-18 Deterministic analysis method for embedded system

Country Status (1)

Country Link
CN (1) CN110928657B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813531A (en) * 2020-08-31 2020-10-23 北京国科环宇科技股份有限公司 Clock scheduling method and system for operating system
CN112506609A (en) * 2020-12-02 2021-03-16 西北工业大学 Scene depicting method for embedded system time sequence simulation analysis
CN113094260A (en) * 2021-03-18 2021-07-09 西北工业大学 Distributed system time sequence relation modeling and simulation analysis method
CN114818570A (en) * 2022-03-11 2022-07-29 西北工业大学 Embedded system time sequence analysis method based on Monte Carlo simulation
CN112506609B (en) * 2020-12-02 2024-05-31 西北工业大学 Scene characterization method for time sequence simulation analysis of embedded system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070136729A1 (en) * 2005-12-14 2007-06-14 Darren Neuman Method and system for efficient audio scheduling for dual-decode digital signal processor (DSP)
CN102812439A (en) * 2010-03-25 2012-12-05 国际商业机器公司 Power management in a multi-processor computer system
CN106293919A (en) * 2016-08-12 2017-01-04 中国航空工业集团公司西安飞行自动控制研究所 The built-in tasks dispatching device of a kind of Time Triggered and method
CN106293902A (en) * 2015-05-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of processor scheduling method and system
CN107943568A (en) * 2017-10-31 2018-04-20 北京航空航天大学 Comprehensively modularized avionics system two-level scheduler model and Prototyping Platform
CN108196950A (en) * 2018-01-24 2018-06-22 苏州大学 A kind of real time implementation operating system and its method applied to narrowband Internet of Things
CN108932160A (en) * 2017-10-10 2018-12-04 北京猎户星空科技有限公司 Multiple operating system control method, device, electronic equipment and computer storage medium
CN109684060A (en) * 2018-12-21 2019-04-26 中国航空工业集团公司西安航空计算技术研究所 A kind of mixed scheduling method of polymorphic type time-critical task
US20190286477A1 (en) * 2018-03-16 2019-09-19 Imam Abdulrahman Bin Faisal University Real-time feasibility systems and methods

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070136729A1 (en) * 2005-12-14 2007-06-14 Darren Neuman Method and system for efficient audio scheduling for dual-decode digital signal processor (DSP)
CN102812439A (en) * 2010-03-25 2012-12-05 国际商业机器公司 Power management in a multi-processor computer system
CN106293902A (en) * 2015-05-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of processor scheduling method and system
CN106293919A (en) * 2016-08-12 2017-01-04 中国航空工业集团公司西安飞行自动控制研究所 The built-in tasks dispatching device of a kind of Time Triggered and method
CN108932160A (en) * 2017-10-10 2018-12-04 北京猎户星空科技有限公司 Multiple operating system control method, device, electronic equipment and computer storage medium
CN107943568A (en) * 2017-10-31 2018-04-20 北京航空航天大学 Comprehensively modularized avionics system two-level scheduler model and Prototyping Platform
CN108196950A (en) * 2018-01-24 2018-06-22 苏州大学 A kind of real time implementation operating system and its method applied to narrowband Internet of Things
US20190286477A1 (en) * 2018-03-16 2019-09-19 Imam Abdulrahman Bin Faisal University Real-time feasibility systems and methods
CN109684060A (en) * 2018-12-21 2019-04-26 中国航空工业集团公司西安航空计算技术研究所 A kind of mixed scheduling method of polymorphic type time-critical task

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
PETER WASZECKI: ""Automotive Electrical and Electronic Architecture Security via Distributed In-Vehicle Traffic Monitoring"", 《 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS》 *
三少爷的剑123: ""时钟中断周期对操作系统整体实时性的影响分析"", 《HTTPS://WWW.CNBLOGS.COM/NEW0801/ARCHIVE/2012/04/04/6176076.HTML》 *
甘正良: ""基于uC/OS-III的一种实时内核中断管理机制"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
黄姝娟: ""双重触发的嵌入式系统内核安全访问控制"", 《计算机与现代化》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813531A (en) * 2020-08-31 2020-10-23 北京国科环宇科技股份有限公司 Clock scheduling method and system for operating system
CN111813531B (en) * 2020-08-31 2020-11-27 北京国科环宇科技股份有限公司 Clock scheduling method and system for operating system
CN112506609A (en) * 2020-12-02 2021-03-16 西北工业大学 Scene depicting method for embedded system time sequence simulation analysis
CN112506609B (en) * 2020-12-02 2024-05-31 西北工业大学 Scene characterization method for time sequence simulation analysis of embedded system
CN113094260A (en) * 2021-03-18 2021-07-09 西北工业大学 Distributed system time sequence relation modeling and simulation analysis method
CN113094260B (en) * 2021-03-18 2024-04-05 西北工业大学 Distributed system time sequence relation modeling and simulation analysis method
CN114818570A (en) * 2022-03-11 2022-07-29 西北工业大学 Embedded system time sequence analysis method based on Monte Carlo simulation
CN114818570B (en) * 2022-03-11 2024-02-09 西北工业大学 Embedded system time sequence analysis method based on Monte Carlo simulation

Also Published As

Publication number Publication date
CN110928657B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN110928657B (en) Deterministic analysis method for embedded system
EP1221094B1 (en) Method for time partitioned application scheduling in a computer operating system
Leyva-del-Foyo et al. Predictable interrupt management for real time kernels over conventional PC hardware
Audsley et al. Mechanisms for enhancing the flexibility and utility of hard real-time systems
Marinho et al. Limited pre-emptive global fixed task priority
CN107193655A (en) A kind of fair resource dispatching method towards big data processing based on utility function
Omar et al. Comparative analysis of the essential CPU scheduling algorithms
Bucci et al. Modeling flexible real time systems with preemptive time Petri nets
CN110275765A (en) Data parallel job scheduling method based on branch DAG dependency
Wang et al. Research on real-time embedded software scheduling model based on edf
CN108845870B (en) Probabilistic real-time task scheduling method based on pWCET shaping
Huang et al. Schedulability and priority assignment for multi-segment self-suspending real-time tasks under fixed-priority scheduling
Årzén et al. Implementation-aware embedded control systems
Yang et al. Improved blocking time analysis and evaluation for the multiprocessor priority ceiling protocol
KR100981017B1 (en) Method for re-defining priority and managing ready queue in system having static task define function and system for executing the method
Negrean et al. Timing analysis of multi-mode applications on AUTOSAR conform multi-core systems
Erickson Managing tardiness bounds and overload in soft real-time systems
CN113094260B (en) Distributed system time sequence relation modeling and simulation analysis method
Alfranseder et al. An efficient spin-lock based multi-core resource sharing protocol
Nosrati et al. Task scheduling algorithms introduction
Zhang et al. Middleware support for aperiodic tasks in distributed real-time systems
Yaashuwanth et al. Web-enabled framework for real-time scheduler simulator (a teaching tool)
CN113806924A (en) Task schedulability verification method for distributed system
Li et al. H-pfsp: Efficient hybrid parallel pfsp protected scheduling for mapreduce system
Cao et al. Improved DAG tasks stretching algorithm based on multi-core processors

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