The present application claims the benefit under 35 U.S.C. §119 of German Patent Application No. DE 102016200777.7 filed on Jan. 21, 2016, which is expressly incorporated herein by reference in its entirety.
The present invention relates to a method for monitoring and controlling quasi-parallel execution threads in an event-oriented operating system. Furthermore, the present invention relates to a corresponding device, a corresponding computer program and to a corresponding storage medium.
The portable operating system interface ISO/IEC/IEEE 9945 standardized in the international standards encompasses a number of specific application environment profiles (AEPs) for open system. Among them are, in particular, the environment profiles defined according to IEEE 1003.13.2003 for portable, real-time capable and embedded applications.
German Patent Application No. DE 10 2014 103139 A1 relates to a method for porting old control software that is developed for a control device having a single processor core, to a vehicle control device having at least two processor cores. Old control software includes tasks that have one or more executive routine(s) as well as an execution or preemptive hierarchy for the tasks in each case. Priority restrictions for writing and reading accesses to shared persistent memory variables are ascertained and weak priority restrictions are identified according to predefined classification rules. An execution plan for the execution of the old control software on the two or more processor cores is generated, i.e., by parallelization of executive routines that have weak priority restrictions. For each weak priority restriction, the associated persistent memory variable is stored in a separately administered database that permits a read and write access without waiting time.
The present invention provides a method for monitoring and controlling quasi-parallel execution threads in an event-oriented operating system, a corresponding device, a corresponding computer program and a corresponding memory medium according to the independent claims.
According to the present invention, in software systems that are subject to function and information security demands, a mutual freedom from interference (FFI) of the various software components may be of special importance.
This freedom from interference is to be ensured in two regards. For one, a space FFI is to be represented. In POSIX-compliant operating systems, this is mainly realized via processes or resource partitions. The operating system prevents access to the memory area of a process or a partition by another process or another partition. Identical criticality from the aspect of information technology is presupposed within a process or a partition, i.e., a probability and expected effect of possible interferences of the operating safety that is to be assessed uniformly.
For another, temporal FFI is to be made possible. That means that in the most critical case, a starting instant, a latest end instant as well as a net run-time budget must be guaranteed to each thread of different processes or partitions. It has shown to be essential that both the monitoring as well as the controlling of these characteristics are ensured by a reliable software instance.
This finely granular temporal FFI is nearly impossible to represent in a conventional POSIX-compliant operating system with provided scheduling algorithms.
In contrast, one advantage of the approach according to the present invention consists of the possibility of assuring temporal FFI at the thread level, in particular in POSIX-compliant operating systems. This mutual freedom from interference even applies to threads that are allocated to different processes or partitions. In this way processes having different criticality with regard to information and function security are able to be operated deterministically in the same run-time environment. In addition, a functional interplay of the threads of processes that have different criticality is also able to be achieved, even at a guaranteed execution time, starting instant and deadline for each individual thread.
In accordance with one specific embodiment of the present invention, an administration process is provided, the tasks of which include monitoring and controlling of the threads. This is a process that was developed in accordance with the highest demands on its function and information security and which was therefore classified as trustworthy. The administration process was designed on the basic assumption that not all threads to be monitored are trustworthy. It includes all required information about the temporal behavior of the threads of the kernel of the operating system. This kernel satisfies the same demands with regard to the function and information security as said administration process itself. The latter constantly compares the actual temporal behavior of the threads, of which it is notified via trustworthy kernel mechanisms, to a trustworthy configuration. If the administration process notices a deviation from the expected temporal behavior, then it outputs corresponding commands to the kernel in order to neutralize the faulty behavior or to initiate replacement reactions.
Advantageous further developments and improvements of the present invention are possible as a result of the measures described herein. The temporal behavior of the threads to be monitored, in particular, is able to be controlled in two ways. The two possibilities described in the following text are also combinable with each other. For example, it may be provided that the threads adapt their temporal behavior among each other. In this instance, the administration process monitors only the correct temporal sequence. This method of action has the advantage that the application processes need not be instrumentalized or provided with additional synchronization mechanisms. One development of the present invention that corresponds to the described approach is referred to as “passive specific embodiment” in the following text.
According to another aspect, it may be the case that the administration process assumes the temporal control in that the threads synchronize with the administration process via established synchronization mechanisms, such as a synchronous message exchange (message passing), or semaphores. For one, it controls the synchronization and for another, it monitors the correct sequence. This offers the possibility of decoupling and resultant FFI of the threads from processes of different criticality, but requires the incorporation of selective synchronization mechanisms into the application processes. A corresponding variant is referred to as “active specific embodiment” is described herein.
Exemplary embodiments of the present invention are shown in the figures and described in greater detail below.
The method of functioning of the method (10) becomes clear from an overall view of
Administration interface (26) preferably offers at least the following methods:
The administration process (23) includes a configuration (25) which contains the correct attributes of the run-time behavior of the threads and processes (20, 21, 22) to be monitored and controlled. This configuration (25) may be variable at the run-time, either statically or dynamically.
Furthermore, the administration process (23) includes its own sufficiently precise timing circuit, e.g., a highly precise electronic control component, with the aid of which it checks the actual time behavior of the execution threads (20, 21, 22) in comparison to the configuration (25).
On the basis of the currently valid configuration (25), administration process (23) registers itself via administration interface (26) for the notification of operating events that characterize the run-time behavior of execution threads (20, 21, 22). Furthermore, the administration process is able to query current values and statuses of execution threads (20, 21, 22) at all times via administration interface (26).
The administration process (23) may instantiate processes (20, 21, 22) on its own or leave it to another software instance, for example to another process or startup script.
According to the passive specific embodiment represented in
In the active specific embodiment according to
If the administration process (23) detects a deviation of the actual temporal behavior from its configuration (25), then it neutralizes the deviation, for instance by terminating a process (20, 21, 22), by preempting a thread or by lowering the thread priority, or it initiates replacement reactions of the kernel (24) via administration interface (26), such as the restart of a process (20, 21, 22).
Number | Date | Country | Kind |
---|---|---|---|
102016200777.7 | Jan 2016 | DE | national |