WS 2001/2002 Mehrbenutzerzugriff auf GIS-Daten

Slides:



Advertisements
Ähnliche Präsentationen
Mehrbenutzersynchronisation
Advertisements

Punkt-in-Polygon-Verfahren III (R/R+-Baum)
10.2 Wechselseitiger Ausschluss in Hardware
Transaktionsverwaltung
Transaktionsverwaltung
B-Bäume.
Systeme 1 Kapitel 7 Deadlocks WS 2009/10.
FH-Hof Deadlocks Richard Göbel. FH-Hof Deadlock - Definition Menge von Prozessen ist an einem Deadlock beteiligt: wenn jeder Prozess in dieser Menge auf.
Baumstrukturen Richard Göbel.
WS Algorithmentheorie 05 - Treaps Prof. Dr. Th. Ottmann.
Transaktionen in verteilten Datenbanken
Prof. Dr. T. Kudraß1 Concurrency Control. Prof. Dr. T. Kudraß2 Korrektheitskriterium: Serialisierbarkeit Zwei Schedules sind konfliktäquivalent wenn gilt:
R-tree, R*-tree und R+-tree
Übung zum R-Baum, Gegeben ist die dargestellte Menge von Rechtecken, die in der Reihenfolge 1, 7, 9, 13, 3, 5, 11, 6, 8, 10, 4, 14, 12, 2 eingegeben.
Institut für Kartographie und Geoinformation Diskrete Mathematik I Vorlesung Bäume-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung In welcher Masche liegt der Punkt p?
Minimum Spanning Tree: MST
Kapitel 13: Mehrbenutzersynchronisation
Synchronisation paralleler Transaktionen AIFB SS Synchronisationsverfahren 4.4 Synchronisationsverfahren (1/18) Sperrmodi und Sperrobjekte Sperrprotokoll.
4.4.2 Sperrverfahren (9/18) Regeln für das Setzen von Sperren
7.1 Externes Suchen Bisherige Algorithmen: geeignet, wenn alle Daten im Hauptspeicher. Große Datenmengen: oft auf externen Speichermedien, z.B. Festplatte.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation I Vorlesung 14 WS 2000/2001 Gerhard Gröger ArcToolbox - Konvertierung.
Geoinformation I Vorlesung 8 WS 2000/2001 Graphen.
Geoinformation II Vorlesung 4 SS 2001 Voronoi-Diagramme.
Diskrete Mathematik II
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 7 SS 2000 Punkt-in-Polygon-Verfahren I (Trapezkarte)
Mehrbenutzersynchronisation
WS 2007/08 Datenbanksysteme Mi 17:00 – 18:30 R Vorlesung #12 Mehrbenutzersynchronisation.
WS 2004/2005 Datenbanken II - 5W Mi 17:00 – 18:30 G 3.18 Vorlesung #7 Mehrbenutzersynchronisation (Teil 1)
WS 2009/10 Datenbanksysteme Fr 15:15 – 16:45 R Vorlesung #12 Mehrbenutzersynchronisation.
Transaktion Huang Zhenhao FU Shuai.
Thread Synchronisation in JAVA
Vorlesung Binärer Suchbaum II-
Vorlesung #12 Mehrbenutzersynchronisation
Datenbanksysteme Technische Grundlagen Transaktions-Konzept, Mehrbenutzer-Synchronisation, Fehlerbehandlung Prof. Dr. Manfred Gruber FH München.
Übung: Transaktionale Systeme (Zusammenfassung der Vorlesungsinhalte)
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation III Vorlesung 1 WS 2001/02 Punkt-in-Landkarte I (Streifenkarte)
Mehrbenutzerzugriff auf GIS-Daten
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung 6 SS 2001 Segmentschnitt III.
Mehrbenutzersynchronisation
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung Mai 2000 Konstruktion des Voronoi-Diagramms.
Synchronisation paralleler Transaktionen  AIFB SS Sperrverfahren Sperrverfahren (13/18) Behandlung von Konflikten bei der Sperrvergabe.
Synchronisation paralleler Transaktionen  AIFB SS Serialisierbarkeitsprinzip 4.3 Serialisierbarkeitsprinzip (2/13) Im folgenden wird ein vereinfachtes.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Foliendesign: Jörg Steinrücken & Tobias Kahn Vorlesung
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung der Algorithmus von Floyd Foliendesign:
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung April 2000 AVL-Bäume.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung Datenstrukturen für den Algorithmus von.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II Vorlesung 4 WS 01/02 Quadtrees.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik I Vorlesung Binärer Suchbaum III- -AVL-Baum-
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Diskrete Mathematik II Vorlesung der Algorithmus von Floyd.
WS 2013/14 Datenbanksysteme Do 17:00 – 18:30 R Vorlesung #12 Mehrbenutzersynchronisation.
Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation II 6. Sem. Vorlesung 4 4. Mai 2000 Voronoi-Diagramm.
© 2008 TravelTainment The Amadeus Leisure Group Thread-Programmierung im Qt-Framework Von: Simon Lubberich Erstbetreuer:
Übung Datenbanksysteme I Transaktionen, Selektivität, XML
Verwalten von Daten mit Hilfe von NTFS
Wie das Finanzamt auf unsere s zugreift
6.3 Verteilte Transaktionen
Seminar im Fach Geoinformation IV
Hello World! Javakurs 2013 Arne Kappen
Übung Datenbanksysteme I Besprechung
Lösung der Aufgabe 1: Die Erweiterung des Diagramms auf „Winged Egde“ besteht in zwei Beziehungen, nr-Kante und vl-Kante, zwischen der Klasse Kante. Jede.
Revisionssichere Informationsverarbeitung
Diskrete Mathematik II
Das Problem des Handlungsreisenden
Non-Standard-Datenbanken
Punkt-in-Landkarte II
Graphen.
Arten von Kontrollstrukturen
Kap. 12 R-Bäume GB B31 B245 Box 1: Box 2: Box 3: Box 4: Box 5:
2.4 Durchlaufen von Bäumen
 Präsentation transkript:

WS 2001/2002 Mehrbenutzerzugriff auf GIS-Daten Institut für Kartographie und Geoinformation Prof. Dr. Lutz Plümer Geoinformation III Vorlesung 5 WS 2001/2002 Mehrbenutzerzugriff auf GIS-Daten

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 Szenario Geodatenserver mehrere Benutzer Transaktionen T Anfragen, Methoden, Programme Items „A“ Variable, Tupel, Relation, Objekt Modi Lesen (an und für sich unproblematisch) Schreiben Erforderlich: Synchronisation Protokolle Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 Problemfall Programm (P) : Read A; Write A; A:=A+1; A in Datenbank 5 5 5 5 6 6 T1: Read A A:=A+1 Write A T2: Read A A:=A+1 Write A A im Arbeitsspeicher T1 5 5 6 6 6 6 A im Arbeitsspeicher T2 5 5 6 6 5 + 1 + 1 =/= 6 ! Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lösung: Sperren (Lock und Unlock) Lock A; Read A; A:=A+1; Write A; Unlock A Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Problem: Gegenseitige Blockade („Deadlock“) Lock B; Unlock A; Unlock B; T 2: Lock B; Lock A; Unlock B; Unlock A; Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Vermeidung von Deadlocks: Protokolle des Laufzeitsystems: alle Ressourcen werden auf einmal angefordert und gleichzeitig gewährt (falls nicht alle Ressourcen verfügbar, kommt der Prozess in die Warteschlange) die Ressourcen unterliegen einer linearen Ordnung, und bei der Bedarfsanmeldung wird diese Reihenfolge eingehalten Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Aber wie steuert man Nebenläufigkeit? Read A; A:=A-10; Write A; Read B; B:=B+10; Write B; T 2: Read B; B:=B-20; Write B; Read C; C:=C+20; Write C; wird erst T1 ganz und dann T2 ganz ausgeführt, heisst diese Reihenfolge seriell Problem: welche Überlappung ist zulässig? eine Reihenfolge heisst serialisierbar, wenn sie einer seriellen Reihenfolge äquivalent ist wie erkennt man Serialisierbarkeit? Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 Beispiele T 1 T 2 T 1 T 2 T 1 T 2 Read A Read A Read A A:=A-10 Read B A:=A-10 Write A A:=A-10 Read B Read B B:=B-20 Write A B:=B+10 Write A B:=B-20 Write B Write B Read B Read B Read B Write B B:=B-20 Read C B:=B+10 B:=B+10 Read C Write B Read C C:=C+20 Write B C:=C+20 Write B C:=C+20 Write C Write C Write C seriell serialisierbar nicht serialisierbar Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Prüfung auf Serialisierbarkeit (a posteriori) Algorithmus: Input: Output: Methode: Eine verzahnte Ausführung von Transformationen T1,...,Tk Prüfung der Serialisierbarkeit. Konstruiere einen Graphen mit den Knoten a1, a2, ... an wobei jedes ai eine der beiden folgenden Formen hat: Tj: Lock Am oder Tj: Unlock Am Wenn ein Lock Am auf einen Unlock Am folgt, werden diese beiden Knoten miteinander verbunden. Die Reihenfolge ist serialisierbar, wenn der entstandene Graph azyklisch ist; eine serielle Reihenfolge kann durch eine geeignete Durchlaufstrategie ermittelt werden. Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Serialisierbarkeit a priori durch Zwei-Phasen-Protokoll in jeder Transaktion T gehen alle Sperrungen (Locks) den Freigaben (Unlocks) voraus Vorteil: leicht zu überprüfen Nachteil: ev. großräumige Sperrung T2: Lock A; Lock B; Unlock A; Unlock B; Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 Beispiel T2: Lock A; Lock B; Unlock A; Unlock B; Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 Nicht serialisierbar . Lock A . Unlock A Lock A Lock B Unlock A Unlock B Lock B . Unlock B . T1 T2 Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 Verfeinerungen differenziere zwischen Read und Write-Locks berücksichtige hierarchische Strukturen Aggregierte Objekte B-Bäume Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Baum-Protokoll 1 (knoten-orientiert) Lock eines Knotens setzt Verfügung (Lock) über den Vaterknoten voraus Ausnahme: 1. Lock einer Transaktion Kein Knoten wird durch die gleiche Transaktion mehrmals gesperrt A B C G F E D Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Baum-Protokoll 1 (knoten-orientiert) (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Lock D Lock B Unlock B Lock A Lock C Lock E Unlock D Lock F Unlock A Unlock C Unlock E Lock G Unlock F Unlock G A B C G F E D A A B B B B C C D D E E E E F F G G T1 T2 T3 Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Teilbaum-orientiert) Anwendungsbeispiel: B-Baum 3 Modi: Warn, Lock und Unlock Die Transaktion T beginnt mit der Warnung der Wurzel des Baumes Sperrung eines Knotens setzt Warnung des Vaterknotens voraus ein Knoten kann nur entsperrt oder entwarnt werden, nachdem alle Sperrungen / Warnungen auf Kinder entfernt wurden 2-Phasen-Protokoll: alle Warnungen und Sperrungen gehen allen Freigaben voraus Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01 B C G F E D Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Beispiel) Warn B Warn A Lock D Lock C Unlock D Warn C T3 (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Unlock B Unlock A Unlock C Lock B Lock F Unlock F A B C G F E D C C D D Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Beispiel) Warn B Warn A Lock D Lock C Unlock D Warn C T3 (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Unlock B Unlock A Unlock C Lock B Lock F Unlock F A B C G F E D Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Beispiel) Warn B Warn A Lock D Lock C Unlock D Warn C T3 (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Unlock B Unlock A Unlock C Lock B Lock F Unlock F A B C G F E D B F Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Beispiel) Warn B Warn A Lock D Lock C Unlock D Warn C T3 (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Unlock B Unlock A Unlock C Lock B Lock F Unlock F A B C G F E D B B F F Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Beispiel) Warn B Warn A Lock D Lock C Unlock D Warn C T3 (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Unlock B Unlock A Unlock C Lock B Lock F Unlock F A B C G F E D B B F F Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01

Warn-Protokoll (Beispiel) Warn B Warn A Lock D Lock C Unlock D Warn C T3 (1) (2) (4) (3) (9) (8) (5) (10) (6) (7) (12) (11) (14) (13) (16) (15) (18) (17) Unlock B Unlock A Unlock C Lock B Lock F Unlock F A B C G F E D B B F F Lutz Plümer - Geoinformation III - WS 01/02 - Vorlesung 5 - 19.11.01