DE4341877A1 - Coordination to access multiple processors to common resource - Google Patents
Coordination to access multiple processors to common resourceInfo
- Publication number
- DE4341877A1 DE4341877A1 DE19934341877 DE4341877A DE4341877A1 DE 4341877 A1 DE4341877 A1 DE 4341877A1 DE 19934341877 DE19934341877 DE 19934341877 DE 4341877 A DE4341877 A DE 4341877A DE 4341877 A1 DE4341877 A1 DE 4341877A1
- Authority
- DE
- Germany
- Prior art keywords
- access
- processes
- class
- waiting
- resource
- 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 OR CALCULATING; 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
- G06F9/526—Mutual exclusion algorithms
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1605—Handling requests for interconnection or transfer for access to memory bus based on arbitration
- G06F13/1652—Handling requests for interconnection or transfer for access to memory bus based on arbitration in a multiprocessor architecture
- G06F13/1663—Access to shared memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/36—Handling requests for interconnection or transfer for access to common bus or bus system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Multi Processors (AREA)
Abstract
Description
Wenn mehrere Prozesse gleichzeitig auf eine gemeinsame Res source zugreifen wollen, entsteht ein Koordinations- oder Syn chronisationsproblem. Dieses Problem kann z. B. anhand der Fig. 1 diskutiert werden, in der mehrere Prozessoren PR1 bis PRn über ein Verbindungsnetzwerk VN parallel auf einen gemeinsamen Speicher SP zugreifen können. Die Prozessoren PR1 bis PRn kön nen z. B. gemeinsame Daten aus dem Speicher SP lesen oder in den Speicher SP schreiben wollen. Dementsprechend können im Bei spiel Leserzugriffe und Schreiberzugriffe unterschieden werden.If several processes want to access a common resource at the same time, a coordination or synchronization problem arises. This problem can e.g. B. be discussed with reference to FIG. 1, in which several processors PR1 to PRn can access a common memory SP in parallel via a connection network VN. The processors PR1 to PRn can, for. B. read common data from the memory SP or write to the memory SP. Accordingly, reader access and writer access can be distinguished in the game.
Das Leser/Schreiberproblem ist ein Problem der Koordination pa ralleler bzw. nebenläufiger Prozesse. Es ist dadurch gekenn zeichnet, daß die beteiligten Prozesse eine gemeinsame Res source, z. B. Speicher SP, benutzen bzw. verändern wollen; vor zugsweise wollen sie gemeinsame Daten, z. B. einzelne Variable, größere Datenstrukturen oder Datenbereiche, Datensätze einer Datenbank oder ganze Dateien, lesen oder modifizieren. Im fol genden soll das Koordinationsproblem anhand des Beispieles Le ser/Schreiberzugriffe weitergeschildert werden. Die Prozesse sind dabei so zu koordinieren, daß beliebig viele Leserprozesse gleichzeitig die Daten lesen können, aber einem Schreiberprozeß exklusiver Zugriff auf die Daten garantiert werden muß. Das Zu griffsprinzip ist also gemeinsames Lesen, aber exklusives Schreiben.The reader / writer problem is a problem of coordination pa parallel or concurrent processes. It is known by it records that the processes involved have a common Res source, e.g. B. memory SP, want to use or change; before they also want common data, e.g. B. single variable, larger data structures or data areas, data records one Database or whole files, read or modify. In fol The coordination problem should be based on the example of Le water / writer accesses are described. The processes are to be coordinated so that any number of reader processes can read the data at the same time, but a writer process exclusive access to the data must be guaranteed. The To The principle of grip is therefore reading together, but exclusive Write.
Zum Beispiel dürfen drei Leserprozesse L1, L2 und L3 der Pro zessoren PR1, PR2, PR3 gleichzeitig die gemeinsamen Daten im Speicher SP benutzen, ein Schreiberprozeß S, z. B. vom Prozes sor PRn darf nicht gleichzeitig mit anderen Prozessen sowohl Leserprozessen als auch Schreiberprozessen auf die Daten zu greifen. Eine Konstellation, in der etwa L2 und S gleichzeitig Zugriffsrecht auf die gemeinsamen Daten haben, ist also auszu schließen.For example, three reader processes L1, L2 and L3 of the Pro PR1, PR2, PR3 simultaneously the common data in the Use memory SP, a writer process S, z. B. from the process sor PRn must not be simultaneous with other processes both Reader processes as well as writer processes towards the data to grab. A constellation in which about L2 and S at the same time Access rights to the shared data must therefore be excluded shut down.
Dieses Leser/Schreiberproblem kann selbstverständlich in jeder Art nebenläufiger, paralleler oder verteilter Software auftre ten, es ist also nicht auf das behandelte Beispiel beschränkt. Vorzugsweise spielt es in Betriebssystemen, Dateisystemen und Datenbanksystemen eine Rolle, aber auch in nebenläufigen, pa rallelen oder verteilten Anwendungsprogrammen kann es vorkom men. Eine effiziente und skalierbare Lösung des Koordinations problems erhöht die Leistung der Software, in der das Problem auftritt. In der folgenden Erläuterung wird allerdings im we sentlichen die Koordination von Schreiberzugriffen und Leserzu griffen zu einem Speicher besprochen, ohne daß damit aber eine Einschränkung auf diese Art von Problemen verbunden sein soll.This reader / writer problem can of course be in everyone Type of concurrent, parallel or distributed software So it is not limited to the example covered. It preferably plays in operating systems, file systems and Database systems a role, but also in concurrent, pa parallel or distributed application programs, it can occur men. An efficient and scalable solution to coordination problems increases the performance of the software in which the problem occurs. In the following explanation, however, we the coordination of writer access and readers reached for a memory discussed, but without a Restriction is said to be related to these types of problems.
Jeder Prozeß, der Zugriff auf die gemeinsamen Daten im Speicher wünscht, durchläuft ein sog. Eintrittsprotokoll, in dem er die gewünschte Art des Zugriffes bekannt gibt. Er wird durch das Eintrittsprotokoll solange in einen Wartezustand versetzt, bis ihm der Zugriff gewährt werden kann. Dann wird das Eintritts protokoll verlassen. Nach Beendigung des Zugriffs auf die ge meinsamen Daten muß jeder Prozeß ein sog. Austrittsprotokoll ausführen, in dem er das Ende seines Zugriffs bekannt gibt. We gen der unterschiedlichen Zugriffsanforderungen haben Leser und Schreiber unterschiedliche Ein- und Austrittsprotokolle. Ein Verfahren zur Lösung des Leser/Schreiberproblems wird daher üb licherweise in Form der Ein- und Austrittsprotokolle der Leser- und Schreiberprozesse formuliert; der eigentliche Datenzugriff ist eingebettet zwischen Ein- und Austrittsprotokoll. Diese Verhältnisse sind in der am Ende beigefügten Tabelle 5 darge stellt.Any process that accesses the shared data in memory wishes to go through a so-called entry protocol in which he announces the desired type of access. He is through that Entry log put on hold until it can be granted access. Then the entry leave the protocol. After access to the ge common data, each process must have a so-called exit protocol in which he announces the end of his access. We Due to the different access requirements, readers and Write different entry and exit protocols. A A method for solving the reader / writer problem is therefore practiced in the form of the entry and exit logs of the reader and formulated writing processes; the actual data access is embedded between the entry and exit protocol. These Ratios are shown in Table 5 at the end poses.
Für das Warten von Prozessen kann eines der beiden folgenden Verfahren verwendet werden:For the maintenance of processes, one of the two following can be used Procedure used:
-
- Aktives Warten (busy waiting).
Dabei bleibt der wartende Prozeß aktiv und liest und prüft pe riodisch Kontrollvariable, die z. B. ebenfalls im gemeinsamen Speicher SP enthalten sind, und über die der Zugriff auf die gemeinsamen Daten geregelt wird. Er tut dies solange, bis er die Kontroll-Variablen in einem Zustand vorfindet, der ihm an zeigt, daß er nun Zugriffsrecht besitzt oder einen neuen Ver such machen darf, Zugriffsrecht zu erwerben. Dieses Verfahren ist in der Literatur bekannt (Andrews 91).- Active waiting (busy waiting).
The waiting process remains active and reads and checks periodically control variables which, for. B. are also contained in the common memory SP, and via which access to the common data is regulated. He does this until he finds the control variables in a state that indicates that he now has access rights or may make a new attempt to acquire access rights. This method is known in the literature (Andrews 91). -
- Einreihen in eine Warteschlange (queuing).
Der wartende Prozeß wird im Eintrittsprotokoll deaktiviert und in eine den Daten bzw. den sie schützenden Kontrollvariablen zugeordnete Warteschlange eingereiht. Tritt in dem Austritts protokoll eines anderen Prozesses der Zustand ein, daß warten den Prozessen Zugriff gewährt werden kann, nimmt sie der aus tretende Prozeß aus der Warteschlange heraus und aktiviert sie. Die Prozesse besitzen damit Zugriffsrecht oder können einen neuen Versuch unternehmen, Zugriffsrecht zu erwerben. Auch die ses Verfahren ist in der Literatur bekannt (Andrews 91).
An ein Verfahren zur Leser- und Schreiberkoordination können folgende Anforderungen gestellt werden:- Queuing.
The waiting process is deactivated in the entry log and placed in a queue assigned to the data or the control variables protecting it. If in the exit log of another process the state is waiting that access can be granted to the processes, the leaving process takes them out of the queue and activates them. The processes thus have access rights or can make a new attempt to acquire access rights. This method is also known in the literature (Andrews 91).
The following requirements can be placed on a process for reader and writer coordination: -
- Korrektheit.
Zugriffsrechte müssen den Prozessen korrekt zugeteilt werden und das Verfahren muß z. B. frei von Verklemmungen (deadlocks) sein sowie weitere Eigenschaften besitzen, die man von paralle len bzw. verteilten Algorithinen fordert (z. B. Andrews 91).- correctness.
Access rights must be correctly assigned to the processes and the procedure must e.g. B. be free of deadlocks and have other properties required by parallel or distributed algorithms (z. B. Andrews 91). -
- Effizienz und Skalierbarkeit (Fehlen serieller Engpässe).
Ein- und Austrittsprotokolle sollen möglichst effizient ausge führt können. In Parallelrechnern spielt zudem die Eigenschaft der Skalierbarkeit eines Verfahrens eine wesentliche Rolle. Für ein Verfahren zur Leser/Schreiber-Koordination bedeutet dies, daß mit steigender Zahl der Prozesse die Ein- und Austrittspro tokolle möglichst mit gleichbleibender Effizienz ausführbar sein sollen.- Efficiency and scalability (lack of serial bottlenecks).
Entry and exit logs should be able to be executed as efficiently as possible. The property of the scalability of a process also plays an important role in parallel computers. For a method for reader / writer coordination, this means that with increasing number of processes the entry and exit protocols should be able to be carried out with constant efficiency, if possible. -
- Fairness.
Das Verfahren soll die Zugriffsrechte möglichst fair an Leser und Schreiber vergeben, idealerweise in der Reihenfolge, in der die Prozesse ihre Zugriffswünsche bekanntgeben. So soll verhin dert werden, daß etwa ein kontinuierlicher Strom von Lesern (die sich ja den gerade aktiven Lesern anschließen können) war tende Schreiber sehr lange blockiert (theoretisch unendlich lange: Verhungerung der Schreiber). Allerdings kann es Anwen dungsfälle geben, in denen man einen Prozeßtyp mit Priorität behandelt, d. h. in denen Varianten mit Leser- und Schreiber priorität verwendet werden müssen.- fairness.
The procedure should grant access rights to readers and writers as fairly as possible, ideally in the order in which the processes announce their access requests. It is to be prevented, for example, that a continuous stream of readers (who can join the currently active readers) blocked writers for a very long time (theoretically infinitely long: starvation of the writers). However, there may be applications in which a process type is treated with priority, ie in which variants with reader and writer priority must be used.
Lösungen des Leser/Schreiberproblems kann man z. B. in zwei Klassen einteilen:Solutions to the reader / writer problem can be found e.g. B. in two Classify classes:
Diese dienen vorzugsweise der Koordination nebenläufiger Pro zesse, die auf einem einzigen Prozessor ablaufen und sich die sen z. B. im Zeitscheibenverfahren teilen. Solche Verfahren sind bekannt, z. B. aus Andrews 91.These are preferably used to coordinate concurrent professionals processes that run on a single processor and the sen z. B. share in the time slice method. Such procedures are known, e.g. B. from Andrews 91.
Ein Nachteil dieses Verfahrens liegt darin, daß sie für Paral lelrechner zwar korrekt, aber nicht sehr effizient, vor allem nicht skalierbar sind. Der Grund liegt darin, daß die Ein- und Austrittsprotokolle oder der Zugriff auf die Kontrollvariablen, die ihrerseits den Zugriff auf die gemeinsamen Daten regeln, sog. kritische Regionen darstellen, d. h. zu jedem Zeitpunkt nur von einem einzigen Prozeß ausgeführt werden dürfen. Damit werden fehlerhafte Veränderungen der Kontrollvariablen ausge schlossen.A disadvantage of this method is that it is used for Paral Oil calculator correct, but not very efficient, above all are not scalable. The reason is that the inputs and Exit logs or access to the control variables, which in turn regulate access to the shared data, represent so-called critical regions, d. H. at any time only may be executed by a single process. In order to incorrect changes in the control variables are output closed.
Damit stellen diese kritischen Regionen aber in einem Parallel rechner, in dem viele Prozesse parallel ablaufen, serielle Eng pässe dar. Das bedeutet, daß, selbst wenn sich z. B. nur Leser zum Zugriff auf die gemeinsamen Daten anmelden, nur ein einzi ger Leser sein Ein- und Austrittsprotokoll oder einen Zugriff auf eine Kontrollvariable ausführen darf und alle anderen war ten müssen.This places these critical regions in parallel computer in which many processes run in parallel, serial Eng passports. This means that even if e.g. B. readers only log in to access the shared data, only one ger reader his entry and exit protocol or an access allowed to execute on one control variable and all other was have to.
Für Parallelrechner mit gemeinsamen Speicher sind andere Lösun gen bekannt geworden, die den erläuterten Nachteil abschwächen oder nicht mehr aufweisen. Diese Lösungen basieren auf speziel len unteilbaren Zugriffsoperationen auf den gemeinsamen Spei cher, mit denen die Kontrollvariablen geprüft bzw. modifiziert werden. Eine häufig verwendete Operation ist fetch & add (siehe z. B. Almasi u. Gottlieb 89). Dabei wird in einer unteilbaren Operation eine Variable (der Inhalt eines Speicherwortes) ge lesen und zurückgegeben und anschließend ein in der Operation spezifizierter Wert dazu addiert. Fetch & add ist eine mit vertretbarem Aufwand in Hardware zu realisierende Operation.Other solutions are available for parallel computers with shared memory gene become known that mitigate the explained disadvantage or no longer have. These solutions are based on special len indivisible access operations to the common memory with which the control variables are checked or modified become. A common operation is fetch & add (see e.g. B. Almasi u. Gottlieb 89). Doing so is indivisible Operation a variable (the content of a memory word) read and returned and then one in the operation specified value added. Fetch & add is one with reasonable effort in hardware to be performed operation.
Mit Hilfe dieser Speicheroperationen, vorzugsweise fetch & add, können nun effizientere Ein- und Austrittsprotokolle für Le ser/Schreiber-Koordination entwickelt werden, indem Zugriffe auf die Kontrollvariablen mit diesen Operationen gemacht wer den. Höhere Effizienz der Ein- und Austrittsprotokolle ergibt sich dadurch, das damit die Hardware (das Verbindungsnetzwerk VN und/oder der gemeinsame Speicher SP) die Unteilbarkeit der Änderungen der Kontrollvariablen garantiert und eine Reihen folge dieser Änderungen festlegt; dies muß nicht mehr in Soft ware gemacht werden. With the help of these storage operations, preferably fetch & add, can now create more efficient entry and exit protocols for Le This / writer coordination can be developed by accesses on the control variables with those operations who made the. Increased efficiency of entry and exit protocols results the hardware (the connection network VN and / or the shared memory SP) the indivisibility of Changes in control variables guaranteed and a series follow these changes; this no longer has to be in soft goods are made.
Neben der erhöhten Effizienz ,ist ein weiterer Vorteil dieser Leser/Schreiberlösungen ihre Skalierbarkeit bei Vorhandensein entsprechender Hardwareunterstützung. Das Verbindungsnetzwerk muß dabei in der bage sein, Kombinieren und Dekombinieren von gleichzeitigen fetch & add - Zugriffen auf dieselbe Speicher adresse auszuführen. Im Speichersystem ist bei Vorhandensein von Kombinieren im Netzwerk nur eine kombinierte Zugriffsopera tion auszuführen, anstelle z. B. von vier seriellen Zugriffen bei Nichtvorhandensein dieser Eigenschaft. Die Prozesse erhal ten korrekte Werte zurück, die einer beliebigen seriellen Rei henfolge dieser z. B. vier Speicherzugriffe entsprechen. Die be teiligten Prozesse werden nur um die Dauer eines Speicherzu griffs verzögert, da die Speicherzugriffe auf dieselbe Variable parallelisiert werden.In addition to increased efficiency, another advantage is this Reader / writer solutions their scalability when available appropriate hardware support. The connection network must be able to combine and decombine simultaneous fetch & add access to the same memory address. In the storage system is present of Combine only one combined access opera in the network tion instead of z. B. of four serial accesses in the absence of this property. The processes get returned correct values from any serial row order of these z. B. correspond to four memory accesses. The be Processes involved are only increased by the duration of a memory handles delayed because the memory accesses to the same variable be parallelized.
Ein solches kombinierendes Verbindungsnetzwerk ist z. B., in Al masi & Gottlieb 89 beschrieben.Such a combining connection network is e.g. B., in Al masi & Gottlieb 89.
In Gottlieb et al 83 sind zwei Leser-/Schreiberverfahren auf der Basis von fetch & add angegeben, mit Busy waiting als Wartedisziplin und Leser-bzw. Schreiberpriorität. Ein Nachteil dieser Verfahren ist, das sie nur mit Aktivem Warten funktionieren und nicht fair sind.In Gottlieb et al 83 there are two reader / writer methods the base of fetch & add, with busy waiting as Waiting discipline and reader resp. Writer priority. A disadvantage this procedure is that you can only do it with active waiting work and are not fair.
Das der Erfindung zugrundeliegende Problem besteht darin, ein Verfahren zur Koordination von Zugriffen mehrerer Prozesse auf eine Ressource anzugeben, das die oben angegebene Anforderungen erfüllt, also fair, skalierbar, effizient, korrekt ist und sowohl aktives Warten als auch Einreihen in eine Warteschlange als Wartedisziplin benutzen kann.The problem underlying the invention is a Procedures for coordinating access to multiple processes specify a resource that meets the above requirements fulfilled, i.e. fair, scalable, efficient, correct and both active waiting and queuing can use as a waiting discipline.
Diese Aufgabe wird gemäß den Merkmalen des Patentanspruchs 1 gelöst. This object is achieved in accordance with the features of patent claim 1 solved.
Bei dem erfindungsgemäßen Verfahren werden die Prozesse ent sprechend ihrem Typ in Klassen eingeteilt, z. B. bilden die Le serprozesse eine Klasse und die Schreiberprozesse eine andere Klasse. Dabei ist das Verfahren so ausgeführt, daß die Prozesse einer Klasse parallel auf die Ressource zugreifen können, wäh rend Prozesse einer anderen Klasse nur ein exklusives Zugriffs recht haben.In the method according to the invention, the processes are removed divided into classes according to their type, e.g. B. form the Le processes one class and the writer processes another Great. The process is carried out so that the processes of a class can access the resource in parallel Processes of a different class only have exclusive access to be right.
Weiterbildungen der Erfindung ergeben sich aus den Unteransprü chen.Further developments of the invention result from the dependent claims chen.
Das erfindungsgemäße Verfahren löst das Leser/Schreiberproblem in fairer Weise und so, daß es durch Benutzung von fetch & add Speicheroperationen effizient und bei Vorhandensein von Kombi ning oder Kombinieren im Verbindungsnetzwerk skalierbar ist. Vor allem kann statt busy waiting auch queuing als Wartediszi plin eingesetzt werden.The method according to the invention solves the reader / writer problem in a fair way and in such a way that using fetch & add Storage operations efficiently and in the presence of station wagons ning or combining in the connection network is scalable. Above all, instead of busy waiting, queuing can also serve as a waiting disc plin can be used.
Das Warten der Prozesse wird durch skalierbare Semaphore (d. h. durch skalierbare Operationen P() und V() auf Semaphore) be wirkt. Das Verfahren ist so aufgebaut, daß Semaphore mit busy waiting oder mit queuing als Wartedisziplin verwendet werden können, ohne daß die Struktur des Verfahrens sich ändert. Damit kann ohne Aufwand diejenige Wartedisziplin gewählt werden, die für den jeweiligen Anwendungsfall am besten geeignet erscheint.Process maintenance is accomplished through scalable semaphores (i.e. by scalable operations P () and V () on semaphores) works. The procedure is structured so that semaphores are busy waiting or queuing can be used as a waiting discipline can without changing the structure of the process. In order to the waiting discipline can be chosen without effort seems most suitable for the respective application.
Das erfindungsgemäße Verfahren ist fair in dem Sinne, daß Le ser- und Schreiberprozesse einander beim Zugriff auf die ge meinsamen Daten abwechseln. Leser dürfen solange ungehindert auf die Daten zugreifen, bis sich ein Schreiber anmeldet. Dann beenden die noch aktiven Leser ihre Zugriffe und der letzte von ihnen aktiviert den oder die Schreiber, von denen einer schließlich Zugriffsrecht erhält. Ein Schreiber übergibt nach Beendigung seines Zugriffs die Zugriffskontrolle an die ange meldeten Leser; sind keine Leser angemeldet, gibt er an einen Schreiber weiter.The inventive method is fair in the sense that Le Server and writer processes mutually access the ge alternate common data. As long as readers are allowed access the data until a clerk logs on. Then the active readers end their accesses and the last of them activated the writer (s), one of whom finally gets access rights. A clerk gives in Termination of his access to the access control reported readers; if no readers are registered, he will give one to one Continue writing.
Zum Verständnis des erfindungsgemäßen Verfahrens wird kurz auf Semaphore bzw. Semaphoroperationen P() und V() eingegangen. Se maphore sind ein häufig verwendetes Synchronisationsmittel und werden z. B. in Andrews 91 behandelt.To understand the method according to the invention, briefly Semaphores or semaphore operations P () and V () were received. Se maphore are a common synchronization tool and z. B. treated in Andrews 91.
Eine Semaphore ist eine Instanz eines abstrakten Datentyps, vorzugsweise eine nicht-negative ganze Zahl s, die nur durch zwei spezielle, unteilbare Operationen P() und V() manipuliert werden darf. Die Operation P() wird benutzt, um einen Prozeß zu verzögern, bis ein Ereignis eingetreten ist. Die Operation V() zeigt das Eintreten eines solchen Ereignisses an. Ist s eine nicht-negative ganze Zahl, verzögert P(s) den aufrufenden Pro zeß, bis s positiv wird, dann wird s dekrementiert; V(s) dagegen inkrementiert s. P() wird häufig als "passieren" oder "belegen" (pass), V() als "freigeben" (free) bezeichnet. Hat eine Semaphore einen positiven Wert, wird sie "offen" (open) genannt, sonst geschlossen (closed).A semaphore is an instance of an abstract data type, preferably a non-negative integer s, only by manipulates two special, indivisible operations P () and V () may be. Operation P () is used to execute a process delay until an event occurs. Operation V () indicates the occurrence of such an event. Is his non-negative integer, P (s) delays the calling pro press until s becomes positive, then s is decremented; V (s) on the other hand, increments s. P () is often called "happen" or "occupy" (pass), V () referred to as "release" (free). Has a semaphore has a positive value, it becomes "open" called, otherwise closed.
Anhand von am Ende der Beschreibung angefügten Tabellen und an hand der Fig. 2 wird die Erfindung weiter erläutert.The invention is further explained with the aid of tables attached at the end of the description and with reference to FIG. 2.
Aus Tabelle 1 ergibt sich das erfindungsgemäße Verfahren in Pseudocode-Notation, aus Tabelle 2 in Pseudocode-Notation die Operationen P() und V() einer busy waiting Semaphore mit einer Initialisierungsprozedur, aus Tabelle 3 eine skalierbare Sema phore-Realisierung mit fetch & add und queuing als Wartestra tegie und aus Tabelle 4 ein Beispiel, wie das Verfahren nach Tabelle 1 Leser-und Schreiberprozesse koordiniert. Das Schlüsselelement des erfindungsgemäßen Verfahrens ist die Verwendung eines gemeinsamen Kontrollzählers cnt als Kontroll variable. Dieser Kontroll-Zähler zeigt den Konfliktzustand an den gemeinsamen Daten an, d. h. die Zahl der Leser- und Schrei ber, die auf die gemeinsamen Daten zugreifen oder auf Zugriffe warten. Beide Größen (Zahl der aktiven oder wartenden Leser und Schreiber) können in einem einzigen Kontrollzähler cnt darge stellt werden:The process according to the invention is shown in Table 1 in Pseudocode notation, from Table 2 in pseudocode notation Operations P () and V () of a busy waiting semaphore with one Initialization procedure, from Table 3 a scalable Sema phore implementation with fetch & add and queuing as a waiting list tegie and from Table 4 an example of how the process coordinated according to Table 1 reader and writer processes. The key element of the method according to the invention is Use of a common control counter as a control variable. This control counter shows the state of conflict the common data, d. H. the number of readers and cries who access the shared data or access waiting. Both sizes (number of active or waiting readers and Writers) can cnt darge in a single control counter are:
Leser erhöhen oder erniedrigen den Kontrollzähler cnt um einen kleinen Zählwert, z. B. 1, Schreiber um einen sehr großen Wert, z. B. HUGE, der größer zu sein hat als die Zahl der gleichzeitig anmeldenden Leser und wie folgt zu wählen ist: Ist cnt ein Speicherwort der Breite n-bits, dann soll HUGE: = 2n/2 gesetzt werden. Der Algorithmus arbeitet dann korrekt bis zu einer An zahl von jeweils 2n/2-1 gleichzeitig aktiven oder wartenden Lesern und Schreibern. In Tabelle 1 ist n mit n = 64 bits ge wählt worden. Die Anzahl der dann zu einem Zeitpunkt aktiven oder wartenden Leser ergibt sich damit zu (cnt MOD HUGE), die der Schreiber (cnt DIV HUGE), wobei MOD die Modulo-Operation bezeichnet und DIV die ganzzahlige Division.Readers increase or decrease the control counter cnt by a small count, e.g. B. 1, writer around a very large value, e.g. B. HUGE, which has to be larger than the number of readers logging on at the same time and should be selected as follows: If cnt is a memory word with the width n-bits, then HUGE: = 2 n / 2 should be set. The algorithm then works correctly up to a number of 2 n / 2 -1 readers and writers active or waiting at the same time. In Table 1, n with n = 64 bits has been selected. The number of readers then active or waiting at a given time thus results in (cnt MOD HUGE), that of the writer (cnt DIV HUGE), where MOD denotes the modulo operation and DIV the integer division.
Jeder Prozeß, der Zugriff auf gemeinsame Daten anmeldet oder das Ende seines Zugriffs bekanntgibt, tut dies durch einen fetch & add Zugriff auf den Zähler cnt; dies ist jeweils die erste Operation in den Ein- und Austrittsprotokollen beider Prozeßklassen (s. Zeilen 10, 12, 18 und 23 der Tabelle 1). Mit diesem einen fetch & add Zugriff auf cnt meldet sich jeder Pro zeß für den Zugriff auf die gemeinsamen Daten an bzw. davon ab (durch Addition bzw. Subtraktion von Eins bzw. HUGE) und erhält gleichzeitig die Information über den derzeitigen Kon fliktzustand an den gemeinsamen Daten zurück. Dieser Zustand bestimmt die weiteren Protokollaktivitäten, die der Prozeß aus führt.Any process that logs access to shared data or announces the end of his access, does so by one fetch & add access to the counter cnt; this is always the first operation in both entry and exit logs Process classes (see lines 10, 12, 18 and 23 of table 1). With Every pro reports this one fetch & add access to cnt cess to or from the access to the common data (by adding or subtracting one or HUGE) and receives at the same time the information about the current Kon back on the shared data. That state determines the further log activities that the process is made of leads.
In einem konfliktfreien Zustand sind keine weiteren Aktivitäten erforderlich. In solch günstigen Situationen reduzieren sich damit die Ein- und Austrittsprotokolle zu jeweils einem fetch & add Zugriff auf den gemeinsamen Kontrollzähler cnt (plus weni gen lokalen Operationen in den Schreiber-Protokollen). In die sen Fällen ist daher das Verfahren optimal effizient.No other activities are in a conflict-free state required. In such favorable situations, reduce yourself so that the entry and exit logs to a fetch & add access to the common control counter cnt (plus weni local operations in the clerk protocols). In the In these cases, the process is optimally efficient.
Wenn ein neu angekommener Leser herausfindet, daß Schreiber sich vor ihm angemeldet hatten (d. h. wenn der Rückgabewert der fetch & add Operation größer oder gleich HUGE ist (Zeile 10), wartet er an der für Leser vorgesehenen Semaphore r, indem er P(r) ausführt (Zeile 11). Das Verhalten eines neu angekommenen Schreibers ist ähnlich. Er versetzt sich im Konfliktfall an der Semaphore w durch P(w) in den Wartezustand (Zeile 22).When a newly arrived reader finds out that writer had logged in before him (i.e. if the return value of the fetch & add operation is greater than or equal to HUGE (line 10), he waits at the semaphore r intended for readers by P (r) executes (line 11). The behavior of a newly arrived Schreibers is similar. In the event of a conflict, he moves to the Semaphore w through P (w) to the waiting state (line 22).
Wenn ein Schreiberprozeß nach Beendigung seines Datenzugriffs in seinem Austrittsprotokoll feststellt, daß Leser warten (d. h., wenn der Rückgabewert der fetch & add Operation und da mit seine lokalen Variablen oldcnt und nwr größer als Null sind (Zeilen 23-25)), zeigt er den nwr wartenden Lesern die Freigabe der gemeinsamen Daten an, indem er nwr-mal V(r) ausführt (vorzugsweise parallel) und damit die Leser aus ihrem Wartezustand aufweckt (Zeilen 28 und 29). Stellt der Schreiber aber fest, daß keine Leser, aber ein oder mehrere Schreiber warten (d. h. wenn nwr Null ist und oldcnt größer als HUGE (Zeilen 30, 31)), aktiviert er den nächsten wartenden Schreiber mittels V(w) (Zeile 32).When a writer process has finished accessing data in his exit log states that readers are waiting (i.e. if the return value of the fetch & add operation and there with its local variables oldcnt and nwr are greater than zero (Lines 23-25)), he shows the nwr waiting readers Share the shared data by writing nwr times V (r) executes (preferably in parallel) and thus the readers from their Waiting state wakes up (lines 28 and 29). Asks the clerk but firmly that no readers, but one or more writers wait (i.e. if nwr is zero and oldcnt is greater than HUGE (Lines 30, 31)), he activates the next waiting clerk using V (w) (line 32).
Wenn Leserprozesse die gemeinsamen Daten freigeben und ein oder mehrere Schreiber in Wartestellung sind, kümmert sich der Leser mit Ausnahme des letzten nicht um die Schreiber; es ist Aufgabe des letzten Lesers, den oder die Schreiber durch V(w) davon in Kenntnis zu setzen, daß die Leser ihren Zugriff beendet haben (Zeilen 14, 15).When reader processes release the common data and an or if several writers are on hold, the reader takes care with the exception of the last not the clerk; it is task of the last reader, the writer (s) by V (w) thereof in Notify that readers have ended their access (Lines 14, 15).
Diese Situation behandelt der restliche, etwas komplexere Teil des Verfahrens. Die Zahl der gerade aktiven Leser muß in einem Zähler nar geführt werden, so daß die Leser bestimmen können, welcher von ihnen der letzte ,ist, der den Zugriff auf die ge meinsamen Daten freigibt. Solange nur Leser die Daten benutzen, wird dieser Zähler nar nicht benutzt, also nar = 0.The rest of the somewhat more complex part deals with this situation of the procedure. The number of active readers must be in one Counters are kept so that readers can determine which of them is the last one to have access to the ge shared data. As long as only readers use the data, this counter is not used, i.e. nar = 0.
Der erste ankommende Schreiber aber muß nar auf die Anzahl der gerade aktiven Leser setzen (Zeile 21), die er aus dem Rückga bewert (oldcnt) seines fetch & add-Zugriffs auf den Kontroll zähler cnt errechnet (Zeile 18). Er erkennt an diesem Rückgabe wert auch, daß er der erste Schreiber nach einer Reihe von Le sern ist (Zeilen 19, 20). Erst nachdem der Zähler nar von die sem Schreiber gesetzt und damit positiv geworden ist, dürfen die Leser, die den Datenzugrifffreigeben, den Zähler nar be nutzen und dekrementieren, so daß sich der letzte von ihnen als solcher identifizieren kann. Bis der Zähler nar gesetzt ist, müssen sie in einer Warteschleife verbleiben (Zeile 13). Es ist zu beachten, daß in dieser Situation keine weiteren Leser aktiv werden und damit den Zähler nar verändern können; Leser, die während dieser Vorgänge ankommen, werden mit P(r) in Wartestel lung versetzt (Zeile 11).The first arriving clerk must not count on the number of put active reader (line 21), which he from the return evaluates (oldcnt) his fetch & add access to the control counter cnt calculated (line 18). He recognizes from this return also worth being the first writer after a series of Le is (lines 19, 20). Only after the counter has stopped our clerk and has thus become positive the readers who enable data access do not use the counter use and decrement so that the last of them turns out to be can identify such. Until the counter is set, they must remain on hold (line 13). It is Note that no other readers are active in this situation will and can thus not change the counter; Readers who Arriving during these operations will be pending with P (r) lung offset (line 11).
Es gibt noch eine zweite Situation, in der der Zähler nar ge setzt werden muß, nämlich dann, wenn ein Schreiber die Zu griffskontrolle an wartende Leser abgibt und dahinter bereits wieder ein oder mehrere Schreiber warten. Der Zähler nar muß hier auf die Anzahl der zu aktivierenden Leser gesetzt werden (Zeile 27), so daß sich der letzte von ihnen als solcher erkennt und den nächsten Schreiber aktivieren kann.There is a second situation where the counter is not must be set, namely when a writer closes the hands over control to waiting readers and already behind one or more clerks are waiting again. The counter nar must be set here to the number of readers to be activated (Line 27), so that the last of them as such recognizes and can activate the next recorder.
Der Ablauf des Verfahrens wird anhand eines Beispieles nach Ta belle 4 erläutert. Aus Tabelle 4 ergibt sich, wie das erfin dungsgemäße Verfahren nach Tabelle 1 Leser- und Schreiberpro zesse koordiniert, wobei verschiedene Übergänge zwischen Lesern und Schreibern und damit die verschiedenen Teile des Verfahrens illustriert werden. The course of the process is illustrated using an example according to Ta belle 4 explained. Table 4 shows how this is invented process according to Table 1 reader and writer pro processes coordinated, with different transitions between readers and writers and thus the different parts of the process be illustrated.
Zu der in Tabelle 4 verwendeten Notation ist folgendes zu sa gen: Gezeigt werden die Aktionen (Ausführung der Eintrittspro tokolle E und Austrittsprotokolle A und Zugriffe Z auf die ge meinsamen Daten) von Lesern Li und Schreibern Sj sowie die Werte der Variablen und der Wartezustände, welche nach voll ständiger Ausführung der Aktionen gelten. Die Zeit läuft dabei von oben nach unten. Durch horizontale Striche getrennt sind Aktionen, die seriell ablaufen. Eine Gruppe von Aktionen zwi schen je zwei horizontalen Strichen kann im Prinzip überlappend ablaufen; die dargestellte Reihenfolge solcher Aktionen ent spricht der angenommenen Reihenfolge der fetch & add-Zugriffe auf den Kontrollzähler cnt, die die Prozesse ausführen.The following should be said about the notation used in Table 4: The actions (execution of entry protocols E and exit protocols A and accesses Z to the common data) by readers L i and writers S j as well as the values of the variables and Waiting states which apply after the actions have been carried out in full. The time runs from top to bottom. Actions that run in series are separated by horizontal lines. In principle, a group of actions between two horizontal lines can overlap; the sequence of such actions shown corresponds to the assumed sequence of fetch & add accesses to the control counter cnt that the processes execute.
Sowohl in Tabelle 1 als auch in Tabelle 4 sind die einzelnen Vorgänge kommentiert, so daß sie aus sich heraus verständlich sind. Eine weitere Erläuterung ist damit nicht erforderlich.Both in Table 1 and Table 4 are the individual ones Processes commented so that they are understandable in themselves are. A further explanation is therefore not necessary.
Als Wartedisziplin für das erfindungsgemäße Verfahren kann durch Einsetzen entsprechender Semaphore bzw. Semaphoreopera tionen sowohl busy waiting als auch queueing gewählt werden. Eine skalierbare Semaphore Realisierung mit fetch & add und busy waiting als Wartestrategie ist in Tabelle 2 gezeigt. Sie ist z. B. aus Almasi & Gottlieb 89 bekannt. Tabelle 2 zeigt in Pseudocode Notation die Operationen P() und V() einer busy wai ting Semaphore zusammen mit einer Initialisierungsprozedur. Fetch & add wird darin verwendet, um unteilbar die Semaphore zu inkrementieren bzw. zu dekrementieren. Auch in Tabelle 2 sind die einzelnen Vorgänge kommentiert, so daß das Verfahren der Tabelle 2 verständlich ist.As a waiting discipline for the method according to the invention by inserting appropriate semaphores or semaphore operas Both busy waiting and queuing can be selected. A scalable semaphore implementation with fetch & add and busy waiting as a waiting strategy is shown in Table 2. she is z. B. from Almasi & Gottlieb 89 known. Table 2 shows in Pseudocode notation the P () and V () operations of a busy wai ting semaphore together with an initialization procedure. Fetch & add is used in it to make the semaphores indivisible increment or decrement. Also in table 2 are commented on the individual processes, so that the procedure of Table 2 is understandable.
Das erfindungsgemäße Verfahren kann aber auch mit der Wartedis ziplin queueing eingesetzt werden, ein Beispiel in Pseudocode notation zeigt Tabelle 3. The method according to the invention can, however, also be carried out with the waiting disc ziplin queuing can be used, an example in pseudocode notation shows table 3.
Die Tabelle 3 wird zusammen mit der Fig. 2 erläutert.Table 3 is explained together with FIG. 2.
Die Warteschlange wird (anlaog zu Almasi & Gottlieb 89) reprä sentiert durch ein globales zirkuläres Feld von Prozeßkennungen pids (0 : n-1) der Größe n, in dem Prozeßkennungen vom Typ PID in Warteposition abgelegt werden können (Zeile 2). Die globalen Variablen tail und head zeigen auf Wartepositionen (slots), in die bzw. aus denen die nächsten Prozeßkennungen eingefügt bzw. herausgenommen werden können (Zeilen 3 und 4). Diese Variablen werden mit fetch & add Speicherzugriffen inkrementiert, so daß jeder Prozeß eine eindeutige Warteposition-Nummer erhält, in die er seine Prozeßkennung P einfügen kann (z. B. Pi, Pj, Pk) und aus der er eine solche entnehmen kann (z. B. Pl, Pm). Anfangs ist die Warteschlange leer und tail = head = 0.The queue (represented by Almasi & Gottlieb 89) is represented by a global circular field of process IDs pids (0: n-1) of size n, in which process IDs of the PID type can be stored in the waiting position (line 2). The global variables tail and head point to waiting positions (slots) into or from which the next process identifiers can be inserted or removed (lines 3 and 4). These variables are incremented with fetch & add memory accesses, so that each process receives a unique waiting position number, into which it can insert its process identifier P (e.g. P i , P j , P k ) and from which it takes one can (e.g. P l , P m ). Initially the queue is empty and tail = head = 0.
Die Variablen ublen und lblen (Zeilen 5 und 6) haben folgende aus Almasi und Gottlieb 89 bekannte Bedeutung. Die Variable ublen bezeichnet zu jedem Zeitpunkt die Zahl der Wartepositio nen, die gerade gefüllt sind oder gerade gefüllt oder geleert werden. In gewissem Sinne ist ublen eine "obere Schranke" der gerade gültigen Warteschlangenlänge. Die Variable lblen be zeichnet zu jedem Zeitpunkt die Zahl der Wartepositionen, die gerade gefüllt sind und nicht gerade gefüllt oder geleert wer den; im gewissen Sinne ist lblen eine "untere Schranke" der ge rade gültigen Warteschlangenlänge. Die Differenz der beiden Va riablen (ublen - lblen) bezeichnet die Anzahl der Prozeßkennun gen, die zu einem Zeitpunkt eingefügt oder herausgenommen wer den (s. Fig. 2).The variables ublen and lblen (lines 5 and 6) have the following meanings known from Almasi and Gottlieb 89. The variable ublen denotes the number of waiting positions that are currently being filled or are currently being filled or emptied. In a sense, ublen is an "upper bound" of the currently valid queue length. The variable lblen denotes the number of waiting positions that are currently filled and not exactly filled or emptied; in a sense, lblen is a "lower bound" of the currently valid queue length. The difference between the two variables (ublen - lblen) denotes the number of process identifications that are inserted or removed at a time (see FIG. 2).
Die beiden Variablen ublen und lblen sind notwendig, da in ei ner parallelen Warteschlange viele enqueue und dequeue Opera tionen gleichzeitig (parallel) ablaufen können. Enqueue und de queue bedeuten Einfügen (enqueue) und Herausnehmen (dequeue). The two variables ublen and lblen are necessary because in ei A parallel queue of many enqueue and dequeue operas ions can run simultaneously (in parallel). Enqueue and de queue means inserting (enqueue) and removing (dequeue).
Sie sind in Almasi & Gottlieb 89, S. 446-449) zur Verwaltung skalierbarer paralleler Warteschlangen beschrieben.They are in Almasi & Gottlieb 89, pp. 446-449) for administration described scalable parallel queues.
Beide Variablen werden wieder mittels fetch & add inkrementiert bzw. dekrementiert (z. B. Zeilen 25, 26, 46 und Zeilen 39, 40, 33). Anhand ihrer Werte wird festgestellt, ob die Warteschlange voll bzw. leer ist. Die Warteschlange wird als voll betrachtet, wenn ublen größer oder gleich n ist und als leer, wenn lblen kleiner oder gleich Null ist.Both variables are incremented again using fetch & add or decremented (e.g. lines 25, 26, 46 and lines 39, 40, 33). Their values are used to determine whether the queue is full or empty. The queue is considered full if ublen is greater than or equal to n and as empty if lblen is less than or equal to zero.
Schließlich wird für jede Warteposition oder slot noch ein Paar von Busy Waiting Semaphoren benötigt, die sicherstellen, daß Enqueue- und Dequeue-Operationen auf jeden slot einander kor rekt abwechseln. Diese sind in Tabelle 3 durch die Felder enqs (0 : n-1) (Enqueue - Semaphore) und deqs (0 : n-1) (Dequeue - Semaphore) repräsentiert (Zeilen 7 und 8).Finally, there is a pair for each waiting position or slot needed by busy waiting semaphores to ensure that Enqueue and dequeue operations on each slot are correct alternate right. These are in Table 3 by the fields enqs (0: n-1) (enqueue - semaphore) and deqs (0: n-1) (Dequeue - Semaphore) represents (lines 7 and 8).
Es kann durchaus vorkommen, daß eine Enqueue- und eine Dequeue- Operation gleichzeitig denselben slot füllen und leeren wollen. Diese Semaphore werden so initialisiert und in den qP()- und qV()-Operationen so verwendet, daß jeder slot immer abwechselnd gefüllt und geleert wird (Zeile 29, 32, 43, 45). Vergleichbare Synchronisationsmaßnahmen sind aus Almasi & Gott lieb 89 bekannt.It can happen that an enqueue and a dequeue Operation want to fill and empty the same slot at the same time. These semaphores are initialized in this way and in the qP () and qV () operations are used so that each slot is always alternating is filled and emptied (lines 29, 32, 43, 45). Comparable Synchronization measures are from Almasi & Gott lieb 89 known.
Wesentlich in Tabelle 3 ist der Einsatz der Warteschlangenver waltung in den Semaphor-Operationen qP() und qV(). Eine Sema phore mit dieser Art von Queueing als Wartedisziplin verfügt über einen Semaphor-Zähler qcnt, eine parallele Warteschlange pids (0 : n-1) und die beschriebenen ergänzenden Variablen (Zeilen 9-11). Der Semaphor-Zähler qcnt kann hier allerdings auch negativ werden. Ist dies der Fall, bezeichnet sein Abso lutbetrag die Zahl der Prozeßkennungen, die in die Warte schlange eingefügt wurden oder werden. The use of the queue server is essential in Table 3 administration in the semaphore operations qP () and qV (). A sema phore has this type of queuing as a waiting discipline via a semaphore counter qcnt, a parallel queue pids (0: n-1) and the described additional variables (Lines 9-11). The semaphore counter qcnt can be used here also become negative. If this is the case, his Abso The amount of the process IDs that are waiting in the lute amount snake were or will be inserted.
Wird in qP() (Zeilen 20-33) der Semaphor-Zähler qcnt als nichtpositiv vorgefunden (Zeile 23), wird die Prozeßkennung pid, die als Parameter übergeben wurde, in die Warteschlange eingereiht. Nach Erfolg der Einfügeoperation wird der Prozeß mit Kennung pid suspendiert (deaktiviert). Wird im Zuge des Einfügens von pid anhand von ublen die Warteschlange als voll erkannt (Zeile 25), wartet der einfügende Prozeß in einer War teschleife, bis wieder mindestens ein Slot frei ist (Zeile 27). Diese Warteschleife (d. h. Busy Waiting) ist also eine Rück fallposition für den Fall, daß die Prozeßwarteschlange voll ist. Die Operation qP() ist in Tabelle 3 als eine priviligierte Operation (system call) bezeichnet, da darin ein Prozeß einen anderen Prozeß (nämlich pid) suspendiert. Ein Prozeß kann nicht selbst die Operation qP() ausführen, da er dies nicht zu Ende führen könnte, sondern bei deschedule(pid) sich selbst de aktivieren würde. Für das korrekte Verhalten der Semaphore muß die Operation qP() aber vollständig ablaufen; ein qP() muß da her von dem auf rufenden Prozeß an einen anderen, ausführenden Prozeß übertragen werden.If the semaphore counter qcnt is used in qP () (lines 20-33) as The process identifier is found to be non-positive (line 23) pid passed as a parameter to the queue classified. After the insert operation is successful, the process with identifier pid suspended (deactivated). Will in the course of Inserting pid based on ublen the queue as full recognized (line 25), the inserting process waits in a war loop until at least one slot is free again (line 27). So this queue (i.e. busy waiting) is a return Fall position in case the process queue is full is. The qP () operation is privileged in Table 3 Operation (system call) denotes, because in it a process one other process (namely pid) suspended. A process cannot even execute the qP () operation since it doesn't finish this could lead, but at deschedule (pid) de itself would activate. For the correct behavior of the semaphores but the qP () operation is complete; a qP () must be there from the calling process to another executing one Process to be transferred.
Wird in qV() (Zeilen 34-47) der Semaphor-Zähler qcnt als ne gativ vorgefunden (Zeile 37), wird der erste Prozeß aus der Warteschlange entnommen und aktiviert. Im Zuge des Entnehmens kann die Warteschlange als "leer" angesehen werden (anhand von lblen) (Zeile 39). Tritt dieser Fall ein, ist aber sicherge stellt, daß parallel dazu mindestens eine qP()-Operation im Gange, aber noch nicht abgeschlossen ist. Der Prozeß, der qV() ausführt, betritt eine Warteschleife, bis mindestens ein Slot gefüllt ist (Zeile 41). Ist die Warteschlange tatsächlich leer, wird qcnt als nicht negativ vorgefunden, der Versuch des Ent nehmens eines Prozesses wird nicht unternommen.In qV () (lines 34-47) the semaphore counter qcnt is called ne found negative (line 37), the first process from the Queue removed and activated. In the course of the removal the queue can be considered "empty" (based on lblen) (line 39). If this happens, it is certain provides that at least one qP () operation in parallel Underway but not yet completed. The process, the qV () executes, enters a queue until at least one slot is filled (line 41). If the queue is actually empty, qcnt is found to be not negative, the attempt by Ent a process is not undertaken.
Auch in Tabelle 3 sind die einzelnen Zeilen zusätzlich noch do kumentiert, um ihre Bedeutung zu erläutern. In Table 3, too, the individual lines are still do documented to explain their meaning.
[Almasi & Gottlieb 89]
G.S.Almasi, A.Gottlieb, Highly Parallel Computing, Benja
min/Cummings, 1989.
[Andrews 91]
G.R.Andrews, Concurrent Programming, Principles and Practice,
Benjamin/Cummings, 1991.
[Gottlieb et al 83)
A.Gottlieb, B.D. bubachevsky, b. Rudolph, "Basic Techniques for
the Efficient Coordination of Very barge Numbers of Cooperra
ting Sequential Processors", ACM Trans. on Programming bangua
ges and Systems, Vol. 5, No. 2, April 1983, pp. 164-189.
[Almasi & Gottlieb 89]
GSAlmasi, A. Gottlieb, Highly Parallel Computing, Benja min / Cummings, 1989.
[Andrews 91]
GRAndrews, Concurrent Programming, Principles and Practice, Benjamin / Cummings, 1991.
[Gottlieb et al 83)
A. Gottlieb, BD bubachevsky, b. Rudolph, "Basic Techniques for the Efficient Coordination of Very barge Numbers of Cooperating Sequential Processors", ACM Trans. On Programming bangua ges and Systems, Vol. 5, No. April 2, 1983, pp. 164-189.
Claims (14)
- - bei dem die Prozesse entsprechend ihrem Typ in Klassen einge teilt werden,
- - bei dem Prozesse einer ersten Klasse solange auf die Res source zugreifen dürfen, bis ein Zugriff eines Prozesses ei ner anderen Klasse vorliegt,
- - bei dem nach Abschluß des Zugriffs des letzten Prozesses der ersten Klasse ein Prozeß einer zweiten Klasse aktiviert wird,
- - bei dem nach Abschluß des Zugriffs des Prozesses der zweiten Klasse bei Vorliegen von Zugriffsanforderungen von Prozessen anderer Klassen diese Prozesse aktiviert werden, sonst ein Prozeß der zweiten Klasse, sofern ein solcher vorliegt.
- - in which the processes are divided into classes according to their type,
- - where processes of a first class are allowed to access the resource until there is access by a process from another class,
- in which a process of a second class is activated after the access of the last process of the first class,
- - In which after the access of the process of the second class, if there are access requests from processes of other classes, these processes are activated, otherwise a process of the second class, if there is one.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| DE19934341877 DE4341877A1 (en) | 1993-12-08 | 1993-12-08 | Coordination to access multiple processors to common resource |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| DE19934341877 DE4341877A1 (en) | 1993-12-08 | 1993-12-08 | Coordination to access multiple processors to common resource |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| DE4341877A1 true DE4341877A1 (en) | 1995-06-14 |
Family
ID=6504496
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| DE19934341877 Withdrawn DE4341877A1 (en) | 1993-12-08 | 1993-12-08 | Coordination to access multiple processors to common resource |
Country Status (1)
| Country | Link |
|---|---|
| DE (1) | DE4341877A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1428151A4 (en) * | 2001-09-21 | 2007-08-01 | Polyserve Inc | System and method for implementing journaling in a multi-node environment |
-
1993
- 1993-12-08 DE DE19934341877 patent/DE4341877A1/en not_active Withdrawn
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1428151A4 (en) * | 2001-09-21 | 2007-08-01 | Polyserve Inc | System and method for implementing journaling in a multi-node environment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| DE60223394T2 (en) | METHOD AND DEVICE FOR ASSIGNING REQUIREMENTS FOR A DYNAMIC DIRECT ACCESS MEMORY DEVICE | |
| DE3134428C2 (en) | ||
| DE68924934T2 (en) | Parallel synchronization technology. | |
| DE68927375T2 (en) | Arbitration of transmission requests in a multiprocessor computer system | |
| DE69322538T2 (en) | Method and processor for processing a program in parallel | |
| DE69106384T2 (en) | SCALABLE PARALLEL VECTOR CALCULATOR SYSTEM. | |
| DE4227345C2 (en) | Process control process in a multiprocessor computer system | |
| DE3689990T2 (en) | Flexible data transfer for message-oriented protocols. | |
| DE69030228T2 (en) | Method for connecting two relations of a database on a common field in a parallel database system | |
| DE69230462T2 (en) | Arbitration of multiprocessor access to shared resources | |
| DE3688893T2 (en) | Data transfer and buffer control with multiple process-transparent storage modes. | |
| EP0762274B1 (en) | Apparatus and method for real time processing of multiple tasks | |
| DE68925646T2 (en) | PIPELINE MULTIPROCESSOR SYSTEM | |
| DE69328804T2 (en) | Distribution of transmission links over several service access points in a communication network | |
| DE69107506T2 (en) | Method and device for controlling simultaneity of common data updates and queries. | |
| DE69428972T2 (en) | System and method for owner management of a shared synchronization mechanism | |
| DE2045052A1 (en) | System for identifying multi-task situations and controlling the execution of these tasks | |
| DE2222855A1 (en) | Rail transport system for selection information and data | |
| DE4033336A1 (en) | METHOD FOR GENERATING A FAILURE MESSAGE AND MECHANISM FOR FAILURE MESSAGE | |
| DE102004054571B4 (en) | Method for distributing computing time in a computer system | |
| DE19822543A1 (en) | Order allocation method, data processing system, client data processing node and computer readable storage medium | |
| DE68920028T2 (en) | Method and device for multiple access with cyclical reservation in a communication system. | |
| DE3689991T2 (en) | Distributed data management mechanism. | |
| DE69908911T2 (en) | ASSIGNMENT DEVICE FOR A DATA SWITCHING SYSTEM | |
| DE4341877A1 (en) | Coordination to access multiple processors to common resource |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 8139 | Disposal/non-payment of the annual fee |