CN110928657B - Deterministic analysis method for embedded system - Google Patents

Deterministic analysis method for embedded system Download PDF

Info

Publication number
CN110928657B
CN110928657B CN201911126637.4A CN201911126637A CN110928657B CN 110928657 B CN110928657 B CN 110928657B CN 201911126637 A CN201911126637 A CN 201911126637A CN 110928657 B CN110928657 B CN 110928657B
Authority
CN
China
Prior art keywords
task
time
analysis
resources
interrupt
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
Application number
CN201911126637.4A
Other languages
Chinese (zh)
Other versions
CN110928657A (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 an embedded system deterministic analysis method which is used for solving the technical problem that the existing embedded system deterministic analysis method is poor in practicality. The technical scheme is that interrupt of an embedded system is abstracted, mathematical models of periodic interrupt and non-periodic interrupt are established, influence of interrupt on task response time is considered in the task execution process, delay caused by interrupt on task execution is analyzed, and analysis precision of task execution certainty is improved; and abstracting the space resources in the embedded system, and checking whether the space resources can meet the requirements when the task is executed to obtain accurate task response time. According to the relation between task response time and worst execution time and the requirement on 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 use rates are obtained, the accuracy of the determination analysis of the embedded system is improved, and the practicability is good.

Description

Deterministic analysis method for embedded system
Technical Field
The invention relates to an embedded system deterministic analysis method.
Background
The document' strict cycle task schedulability determination under a single processor platform [ J ]. Computer engineering, 2016,42 (05): 288-291 ] discloses a strict cycle task schedulability analysis method based on characteristic tasks. And analyzing time constraint of collision-free operation of the strictly periodic task under a single processor platform, calculating all available free time of the task, and further defining whether continuous free time meets the requirement of task execution or not to obtain a schedulability judgment filling condition. In an actual embedded system, the execution of a periodic task is influenced by interruption, so that the delay of the periodic task is caused and the periodic task cannot be executed even; when a task is executed, besides time constraint, factors such as space resources in a system, for example, memory and the like, also influence 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 conventional embedded system deterministic analysis method, the invention provides the embedded system deterministic analysis method. The method abstracts the interrupt of the embedded system, establishes a mathematical model of periodic interrupt and non-periodic interrupt, and has higher interrupt priority than the task, considers the influence of the interrupt on the response time of the task in the process of executing the task, adopts a rounding method to simulate the time generated by the non-periodic interrupt, analyzes the delay caused by the interrupt on the task execution, and improves the analysis precision of the task execution certainty; the space resources in the embedded system are abstracted, and whether the space resources can meet the requirements or not is checked when the task is executed, so that more accurate task response time is obtained. According to the relation between task response time and worst execution time and the requirement on 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 use rates are obtained, the accuracy of the determination analysis of the embedded system is improved, and the practicability is good.
The invention solves the technical problems by adopting the technical scheme that: the deterministic analysis method of the embedded system is characterized by comprising the following steps:
step one, an embedded system interrupt model is built.
Modeling periodic interrupts and non-periodic interrupts of an embedded system, wherein the periodic interrupt model is represented by eight tuples:
I p =<id I ,type I ,priority I ,off,period I ,resptime I ,exetime I ,pubevent> (1)
wherein, id I Type, a unique identifier for an interrupt I Indicating the interrupt type, which is periodic interrupt, priority I Indicating interrupt priority, the larger the value, the higher the priority, the off indicates the offset between the period and the starting position, period I For the period of the interrupt, i.e. the time interval between two interrupts, reprptime I Indicating interrupt response time, time between interrupt request issue and entry into interrupt handling, exetime I The time of interrupt execution, i.e. the time between the start of interrupt execution and the exit of interrupt, is indicated, and pubete is the event generated by the interrupt, which triggers the execution of the corresponding task.
For non-periodic interrupts, an interrupt is defined for a certain period of time t 0 ,t 1 ]The internal administration generates random numbers from a specific distribution function by adopting a rounding method to simulate the occurrence time of non-periodic interruption, and a model of the non-periodic interruption is expressed by nine tuples:
I ap =<id I ,type I ,priority I ,off,F(x),timeinterval,resptime I ,exetime I ,pubevent> (2)
non-periodic interrupts differ from periodic interrupts in that F (x) is increased as a distribution function obeyed by non-periodic interrupts; timeiterval is the range of values of time x in the distribution function.
And step two, establishing an embedded system periodic task model.
Defining a model of a periodic task in the embedded system, and for describing the periodic task, not only considering time characteristics, but also taking the requirement of space resources into the model:
T p =<id T ,period T ,priority T ,resptime T ,exetime T ,deadline,spacesize,status> (3)
in the formula, id T For task identifier, used in system to uniquely represent task, period T The period of a task refers to the time interval between two triggers of the task, and the priority T For task priority, in the preemption mode, a high priority task preempts a low priority task, representation T Representing task response time, time interval between task establishment and task start execution, and exectrime T Indicating the time cost required by task execution, readline indicating the task deadline, overtime before the time when the task is not executed to finish other tasks, indicating the space resource size required by the task execution, adding subtasks into a task sequence, receiving the scheduling of a task scheduler, and status indicating the state of the task, wherein a classical tristate model comprising a ready state, a blocking state and an operating state is adopted. During the analysis, the task state is blocked to ready: the task obtains the needed resources and analyzes the SC++ in time consumption; operating stateTo the ready state: preempting high-priority tasks, switching task time ST++, and analyzing time SC++; ready state to run state: the current task has the highest priority, the task execution time ET++, and the analysis time SC++; run state to blocking state: resources cannot be satisfied and SC++ is used for analysis.
And thirdly, a task scheduler model of the embedded system.
The task scheduling strategies in the embedded system are divided into two types, namely preemptive scheduling and non-preemptive scheduling, and a task scheduler model is built according to the preemptive scheduling and the non-preemptive scheduling. While preemptive scheduling allows high priority tasks to preempt low priority tasks, non-preemptive scheduling allows high priority tasks to not preempt low priority tasks unless the low priority tasks actively relinquish processor resources, the high priority tasks do not execute. In both types of task scheduling modes, interrupts preempt tasks.
And fourthly, managing space resources of the embedded system.
The resources in the system are divided into a special space resource and a shared space resource, wherein the special space resource can be used only by specific tasks, other tasks are not authorized to use, the shared space resource is used as a public space resource, and all tasks have the use right.
And fifthly, calculating the utilization rate of the system resources.
The resource utilization in the system includes time resource utilization and space resource utilization.
The space resource utilization includes a proprietary space resource utilization RLS i And public space resource utilization RS G The calculation formula is as follows:
Figure BDA0002277044680000031
in the formula, RLS i Represents the utilization rate of the exclusive space resources,
Figure BDA0002277044680000032
representing used proprietary spatial resources, LS i Representing a proprietary spatial resource provided by the system, i representingThe i-th proprietary spatial resource.
Figure BDA0002277044680000033
In the RS G Represents the utilization rate of public space resources,
Figure BDA0002277044680000034
representing the used public space resources S G Representing the public space resources provided by the system. />
The time resource utilization rate of the system is expressed as the ratio of actual use time to analysis total duration, and is specifically expressed as:
Figure BDA0002277044680000035
wherein, RT represents the utilization rate of system time resources, S represents the total simulation duration of the system, and RT x Indicating the response time of the xth task, ET x Represents execution time of the xth task, ST y The time spent for the y-th task switch is represented, x and y represent the number of tasks and the number of task switches in the system, m represents the total number of tasks, and n represents the total number of task switches.
And step six, calculating the utilization rate of the key task resources.
The resource utilization of critical tasks includes two aspects: time resource utilization and space resource utilization. In the analysis process, 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 are marked. The space resource utilization rate of the critical task refers to the use condition of the space resource in the execution process of the critical task.
Figure BDA0002277044680000041
Where k represents the kth critical task, RS k Representing the space resource utilization of the critical task,
Figure BDA0002277044680000043
representing used space resources, TS k Total amount of space resources for critical tasks.
The time resource utilization rate of the critical task 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 of the task from the beginning of the execution of the task. In the analysis process, recording the moment BT when the critical task starts to execute CT And a preset dead time DT CT Obtaining the time ET when the task execution is completed according to the analysis result CT And calculates the time resource utilization rate RT of the key task according to the formula (8) CT
Figure BDA0002277044680000042
And step seven, an embedded system deterministic analysis method.
Before analysis is started, the space resource utilization rate of a key task in the system and the space resource utilization rate of the system are regulated, the time resource utilization rate relative to the task deadline in the task execution process is regulated, the virtual clock is adopted for analysis to simulate the system clock, and the task execution deterministic analysis process is as follows:
firstly, setting total analysis time, initializing SC=0 during analysis, and obtaining key task parameters;
judging whether the analysis total time is reached, stopping analysis if the analysis total time is reached, recording an analysis result, and continuing if the analysis total 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, and adding 1 to the analysis time SC;
judging a preemption mode of the system, adopting different scheduling strategies to schedule tasks according to the preemption mode, determining the currently executed task, and adding 1 when analyzing;
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 beneficial effects of the invention are as follows: the method abstracts the interrupt of the embedded system, establishes a mathematical model of periodic interrupt and non-periodic interrupt, and has higher interrupt priority than the task, considers the influence of the interrupt on the response time of the task in the process of executing the task, adopts a rounding method to simulate the time generated by the non-periodic interrupt, analyzes the delay caused by the interrupt on the task execution, and improves the analysis precision of the task execution certainty; the space resources in the embedded system are abstracted, and whether the space resources can meet the requirements or not is checked when the task is executed, so that more accurate task response time is obtained. According to the relation between task response time and worst execution time and the requirement on 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 use rates are obtained, the accuracy of the determination analysis of the embedded system is improved, and the practicability is good.
The invention is described in detail below with reference to the drawings and the detailed description.
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 deterministic analysis method of an embedded system of the present invention.
FIG. 3 is a diagram of task state transitions during analysis of the method of the present invention.
Detailed Description
Reference is made to fig. 1-3. The method for analyzing the certainty of the embedded system comprises the following specific steps:
step one, establishing an interrupt model.
Modeling the periodic interruption and the non-periodic interruption in the embedded system respectively, for the periodic interruption, determining the period activation time by adopting a period offset, for the non-periodic interruption, restricting the generation time of the interruption by using an interruption occurrence time interval, setting a distribution function which accords with the non-periodic interruption in the interval, and determining the generation time of the interruption by adopting a rounding method.
The periodic interrupt model is represented by eight tuples:
I p =<id I ,type I ,priority I ,off,period I ,resptime I ,exetime I ,pubevent> (1)
wherein, id I Type, a unique identifier for an interrupt I Indicating the interrupt type, which is periodic interrupt, priority I Indicating interrupt priority, the larger the value, the higher the priority, the off indicates the offset between the period and the starting position, period I For the period of the interrupt, i.e. the time interval between two interrupts, reprptime I Indicating interrupt response time, time between interrupt request issue and entry into interrupt handling, exetime I The time of interrupt execution, i.e. the time between the start of interrupt execution and the exit of interrupt, is indicated, and pubete is the event generated by the interrupt, which triggers the execution of the corresponding task.
The model of non-periodic interrupts uses a nine tuple representation:
I ap =<id I ,type I ,priority I ,off,F(x),timeinterval,resptime I ,exetime I ,pubevent> (2)
non-periodic interrupts differ from periodic interrupts in that F (x) is increased as a distribution function obeyed by non-periodic interrupts; timeiterval is the range of values of time x in the distribution function.
And step two, establishing a task model.
For periodic tasks in embedded systems, time characteristics including priority, period, response time, execution time, deadline are analyzed, in addition to which the spatial resource constraint space for task execution needs to be increased.
T p =<id T ,period T ,priority T ,resptime T ,exetime T ,deadline,spacesize,status> (3)
In formula (3), id T For task identifier, used in system to uniquely represent task, period T The period of a task refers to the time interval between two triggers of the task, and the priority T For task priority, in the preemption mode, a high priority task preempts a low priority task, representation T Representing task response time, time interval between task establishment and task start execution, and exectrime T The method and the device are characterized in that the time cost required by task execution is represented, the readline represents the task deadline, the task does not execute other tasks before the time is overtime, the space represents the space resource size required by the task execution, the status represents the state of the task, and a classical tri-state model comprising a ready state, a blocking state and an operating state is adopted. During the analysis, the task state is blocked to ready: the task obtains the needed resources and analyzes the SC++ in time consumption; run state to ready state: preempting high-priority tasks, switching task time ST++, and analyzing time SC++; ready state to run state: the current task has the highest priority, the task execution time ET++, and the analysis time SC++; run state to blocking state: resources cannot be satisfied and SC++ is used for analysis.
And thirdly, establishing a scheduler model.
The task scheduling strategies in the embedded system are divided into two types, namely preemptive scheduling and non-preemptive scheduling, and a task scheduler model is built according to the preemptive scheduling and the non-preemptive scheduling. While preemptive scheduling allows high priority tasks to preempt low priority tasks, non-preemptive scheduling allows high priority tasks to not preempt low priority tasks unless the low priority tasks actively relinquish processor resources, the high priority tasks do not execute. In both types of task scheduling modes, interrupts preempt tasks.
Sched=<type sch ,tasknum,priorities sch ,taskSW(),taskPrioHighRdy()> (4)
In equation (4), type sch Representing the type of the scheduler, which is divided into preemptive scheduling and non-preemptive scheduling, and the task num represents the maximum number of tasks supported by the task scheduler, and the priorities sch Indicating that the scheduler supports the highest priority, only one of each is allowed to exist at each priorityTask SW () is a task switching function, and in the preemptive scheduling mode, the task is switched by calling the function, and task PrioHighRdy () is the task with the highest priority in the current ready task queue and is used as the currently executed task.
And step four, establishing a system space resource model.
The resources in the system are divided into a special space resource and a shared space resource, wherein the special space resource can be used only by specific tasks, other tasks are not authorized to use, the shared space resource is used as a public space resource, and all tasks have the use right.
The special space resource is defined in a task model, and can only be used by the task, and other tasks have no authority to use the special space resource; the public space resources are defined independently, and any space resources needed in the embedded system are allowed to be applied for use in the public space resources.
And fifthly, calculating the utilization rate of the system resources.
The resource utilization in the system includes time resource utilization and space resource utilization.
The space resource utilization includes a proprietary space resource utilization RLS i And public space resource utilization RS G The calculation formula is as follows:
Figure BDA0002277044680000071
in the formula (5), RLS i Represents the utilization rate of the exclusive space resources,
Figure BDA0002277044680000072
representing used proprietary spatial resources, LS i Representing the proprietary spatial resource provided by the system, i representing the ith proprietary spatial resource.
Figure BDA0002277044680000073
RS in equation (6) G Representing public space resourcesThe rate of utilization of the source(s),
Figure BDA0002277044680000074
representing the used public space resources S G Representing the public space resources provided by the system.
The time resource utilization rate of the system is expressed as the ratio of actual use time to analysis total duration, and is specifically expressed as:
Figure BDA0002277044680000075
in the formula (7), RT represents the utilization rate of system time resources, S represents the total simulation duration of the system, and RT x Indicating the response time of the xth task, ET x Represents execution time of the xth task, ST y The time spent for the y-th task switch is represented, x and y represent the number of tasks and the number of task switches in the system, m represents the total number of tasks, and n represents the total number of task switches.
And step six, establishing a critical task resource utilization rate model.
The resource utilization of critical tasks includes two aspects: time resource utilization and space resource utilization. In the analysis process, 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 are marked. The space resource utilization rate of the critical task refers to the use condition of the space resource in the execution process of the critical task.
Figure BDA0002277044680000081
K in the formula (8) represents the kth critical task, RS k Representing the space resource utilization of the critical task,
Figure BDA0002277044680000082
representing used space resources, TS k Total amount of space resources for critical tasks.
The time resource utilization rate of the critical task represents the critical taskThe ratio of the time interval from the start to the completion of execution to the task preset dead time interval. In the analysis process, recording the moment BT when the critical task starts to execute CT And a preset dead time DT CT Obtaining the time ET when the task execution is completed according to the analysis result CT And calculates the time resource utilization RT of the critical task according to the formula (9) CT
Figure BDA0002277044680000083
And step seven, deterministic analysis of the embedded system.
Before analysis is started, the space resource utilization rate of a key task in the system and the space resource utilization rate of the system are regulated, the time resource utilization rate relative to the task deadline in the task execution process is regulated, the virtual clock is adopted for analysis to simulate the system clock, and the task execution deterministic analysis process is as follows:
firstly, setting analysis total time, initializing SC=0 during analysis, and obtaining key task parameters;
judging whether the analysis total time is reached, stopping analysis if the analysis total time is reached, recording an analysis result, and continuing if the analysis total 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, and adding 1 to the analysis time SC;
judging a preemption mode of the system, adopting different scheduling strategies to schedule tasks according to the preemption mode, determining the currently executed task, and adding 1 when analyzing;
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. The embedded system deterministic analysis method is characterized by comprising the following steps of:
step one, establishing an embedded system interrupt model;
modeling periodic interrupts and non-periodic interrupts of an embedded system, wherein the periodic interrupt model is represented by eight tuples:
I p =<id I ,type I ,priority I ,off,period I ,resptime I ,exetime I ,pubevent> (1)
wherein, id I Type, a unique identifier for an interrupt I Indicating the interrupt type, which is periodic interrupt, priority I Indicating interrupt priority, the larger the value, the higher the priority, the off indicates the offset between the period and the starting position, period I For the period of the interrupt, i.e. the time interval between two interrupts, reprptime I Indicating interrupt response time, time between interrupt request issue and entry into interrupt handling, exetime I The interrupt execution time is indicated, namely the time between the start of interrupt execution and the exit of interrupt, and pubete is an event generated by the interrupt, and the event triggers the execution of a corresponding task;
for non-periodic interrupts, an interrupt is defined for a certain period of time t 0 ,t 1 ]The internal administration generates random numbers from a specific distribution function by adopting a rounding method to simulate the occurrence time of non-periodic interruption, and a model of the non-periodic interruption is expressed by nine tuples:
I ap =<id I ,type I ,priority I ,off,F(x),timeinterval,resptime I ,exetime I ,pubevent> (2)
non-periodic interrupts differ from periodic interrupts in that F (x) is increased as a distribution function obeyed by non-periodic interrupts; timeiterval is the range of values of time x in the distribution function;
step two, establishing an embedded system periodic task model;
defining a model of a periodic task in the embedded system, and for describing the periodic task, not only considering time characteristics, but also taking the requirement of space resources into the model:
T p =<id T ,period T ,priority T ,resptime T ,exetime T ,deadline,spacesize,status> (3)
in the formula, id T For task identifier, used in system to uniquely represent task, period T The period of a task refers to the time interval between two triggers of the task, and the priority T For task priority, in the preemption mode, a high priority task preempts a low priority task, representation T Representing task response time, time interval between task establishment and task start execution, and exectrime T Representing time cost required by task execution, readline representing task deadline, overtime of other tasks which are not executed by the task before the time, space representing the size of space resources required by the task execution, adding subtasks into a task sequence, receiving the scheduling of a task scheduler, and status representing the state of the task, wherein a classical tristate model comprising a ready state, a blocking state and an operating state is adopted; during the analysis, the task state is blocked to ready: the task obtains the needed resources and analyzes the SC++ in time consumption; run state to ready state: preempting high-priority tasks, switching task time ST++, and analyzing time SC++; ready state to run state: the current task has the highest priority, the task execution time ET++, and the analysis time SC++; run state to blocking state: resources cannot be satisfied, and SC++ is used for analysis;
step three, a task scheduler model of the embedded system;
dividing task scheduling strategies in an embedded system into two types, namely preemptive scheduling and non-preemptive scheduling, and establishing a task scheduler model according to the two types; while preemptive scheduling allows high priority tasks to preempt low priority tasks, non-preemptive scheduling does not allow high priority tasks to preempt low priority tasks unless the low priority tasks actively relinquish processor resources, the high priority tasks are not executed; in the two task scheduling modes, the interrupt can preempt the task;
fourthly, managing space resources of the embedded system;
the resources in the system are divided into a special space resource and a shared space resource, wherein the special space resource can be used only by specific tasks, other tasks are not authorized to use, the shared space resource is used as a public space resource, and all tasks have the right to use;
calculating the utilization rate of system resources;
the resource utilization rate in the system comprises a time resource utilization rate and a space resource utilization rate;
the space resource utilization includes a proprietary space resource utilization RLS i And public space resource utilization RS G The calculation formula is as follows:
Figure FDA0002277044670000021
in the formula, RLS i Represents the utilization rate of the exclusive space resources,
Figure FDA0002277044670000022
representing used proprietary spatial resources, LS i Representing a proprietary spatial resource provided by the system, i representing an ith proprietary spatial resource;
Figure FDA0002277044670000023
in the RS G Represents the utilization rate of public space resources,
Figure FDA0002277044670000024
representing the used public space resources S G Representing the public space resources provided by the system;
the time resource utilization rate of the system is expressed as the ratio of actual use time to analysis total duration, and is specifically expressed as:
Figure FDA0002277044670000025
wherein, RT represents the utilization rate of system time resources, S represents the total simulation duration of the system, and RT x Indicating the response time of the xth task, ET x Represents execution time of the xth task, ST y The time spent for the y-th task switching is represented, x and y respectively represent the number of tasks in the system and the number of task switching times, m represents the total number of tasks, and n represents the total number of task switching times;
step six, calculating the utilization rate of the key task resources;
the resource utilization of critical tasks includes two aspects: time resource utilization and space resource utilization; 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 critical task refers to the use condition of space resources in the execution process of the critical task;
Figure FDA0002277044670000031
where k represents the kth critical task, RS k Representing the space resource utilization of the critical task,
Figure FDA0002277044670000033
representing used space resources, TS k The total amount of space resources of the critical task;
the utilization rate of the time resource of the key task 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 of the task from the beginning of the execution of the task; in the analysis process, recording the moment BT when the critical task starts to execute CT And a preset dead time DT CT Obtaining the time ET when the task execution is completed according to the analysis result CT And calculates the time resource utilization rate RT of the key task according to the formula (8) CT
Figure FDA0002277044670000032
Step seven, an embedded system deterministic analysis method;
before analysis is started, the space resource utilization rate of a key task in the system and the space resource utilization rate of the system are regulated, the time resource utilization rate relative to the task deadline in the task execution process is regulated, the virtual clock is adopted for analysis to simulate the system clock, and the task execution deterministic analysis process is as follows:
firstly, setting total analysis time, initializing SC=0 during analysis, and obtaining key task parameters;
judging whether the analysis total time is reached, stopping analysis if the analysis total time is reached, recording an analysis result, and continuing if the analysis total 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, and adding 1 to the analysis time SC;
judging a preemption mode of the system, adopting different scheduling strategies to schedule tasks according to the preemption mode, determining the currently executed task, and adding 1 when analyzing;
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 CN110928657A (en) 2020-03-27
CN110928657B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813531B (en) * 2020-08-31 2020-11-27 北京国科环宇科技股份有限公司 Clock scheduling method and system for operating system
CN112506609B (en) * 2020-12-02 2024-05-31 西北工业大学 Scene characterization method for time sequence simulation analysis of embedded system
CN113094260B (en) * 2021-03-18 2024-04-05 西北工业大学 Distributed system time sequence relation modeling and simulation analysis method
CN114818570B (en) * 2022-03-11 2024-02-09 西北工业大学 Embedded system time sequence analysis method based on Monte Carlo simulation
CN116244073A (en) * 2023-02-06 2023-06-09 中山大学 Resource-aware task allocation method for hybrid key partition real-time operating system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7877752B2 (en) * 2005-12-14 2011-01-25 Broadcom Corp. Method and system for efficient audio scheduling for dual-decode digital signal processor (DSP)
US8484495B2 (en) * 2010-03-25 2013-07-09 International Business Machines Corporation Power management in a multi-processor computer system
CN106293902A (en) * 2015-05-28 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of processor scheduling method and system
CN106293919B (en) * 2016-08-12 2019-06-11 中国航空工业集团公司西安飞行自动控制研究所 A kind of the built-in tasks dispatching device and method of time trigger
CN108932160A (en) * 2017-10-10 2018-12-04 北京猎户星空科技有限公司 Multiple operating system control method, device, electronic equipment and computer storage medium
CN107943568B (en) * 2017-10-31 2021-11-26 北京航空航天大学 Two-stage scheduling model and prototype platform of integrated modular avionics system
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
US11042404B2 (en) * 2018-03-16 2021-06-22 Imam Abdulrahman Bin Faisal University Real-time feasibility systems and methods
CN109684060B (en) * 2018-12-21 2023-05-23 中国航空工业集团公司西安航空计算技术研究所 Mixed scheduling method for multiple types of time-critical tasks

Also Published As

Publication number Publication date
CN110928657A (en) 2020-03-27

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
Lin et al. Improving soft real-time performance through better slack reclaiming
Bernat et al. New results on fixed priority aperiodic servers
Tindell Using offset information to analyse static priority pre-emptively scheduled task sets
CN108123980B (en) Resource scheduling method and system
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
Zhou et al. Improved carry-in workload estimation for global multiprocessor scheduling
CN113806924A (en) Task schedulability verification method for distributed system
Racu et al. Improved response time analysis of tasks scheduled under preemptive round-robin
Vardanega et al. On the dynamic semantics and the timing behavior of ravenscar kernels
CN113190359A (en) Simulation request processing method and device, electronic equipment and readable storage medium
Wang et al. Research on real-time embedded software scheduling model based on edf
Erickson Managing tardiness bounds and overload in soft real-time systems
CN108845870A (en) A kind of probability real-time task scheduling method based on pWCET shaping
CN113094260B (en) Distributed system time sequence relation modeling and simulation analysis method
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)
Kang et al. Parametric design synthesis of distributed embedded systems
EP1540475A2 (en) System and method for robust time partitioning of tasks in a real-time computing environment
CN114818570B (en) Embedded system time sequence analysis method based on Monte Carlo simulation
Urriza et al. Fast Slack Stealing methods for Embedded Real Time Systems
Li et al. H-pfsp: Efficient hybrid parallel pfsp protected scheduling for mapreduce system

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