DE10120005A1 - Regulating and displaying processes in which data are produced and/or consumed by tasks and/or threads involves decoupling mutually blocking tasks and/or threads in a real-time system - Google Patents
Regulating and displaying processes in which data are produced and/or consumed by tasks and/or threads involves decoupling mutually blocking tasks and/or threads in a real-time systemInfo
- Publication number
- DE10120005A1 DE10120005A1 DE10120005A DE10120005A DE10120005A1 DE 10120005 A1 DE10120005 A1 DE 10120005A1 DE 10120005 A DE10120005 A DE 10120005A DE 10120005 A DE10120005 A DE 10120005A DE 10120005 A1 DE10120005 A1 DE 10120005A1
- Authority
- DE
- Germany
- Prior art keywords
- data
- thread
- memory area
- task
- threads
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Abstract
Description
Die Erfindung betrifft ein Verfahren zur Regelung und Visualisierung von Prozes sen, wobei mittels mindestens eines Tasks und/oder Threads Daten produziert werden und/oder mittels mindestens eines weiteren Tasks und/oder Threads Daten konsumiert werden.The invention relates to a method for controlling and visualizing processes sen, whereby data is produced by means of at least one task and / or thread and / or by means of at least one further task and / or thread Data to be consumed.
Verfahren zur Regelung und Visualisierung von Prozessen sind seit langem in der Praxis bekannt. Im Allgemeinen handelt es sich dabei um Softwaresysteme, die zur Regelung physischer Prozesse eingesetzt werden. Bei diesen Software systemen muss ein deterministisches Verhalten bezüglich der Zykluszeit der Abtastung von Signalen garantiert werden, um Regelkreistotzeiten klein und konstant zu halten. Die oftmals gewünschte simultane Visualisierung oder Spei cherung der Regel- bzw. Stellgrößen erschwert dieses Unterfangen, da System ressourcen wie Bildschirm, Festplatte oder dergleichen eines Computers nur ex klusiv nutzbar sind.Processes for the control and visualization of processes have long been in known in practice. Generally, these are software systems which are used to regulate physical processes. With this software systems must have a deterministic behavior with regard to the cycle time of the Sampling of signals are guaranteed to keep control loop dead times small and small to keep constant. The often desired simultaneous visualization or storage Saving the control or manipulated variables makes this undertaking difficult, since the system resources such as the screen, hard drive or the like of a computer only ex can be used exclusively.
Es existieren sogenannte Multitasking-Betriebssysteme, welche die Fähigkeit ha ben, mehrere Tasks, d. h. Aufgaben, gleichzeitig zu erledigen. Zudem existieren sogenannte Multithreading-Betriebssysteme, bei denen die einzelnen Tasks in sogenannte Threads aufgeteilt werden. Unter einem Thread versteht man den Steuerfluss, der dem Prozess eines Programms innewohnt. Multitasking- und Multithreading-Betriebssysteme sind von besonderem Vorteil, da beispielsweise die CPU eines Computers bei der Ausführung von Befehlen immer wieder auf die Antwort von z. B. Programmen oder Peripheriegeräten warten muss. Die CPU kann diese Wartezeit mittels Multitasking und/oder Multithreading als Rechenzeit an andere Prozesse vergeben. Das Abarbeiten einzelner Befehle der ver schiedenen Programme erfolgt daher nicht parallel, da die CPU nur einen Befehl gleichzeitig ausführen kann, sondern in sogenannten Zeitfenstern oder auch Zeitscheiben. Die Festlegung der Reihenfolge des Abarbeitens übernimmt ein sogenannter Scheduler - ein Bestandteil des Beltriebssystems -, der den einzel nen Tasks bzw. Threads Prioritäten zuteilt. In einem solchen Betriebssystemen besteht jedoch jederzeit die Gefahr, dass diese beim Versuch der Ausgabe blok kiert sind, da andere Tasks oder Threads die Ausgabe blockieren. Diese Blockie rung hält den ausgebenden Task oder Thread so lange an, bis die bereits be gonnenen Tasks oder Threads anderer Prozesse gleicher oder höherer Priorität beendet sind. Dabei wird beispielsweise auch ein Regelkreis blockiert. Ein sol ches Blockieren ist für eine reale Regelung, die über eine Regelkreissimulation hinausgeht, untragbar.There are so-called multitasking operating systems, which have the ability ben, multiple tasks, d. H. Tasks to do at the same time. Also exist So-called multithreading operating systems, in which the individual tasks in so-called threads are divided. A thread is the Tax flow inherent in the process of a program. Multitasking and Multithreading operating systems are particularly advantageous because, for example the CPU of a computer when executing commands repeatedly on the Reply from z. B. programs or peripheral devices must wait. The CPU this waiting time can be calculated using multitasking and / or multithreading assigned to other processes. Processing individual commands from the ver Different programs are therefore not carried out in parallel since the CPU only has one command can execute at the same time, but in so-called time slots or also Time slices. The order of processing is determined So-called scheduler - a component of the operating system - that the individual Priorities are assigned to tasks or threads. In such operating systems however, there is always a risk that it will block when trying to output are because other tasks or threads block the output. This blockage tion stops the issuing task or thread until the tasks or threads of other processes of the same or higher priority are finished. A control loop is also blocked, for example. A sol Blocking is for a real control system using a control loop simulation goes out, intolerable.
Im Allgemeinen wird diese Problematik durch spezielle Hardware mit Dual- Ported, Shared-Memory Bausteinen gelöst. Durch den zeitlich weitgehend ent koppelten Zugriff auf den Speicher findet ein Blockieren eines Threads mit hoher Priorität, beispielsweise des Threads zur Regelung nicht statt. Eine reine Softwa relösung ist allerdings so nicht möglich, was unweigerlich zu höheren Kosten durch die zusätzlich eingesetzte Hardware führt.In general, this problem is solved by special hardware with dual Ported, shared memory modules solved. By the largely ent coupled access to the memory finds a thread blocking with high Priority, for example the thread for regulation does not take place. A pure software However, solution is not possible, which inevitably leads to higher costs through the additional hardware used.
In einer rein softwaremäßigen Lösung wird die Übergabe von Daten zwischen Tasks oder Threads mittels sogenannter Semaphoren synchronisiert. Mit Se maphoren werden viele Systemressourcen, wie beispielsweise der Bildschirm, die Festplatte oder dergleichen, eines Computers verwaltet. Wollen beispielswei se Tasks oder Threads gleichzeitig auf einen Drucker zugreifen, so ist dies wie oben schon beschrieben nicht möglich. Der Task oder Thread mit der höchsten Priorität wird demnach zunächst mit dem Drucken beginnen. Das System setzt sodann die Semaphore, die den Status des Druckers beschreibt, auf besetzt. Dadurch werden die Anforderungen der anderen Tasks oder Threads in einer Warteschlange eingereiht. Ist die Systemressource - der Drucker - wieder bereit, wird die Semaphore wieder auf verfügbar gesetzt. Falls sich dann noch weitere Anfragen in der Warteschlange befinden, können diese nun bearbeitet werden. Eine Semaphore ist somit eine spezielle Art von Zähler.In a purely software solution, the transfer of data is between Tasks or threads synchronized using so-called semaphores. With Se maphoren will have many system resources, such as the screen, the hard disk or the like, managed by a computer. Want, for example Tasks or threads access a printer at the same time, this is how Not already described above. The task or thread with the highest Priority will therefore begin with printing. The system sets then the semaphore, which describes the status of the printer, is busy. This addresses the needs of the other tasks or threads in one Queue queued. When the system resource - the printer - is ready again, the semaphore is set to available again. If there are more Inquiries in the queue can now be processed. A semaphore is therefore a special type of counter.
Mittels der Semaphoren wird demnach verhindert, dass der Produzent von Daten den Speicherbereich, in den die Daten einlesen sind, neu beschreibt, während der Konsument die Daten gerade aus diesem Speicherbereich liest. Würde ein gleichzeitiges Lesen und Schreiben von Daten in einem Multithreading- Betriebssystem erfolgen, so ist mit einer Verfälschung der Daten zu rechnen. Beispielsweise würde dann ein Thread, der Daten erzeugt, beim Schreiben einer aus acht Byte bestehenden Zahl in den Speicherbereich bereits nach dem Schreiben einiger Bytes abgebrochen werden. Die unvollständig in den Spei cherbereich geschriebene Zahl würde dann - nach dem Wechsel der Threads - von dem Thread, der die Daten konsumiert, gelesen und somit falsch interpretiert werden. Eine sichere und unverfälschte Übergabe von Daten ist demnach schon bei einfachen Datentypen, wie einer Zahl, nur durch eine hundertprozentige Syn chronisation möglich.The semaphores are used to prevent the producer of data rewrites the memory area into which the data are read, while the consumer is reading the data from this memory area. Would one simultaneous reading and writing of data in a multithreading Operating system, corruption of the data can be expected. For example, a thread that creates data would write a number consisting of eight bytes in the memory area after the Writing a few bytes can be canceled. The incomplete in the spit number then would be - after changing the threads - read by the thread that consumes the data and thus misinterpreted become. A secure and unadulterated transfer of data is therefore already for simple data types, such as a number, only by a 100 percent syn chronization possible.
Kleinere Mengen von Daten sind zwar sehr schnell kopierbar, jedoch besteht durch die Synchronisation immer die Gefahr, dass der Thread, der Daten produ ziert, wie beispielsweise ein Thread zur Regelung eines Prozesses, blockiert wird. Die Blockade kann dabei wesentlich länger dauern als die reine Kopier aktion, da der Thread, der die Daten konsumiert, wie beispielsweise ein Thread zur Visualisierung der Daten, wiederum selbst blockiert werden kann. Die Zeit, die der Thread zur Regelung blockiert ist, ist im Allgemeinen nicht abschätzbar. Sie kann aber durchaus einige Sekunden betragen, da bis zur Freigabe der Sy stemressource, beispielsweise des Displays, gewartet werden muss. Auch ande re exklusiv nutzbare Systemressourcen wie die Festplatte, Soundkarte, Schnitt stellen, exklusiv nutzbare Softwaremodule oder dergleichen, führen zu einem ähnlichen Verhalten.Smaller amounts of data can be copied very quickly, but it does exist due to the synchronization, there is always the risk that the thread, the data produ adorned, such as a thread for regulating a process, blocked becomes. The blockage can take much longer than the pure copy action because the thread consuming the data, such as a thread to visualize the data, can itself be blocked. The time, which the control thread is blocked cannot generally be estimated. However, it can be a few seconds since the Sy stem resource, such as the display, needs to be serviced. Others too re exclusively usable system resources such as hard disk, sound card, editing places, exclusively usable software modules or the like lead to one similar behavior.
Eine weitere Lösungsmöglichkeit sind harte Echtzeit-Betriebssysteme, die be sondere Module zur Verfügung stellen, welche eine nichtexklusive Nutzung von Systemressourcen erlauben. Diese Technik erleichtert den Umgang mit System ressourcen für einen Programmierer zwar erheblich, hat jedoch den Nachteil, dass die notwendige Serialisierung des Zugriffs auf gemeinsam genutzte Sy stemressourcen in der Software realisierte First-In-First-Out-Speicher - FIFO- Speicher - benötigt. Die FIFO-Speicher fungieren dabei als Warteschlangen. Da die Systemressourcen für den aufgerufenen Thread nie blockiert sind, besteht auch keine Möglichkeit, diese Information sinnvoll zu nutzen, um beispielsweise das Display mit weiteren Aufgaben zu belasten, wenn eine schritthaltende Dar stellung der Daten bereits nicht mehr möglich ist. Ferner sind diese spezialisier ten Echtzeit-Betriebssysteme in der Regel nicht so weit verbreitet und standardi siert wie Universal-Betriebssysteme, wie beispielsweise Windows, Linux oder dergleichen. Der Aufwand zur Einarbeitung und die Folgekosten durch Lizenzge bühren oder dergleichen sind für solche Echtzeit-Betriebssysteme daher recht hoch.Another solution is hard real-time operating systems, the be make special modules available which make non-exclusive use of Allow system resources. This technique makes it easier to deal with the system resources for a programmer, but has the disadvantage that that the necessary serialization of access to shared sy First-in-first-out memory implemented in the software - FIFO Memory - needed. The FIFO memories act as queues. There the system resources for the thread being called are never blocked also no way to use this information sensibly, for example burden the display with other tasks when a pace Dar provision of the data is no longer possible. They are also more specialized Real-time operating systems are generally not as widespread and standard like universal operating systems such as Windows, Linux or the like. The effort for familiarization and the follow-up costs through licensing bue or the like are therefore right for such real-time operating systems high.
Der vorliegenden Erfindung liegt daher die Aufgabe zugrunde, ein Verfahren zur Regelung und Visualisierung von Prozessen der eingangs genannten Art anzu geben, bei dem ein deterministisches Verhalten ohne erhöhte Kosten für Soft ware oder Hardware möglich ist.The present invention is therefore based on the object of a method for Control and visualization of processes of the type mentioned at the beginning give a deterministic behavior without increased costs for soft ware or hardware is possible.
Erfindungsgemäß wird die voranstehende Aufgabe durch ein Verfahren zur Re gelung und Visualisierung von Prozessen mit den Merkmalen des Patentan spruchs 1 gelöst. Danach ist das in Rede stehende Verfahren zur Regelung und Visualisierung von Prozessen derart ausgestaltet und weitergebildet, dass in Echtzeitsystemen eine Entkopplung gegenseitig blockierender Tasks und/oder Threads stattfindet.According to the invention, the above object is achieved by a method for re design and visualization of processes with the features of the patent application spell 1 solved. After that is the procedure in question for regulation and Visualization of processes designed and developed in such a way that in Real-time systems decoupling mutually blocking tasks and / or Threads takes place.
In erfindungsgemäßer Weise ist zunächst erkannt worden, dass nur minimale Anforderungen an das verwendete Betriebssystem gestellt werden müssen und trotzdem ein ausreichend gutes deterministisches Zeitverhalten ohne spezielle Hardwareerweiterung möglich ist, wenn eine Entkopplung gegenseitig blockie render Tasks oder Threads stattfindet. Das Verfahren eignet sich gleich gut für Multitasking oder Multithreading, da es universell immer dann einsetzbar ist, wenn Systemressourcen exklusiv zu Verfügung stehen, so beispielsweise beim Speichern von Daten auf einer Festplatte, bei interaktiven Eingaben mittels eines Bedienelements, zum Beispiel einer Maus oder einer Tastatur, oder dergleichen. Zudem ist das Verfahren weitestgehend unabhängig von dem verwendeten Be triebssystem, so lange dieses Multitasking oder Multithreading unterstützt und einfache Synchronisationsmechanismen zwischen Tasks bzw. Threads bietet. Damit ist das erfindungsgemäße Verfahren bei Universal-Betriebssystemen wie Windows oder Linux verwendbar, ohne dass zusätzliche Kosten für ergänzende Hard- oder Software entstehen. In the manner according to the invention, it was first recognized that only minimal Requirements must be placed on the operating system used and nevertheless a sufficiently good deterministic time behavior without special Hardware expansion is possible if decoupling blocks each other render tasks or threads. The procedure is equally suitable for Multitasking or multithreading, because it can be used universally, when system resources are exclusively available, for example at Storage of data on a hard disk, for interactive inputs using a Control element, for example a mouse or a keyboard, or the like. In addition, the process is largely independent of the Be used drive system as long as it supports multitasking or multithreading and offers simple synchronization mechanisms between tasks or threads. The method according to the invention is thus applicable to universal operating systems Windows or Linux can be used without additional costs for additional Hardware or software are created.
Im Hinblick auf eine besonders funktionelle Ausgestaltung könnte mittels des Daten produzierenden Tasks und/oder Threads ein Prozess geregelt werden und mittels des Daten konsumierenden Tasks und/oder Threads Daten visualisiert und/oder weiterverarbeitet werden.With regard to a particularly functional design, the Data-producing tasks and / or threads are regulated and a process data visualized by means of the data consuming tasks and / or threads and / or further processed.
Zumindest der Daten produzierende Task und/oder Thread und der Daten kon sumierende Task und/oder Thread könnten auf zumindest einen Speicherbereich zugreifen. In besonders vorteilhafter Weise könnte der Daten produzierende Task und/oder Thread und der Daten konsumierende Task und/oder Thread de terministisch auf einen identischen Speicherbereich zugreifen. Somit könnte, wenn der Daten produzierende Task und/oder Thread eine hohe Priorität erhält, eine schwache Echtzeit für den Regelvorgang ermöglicht werden. Der Daten produzierende Task und/oder Thread könnte hierbei bei Eintritt in einen kriti schen Programmbereich, der nur von jeweils einem Task oder Thread betreten werden kann, Daten in den Speicherbereich einlesen. Dabei könnte der Daten produzierende Task und/oder Thread die in dem Speicherbereich bereits vor handenen Daten überschreiben. Alternativ hierzu könnte der Daten produzieren de Task und/oder Thread allerdings auch die Daten an die bereits im Speicher bereich vorhandenen Daten anhängen. Dadurch wäre es einem Benutzer mög lich zu wählen, ob alle anfallenden Daten visualisiert werden sollen oder ob bei zu großen Datenmengen Teile der Daten nicht visualisiert werden sollen.At least the data producing task and / or thread and the data con summing task and / or thread could refer to at least one memory area access. In a particularly advantageous manner, the data producing could Task and / or thread and the data consuming task and / or thread de access an identical memory area in terms of terminology. So, if the data producing task and / or thread is given high priority, weak real-time for the control process are made possible. The data producing task and / or thread could here when entering a kriti program area that is only entered by one task or thread at a time read data into the memory area. This could be the data producing task and / or thread already in the memory area overwrite existing data. Alternatively, the data could produce de Task and / or thread, however, also the data to those already in memory append existing data to the area. This would make it possible for a user to choose whether all the data to be visualized or whether too large amounts of data parts of the data should not be visualized.
Der Daten konsumierende Task und/oder Thread könnte dann bei Eintritt in den kritischen Programmbereich die Daten in einen weiteren Speicherbereich kopie ren. Zusätzlich könnte der Daten konsumierende Task und/oder Thread die Da ten in dem weiteren Speicherbereich bearbeiten.The data consuming task and / or thread could then enter the critical program area copy the data into another memory area Ren. In addition, the data consuming task and / or thread could the Da Edit in the other memory area.
Für den Fall, dass der Daten produzierende Task und/oder Thread die in dem Speicherbereich bereits vorhandenen Daten überschreibt, muss der Daten pro duzierende Task und/oder Thread im schlimmsten Fall so lange warten, bis der Daten konsumierende Task und/oder Thread die Daten in den weiteren Spei cherbereich kopiert hat. In diesem Fall können allerdings Daten für den Daten konsumierenden Task und/oder Thread verloren gehen. In the event that the data producing task and / or thread that in the Memory area overwrites existing data, the data per in the worst case, the reducing task and / or thread wait until the Data consuming task and / or thread the data in the further storage copied area. In this case, however, data can be used for the data consuming task and / or thread are lost.
Für den Fall, dass sich bereits Daten in dem Speicherbereich befinden und die neuerlichen Daten an diese angehängt werden, könnte der Daten konsumieren de Task und/oder Thread, nachdem die Daten in den weiteren Speicherbereich kopiert sind, den ursprünglichen Speicherbereich leeren. Hierbei würde dann sichergestellt, dass der Daten konsumierende Task und/oder Thread keine Da ten verliert. In diesem Fall ist nur die Zeit für das Zusammenfügen und Kopieren unterschiedlicher Datenblöcke variabel. Mittels einer Begrenzung der Daten auf eine maximal zulässige Datenblockgröße könnte dann ein Determinismus er reicht werden.In the event that data is already in the memory area and the new data attached to it could consume the data de task and / or thread after the data in the wider memory area are copied, empty the original memory area. This would then ensures that the data consuming task and / or thread has no data ten loses. In this case there is only time to merge and copy different data blocks variable. By limiting the data to a maximum allowable data block size could then be a determinism be enough.
Im Hinblick einer besonders guten Funktionalität könnten mittels mindestens ei nes weiteren, Daten produzierenden Tasks und/oder Threads Benutzerdaten in den Speicherbereich eingelesen werden. Der weitere, Daten produzierende Task und/oder Thread könnte hierbei ein Oberflächenlhread eines User Interface sein. Die Daten, die mittels des weiteren, Daten produzierenden Tasks und/oder Threads in den Speicherbereich eingelesen werden, könnten mittels eines Be dienelements, vorzugsweise einer Maus und/oder einer Tastatur, erzeugt wer den. In einem solchen Fall würde ein bidirektionaler Datenaustausch ermöglicht sein. Der Daten konsumierende Task und/oder Thread könnte dabei die Daten des Prozesses oder die Daten des Bedienelements je nach Reihenfolge der Ak tualisierung anzeigen und ausgeben.In view of a particularly good functionality, at least ei nes further data-producing tasks and / or threads user data in the memory area can be read. The further data producing task and / or thread could be a user interface thread. The data generated by the further data-producing tasks and / or Threads in the memory area could be read by means of a loading dienelements, preferably a mouse and / or a keyboard, who created the. In such a case, bidirectional data exchange would be possible his. The data consuming task and / or thread could do the data of the process or the data of the control element depending on the order of the Ak Display and display the update.
Es gibt nun verschiedene Möglichkeiten, die Lehre der vorliegenden Erfindung in vorteilhafter Weise auszugestalten und weiterzubilden. Dazu ist einerseits auf die dem Patentanspruch 1 nachgeordneten Patentansprüche und andererseits auf die nachfolgende Erläuterung bevorzugter Ausführungsbeispiele des erfindungs gemäßen Verfahrens zur Regelung und Visualisierung von Prozessen anhand der Zeichnung zu verweisen. In Verbindung mit cer Erläuterung der bevorzugten Ausführungsbeispiele des erfindungsgemäßen Verfahrens zur Regelung und Visualisierung von Prozessen anhand der Zeichnung werden auch im Allgemei nen bevorzugte Ausgestaltungen und Weiterbildungen der Lehre erläutert. In der Zeichnung zeigt die There are now several ways to teach the present invention advantageous to design and develop. This is on the one hand on the the subordinate claims and on the other hand the following explanation of preferred embodiments of the Invention according to the process for controlling and visualizing processes to refer to the drawing. In connection with the explanation of the preferred Embodiments of the inventive method for regulation and Process visualization based on the drawing will also be general NEN preferred refinements and developments of teaching explained. In the Drawing shows the
Fig. 1 in einer schematischen Darstellung, ein Ablaufdiagramm eines be kannten Verfahrens zur Regelung und Visualisierung von Prozes sen, Fig. 1 a be known method for control and visualization sen in a schematic representation, a flow chart of Prozes,
Fig. 2 in einer schematischen Darstellung, ein Ablaufdiagramm eines er findungsgemäßen Verfahrens mit Datenverlust, Fig. 2 is a schematic representation, a flow chart of he inventive method with loss of data,
Fig. 3 in einer schematischen Darstellung, ein Ablaufdiagramm eines weiteren erfindungsgemäßen Verfahrens ohne Datenverlust und Fig. 3 in a schematic representation, a flow chart of another method according to the invention without data loss and
Fig. 4 in einer schematischen Darstellung, ein Ablaufdiagramm eines weiteren erfindungsgemäßen Verfahrens mit bidirektionalem Da tenaustausch. Fig. 4 in a schematic representation, a flow chart of a further method according to the invention with bidirectional data exchange.
Fig. 1 zeigt in einer schematischen Darstellung ein Ablaufdiagramm eines be kannten Verfahrens zur Regelung und Visualisierung von Prozessen. Das Multi threading ist dabei auf Softwarebasis mit Shared-Memory realisiert. Ein Thread T1 produziert hierbei Daten D und ein Thread T2 konsumiert die Daten D. Beim Eintritt in die kritische Sektion ECS - Enter Critical Section - werden weitere Ausführungen von Threads so lange blockiert, bis die Sektion von T1 verlassen ist LCS - Leave Critical Section -. Der Thread T1 tritt somit in die kritische Sekti on ein ECS, es werden die Daten D im Speicherbereich M1 eingelesen und der Thread T1 verlässt die kritische Sektion LCS. Cer Thread T2 will den Speicher bereich M1 bearbeiten, ist aber dadurch blockiert, dass der Thread T1 innerhalb der kritischen Sektion arbeitet. Erst nachdem der Thread T1 die kritische Sektion verlassen hat LCS, kann der Thread T2 in die kritische Sektion eintreten ECS und den Speicherbereich M1 bearbeiten. So lange der Thread T2 den Speicher bereich M1 bearbeitet und damit in der kritischen Sektion arbeitet, ist der Thread T1 blockiert. Erst wenn der Thread T2 den Speicherbereich und damit die kriti sche Sektion verlassen hat LCS, womit auch die Bearbeitung der Daten in dem Speicherbereich M1 beendet ist, kann der Thread T1 wieder Daten im Speicher bereich M1 ablegen. Fig. 1 shows a schematic representation of a flow chart of a known method for controlling and visualizing processes. Multi threading is implemented on a software basis with shared memory. A thread T1 produces data D and a thread T2 consumes the data D. When entering the critical section ECS - Enter Critical Section - further executions of threads are blocked until the section of T1 is left LCS - Leave Critical Section - . The thread T1 thus enters the critical section of an ECS, the data D are read into the memory area M1 and the thread T1 leaves the critical section LCS. Cer Thread T2 wants to edit the memory area M1, but is blocked by the fact that the thread T1 works within the critical section. Only after thread T1 has left the critical section LCS can thread T2 enter the critical section ECS and process memory area M1. As long as thread T2 processes memory area M1 and thus works in the critical section, thread T1 is blocked. Only when thread T2 has left the memory area and thus the critical section LCS, which also ends the processing of the data in memory area M1, can thread T1 again store data in memory area M1.
Im Ausführungsbeispiel der Fig. 2 findet im Gegensatz zu dem bezüglich Fig. 1 erläuterten Verfahren erfindungsgemäß eine Entkopplung gegenseitig blockie render Threads T1, T2 statt. Mittels des Threads T1 wird ein Prozess geregelt und der Thread T1 erhält daher eine hohe Priorität. Mittels des Threads T2 wer den die Daten D visualisiert. Es ist dabei unkritisch in welcher Reihenfolge die gleichzeitig auszuführenden Threads T1, T2 auftreten. Der Thread zur Regelung T1 hat dabei die Daten D, die nach Eintritt in die kritische Sektion ECS in den Speicherbereich M1 eingelesen werden. Der Thread zur Visualisierung T2 will nunmehr den Speicherbereich M2 bearbeiten. Der Thread T2 ist allerdings so lang blockiert, bis der Thread zur Regelung T1 die kritische Sektion verlassen hat LCS. Der Thread zur Visualisierung T2 tritt nunmehr in die kritische Sektion ein ECS, kopiert die Daten D aus dem Speicherbereich M1 in den Speicherbereich M2 und verlässt dann die kritische Sektion LCS. Der Thread zur Visualisierung T2 bearbeitet jetzt die Daten D, die im Speicherbereich M2 abgelegt sind. Der Thread zur Regelung T1 ist nunmehr schlimmsten falls so lang blockiert, bis die Daten D aus dem Speicherbereich M1 in den Speicherbereich M2 kopiert sind. Im Falle einer reinen, schnellen Visualisierung kann ein solches Verfahren des halb interessant sein, da die für den Thread zur Visualisierung T2 verlorenen Daten derart schnell anfallen, dass sie unterhalb der menschlichen Wahrneh mungsgrenze liegen.In the exemplary embodiment in FIG. 2, in contrast to the method explained with reference to FIG. 1, a decoupling of mutually blocking threads T1, T2 takes place according to the invention. A process is regulated by means of the thread T1 and the thread T1 is therefore given high priority. Using the thread T2, the data D is visualized. The order in which the threads T1, T2 to be executed simultaneously occur is not critical. The thread for the control T1 has the data D which are read into the memory area M1 after entering the critical section ECS. The thread for the visualization T2 now wants to edit the memory area M2. However, thread T2 is blocked until the thread for control T1 has left the critical section LCS. The thread for visualization T2 now enters the critical section, an ECS, copies the data D from the memory area M1 into the memory area M2 and then leaves the critical section LCS. The thread for the visualization T2 now processes the data D which are stored in the memory area M2. The thread for regulation T1 is now at worst blocked until the data D is copied from the memory area M1 into the memory area M2. In the case of pure, fast visualization, such a method can be of some interest, since the data lost for the thread for visualization T2 is generated so quickly that it is below the human perception limit.
Alternativ hierzu könnte allerdings auch ein Verfahren, wie es in Fig. 3 dargestellt ist, angewandt werden, bei dem keine Daten verloren gehen. Der Thread zur Re gelung T1 produziert wiederum Daten D und tritt in die kritische Sektion eines Programms ein ECS. Ist der Speicherbereich M1 leer, so werden die Daten D in den Speicherbereich M1 eingelesen. Sind im Speicherbereich M1 noch Daten vorhanden, so werden die neuerlichen Daten D an diese ursprünglich noch im Speicherbereich M1 vorhandenen Daten angehängt. Der Thread zur Regelung T1 verlässt dann die kritische Sektion LCS. Der Thread zur Visualisierung T2 will den Bereich M2 bearbeiten, tritt in die kritische Sektion ECS und kopiert den In halt des Speicherbereichs M1 in den Speicherbereich M2. Der Speicherbereich M1 wird geleert und der Thread zur Visualisierung T2 verlässt die kritische Sekti on LCS. Der Thread zur Visualisierung T2 bearbeitet nunmehr den Speicherbe reich M2 und der Thread zur Regelung T1 ist nicht länger blockiert. Der Determi nismus ist damit fast so sicher wie im Ausführungsbeispiel der Fig. 2, jedoch tritt kein Datenverlust auf. Einzig die Zeit für das Zusammenfügen und Kopieren der unterschiedlichen Datenblöcke der sich noch im Speicherbereich M1 befindlichen und der an diese angehängten Daten ist variabel. Durch eine Begrenzung der Daten D auf eine maximal zulässige Datenblockgröße ist ein Determinismus er reicht. Die Pufferung erfolgt hierbei mittels einer einstellbaren Puffergröße.As an alternative to this, however, a method could also be used, as shown in FIG. 3, in which no data is lost. The thread for control T1 in turn produces data D and enters an ECS in the critical section of a program. If the memory area M1 is empty, the data D are read into the memory area M1. If data is still present in the memory area M1, the new data D are appended to this data originally still present in the memory area M1. The control thread T1 then leaves the critical section LCS. The thread for the visualization T2 wants to edit the area M2, enters the critical section ECS and copies the content of the memory area M1 into the memory area M2. The memory area M1 is emptied and the thread for the visualization T2 leaves the critical section on LCS. The thread for the visualization T2 now processes the memory area M2 and the thread for the control T1 is no longer blocked. The determinism is almost as certain as in the embodiment of FIG. 2, but no data loss occurs. Only the time for the merging and copying of the different data blocks of the data still in the memory area M1 and the data appended to it is variable. By limiting the data D to a maximum allowable data block size, a determinism is sufficient. The buffering takes place by means of an adjustable buffer size.
Fig. 4 zeigt ein Ablaufdiagramm eines erfindungsgemäßen Verfahrens für einen bidirektionalen Datenaustausch. Hierbei sind Benutzereingaben mittels eines weiteren Threads T3 möglich. Wie im Ausführungsbeispiel der Fig. 2 tritt der Thread zur Regelung T1 in die kritische Sektion eines Programms ein ECS, liest Daten D in den Speicherbereich M1 ein und verlässt dann die kritische Sektion LCS. Der Thread zur Visualisierung T2 bearbeitet den Speicherbereich M2, tritt in die kritische Sektion ein ECS, kopiert den Inhalt des Speicherbereichs M1 in den Speicherbereich M2, verlässt die kritische Sektion LCS und bearbeitet den Speicherbereich M2. Der weitere Thread T3 gibt Benutzerdaten D' an den Spei cherbereich M1. Der Thread T3 tritt in die kritische Sektion ein ECS und liest die Daten D' in den Speicherbereich M1 ein. Nachdem der Thread T3 die kritische Sektion verlassen hat LCS, gibt der Thread zur Regelung T1 den Speicherbe reich M1 weiter. Das Bedienelement, in diesem Fall eine Tastatur, blockiert somit die Regelung nicht und die Daten D bzw. die Benutzerdaten D' werden je nach Reihenfolge der Aktualisierung angezeigt und ausgegeben. Fig. 4 is a flowchart showing an inventive method for a bi-directional data exchange. User inputs are possible using a further thread T3. As in the exemplary embodiment in FIG. 2, the thread for control T1 enters an ECS in the critical section of a program, reads data D into memory area M1 and then leaves the critical section LCS. The thread for visualization T2 processes the memory area M2, enters the critical section, ECS, copies the content of the memory area M1 into the memory area M2, leaves the critical section LCS and processes the memory area M2. The further thread T3 gives user data D 'to the memory area M1. The thread T3 enters the critical section of an ECS and reads the data D 'into the memory area M1. After thread T3 has left the critical section LCS, the thread for control T1 passes on the memory area M1. The control element, in this case a keyboard, does not block the control and the data D or the user data D 'are displayed and output depending on the sequence of the update.
Hinsichtlich weiterer Details wird zur Vermeidung von Wiederholungen auf die allgemeine Beschreibung verwiesen.Regarding further details, to avoid repetitions on the general description referenced.
Schließlich sei ausdrücklich darauf hingewiesen, dass die voranstehend be schriebenen Ausführungsbeispiele lediglich zur Erörterung der beanspruchten Lehre dienen, diese jedoch nicht auf die Ausführungsbeispiele einschränken.Finally, it should be expressly pointed out that the above be described embodiments only to discuss the claimed Serve teaching, but do not restrict this to the exemplary embodiments.
Claims (15)
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE10120005A DE10120005A1 (en) | 2000-05-19 | 2001-04-23 | Regulating and displaying processes in which data are produced and/or consumed by tasks and/or threads involves decoupling mutually blocking tasks and/or threads in a real-time system |
JP2001150037A JP2002014827A (en) | 2000-05-19 | 2001-05-18 | Method for controlling and visualizing process |
US09/861,876 US7150016B2 (en) | 2000-05-19 | 2001-05-21 | Systems, methods and computer program products for controlling and visualizing processes |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE10024409 | 2000-05-19 | ||
DE10120005A DE10120005A1 (en) | 2000-05-19 | 2001-04-23 | Regulating and displaying processes in which data are produced and/or consumed by tasks and/or threads involves decoupling mutually blocking tasks and/or threads in a real-time system |
Publications (1)
Publication Number | Publication Date |
---|---|
DE10120005A1 true DE10120005A1 (en) | 2001-11-22 |
Family
ID=7642550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE10120005A Withdrawn DE10120005A1 (en) | 2000-05-19 | 2001-04-23 | Regulating and displaying processes in which data are produced and/or consumed by tasks and/or threads involves decoupling mutually blocking tasks and/or threads in a real-time system |
Country Status (1)
Country | Link |
---|---|
DE (1) | DE10120005A1 (en) |
-
2001
- 2001-04-23 DE DE10120005A patent/DE10120005A1/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0762274B1 (en) | Apparatus and method for real time processing of multiple tasks | |
DE10062063B4 (en) | A method, system, computer program product and storage device for controlling a queue of requests of different priority | |
DE112010004947T5 (en) | Restore a full system backup and incremental backups using multiple simultaneous unit streams | |
DE102013017982A1 (en) | COMPILER controlled area scheduling for SIMD execution of strands | |
DE112011102076T5 (en) | Reorder access to reduce the total search time to tape media | |
DE102013018445A1 (en) | Defining a subordinate imaging state in an upstream shading entity | |
DE102013017980B4 (en) | Triggering of a performance event recording by parallel status bundles | |
DE102009038454A1 (en) | A system and method for reducing execution divergence in parallel processing architectures | |
DE102007046947B4 (en) | System and method for managing system management interrupts in a multi-processor computer system | |
DE102006009617A1 (en) | Systems and methods for controlling multiple hot plug operations | |
DE60026068T2 (en) | SYSTEM FOR EXTERNAL TRANSACTIONS WITH DYNAMIC PRIORITIES | |
DE102018119881B4 (en) | Management of a DRAM bank activation | |
DE202016107451U1 (en) | Systems for interactively displaying a visible portion of a rendering surface on a user device | |
DE102015203202B4 (en) | Storage subsystem with continuous read following wrapped read | |
DE102020119205A1 (en) | STORAGE DEVICE, STORAGE SYSTEM AND OPERATING PROCEDURES THEREFORE | |
EP2780886B1 (en) | Graphics processing device, display unit for an airplane cockpit, and method for displaying graphical data | |
DE2912073A1 (en) | STACKED STORAGE ARRANGEMENT FOR THE SHORT-TERM STORAGE OF INFORMATION IN THE EVENT OF NON-SEGPARABLE INFORMATION IN A DATA PROCESSING SYSTEM | |
DE102013017514A1 (en) | WORKING FOR GRAPHIC PROCESSING UNIT BASED ON WORKING SERVICE TIMES | |
DE112012004468B4 (en) | Application-level speculative processing | |
DE102013017983A1 (en) | Technique for storing and restoring an operating state of a string group | |
DE10120005A1 (en) | Regulating and displaying processes in which data are produced and/or consumed by tasks and/or threads involves decoupling mutually blocking tasks and/or threads in a real-time system | |
DE19814359C2 (en) | Interface device, method and monitoring system for monitoring the status of a hardware device | |
EP1548603B1 (en) | Method and apparatus for controlling memory access | |
DE102013114508A1 (en) | Block-based signal processing | |
DE102006028939B4 (en) | Program pipelining method for processing streaming data in medical imaging systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
OP8 | Request for examination as to paragraph 44 patent law | ||
R009 | Remittal by federal patent court to dpma for new decision or registration | ||
R002 | Refusal decision in examination/registration proceedings | ||
R119 | Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee |