Formal Models of Concurrency and Communication: Based On The Slides of Gottfried Vossen, Univ. of Münster, Germany
Formal Models of Concurrency and Communication: Based On The Slides of Gottfried Vossen, Univ. of Münster, Germany
and communication
based on the slides of Gottfried Vossen,
Univ. of Münster, Germany
Formal models of concurrency and
communication
• Introduction. Concurrent Models
• Concurrency control: serialization, complexity, control,
conflicts, algorithms
• Concurrency control for the object model
• Concurrency control in relational databases
• Failure & Recovery modeling: recovery in page, object and
multimedia model
• Distributed concurrency control
• CCS (Calculus of Communication Systems) models for
concurrent processes
• Pi-Calculus models for concurrent processes
Part I: Introduction. Concurrent Models
time
shared data
very good clarity, correctness, low good clarity & correctness, high
performance performance
Producer-consumer scenario
Producer Consumer
Read(x);
Read(x); x--;
x++; Write(x);
Write(x); …
…. Read(x);
Read(x); x--;
x++; Write(x);
Write(x); …
…
Stored
Data
(Pages)
System Federations
Users
Clients ...
Application
Servers
...
Data
Servers
...
Introduction
• Performance:
high throughput (committed transactions per second)
short response time
• Reliability:
(almost) never lose data despite failures
• Availability:
very short downtime
almost continuous, 24x7, service
Introduction
Root Node
Bob Eve Tom
B+-tree
Leaf Nodes
RIDs
Projection
Projection
Filtering
RID Access
Index Scan Index Scan Fetch Person Index Scan Fetch Person
on AgeIndex on CityIndex Record on CityIndex Record
Introduction
• Server obligations:
▪ Concurrency control
▪ Recovery
2. Computational Models
• 2.1 Ingredients
• 2.2 Page Model
• 2.3 Object Model
Reminder: Database System Layers
Ingredients
• Elementary operations
• Transactions (i.e., transaction program executions)
• Histories and schedules
• Characterization of correct schedules
• Protocols (i.e., rules for online algorithms)
2. Computational Models
• 2.1 Ingredients
• 2.2 Page Model
• 2.3 Object Model
Math concepts (partial and total order
relations)
Definition (Partial Order): Let A be an arbitrary set. A
relation R A x A is a partial order on A if the following
conditions hold for all elements a, b, c A:
1. (a, a) R
(reflexivity)
2. (a, b) R and (b, a) R a=b (antisymmetry)
3. (a, b) R and (b, c) R (a, b) R
(transitivity)
• 2.2 Ingredients
• 2.3 Page Model
• 2.4 Object Model
Object Model
Definition (Object Model Transaction):
A transaction t is a (finite) tree of labeled nodes with
• the transaction identifier as the label of the root node,
• the names and parameters of invoked operations as labels of
inner nodes, and
• page-model read/write operations as labels of leaf nodes,
along with a partial order < on the leaf nodes such that
for all leaf-node operations p and q with p of the form w(x)
and q of the form r(x) or w(x) or vice versa, we have p<q q<p
t1
r (r) r (l) r (p) r (q) r (f) r (p) w (p) r (r) r (l) w (l)
Example: Business Objects
t2
^
Search (...) Fetch (x) ^ Fetch (a) Fetch (d) Store (e) Modify (d) Modify (a) ^
Search (...) Fetch (y) ^
Modify (x) Modify (y)
r (r) r (l) r (p) r (p) w (p) r (s) r (t) r (t) w (t) r (t) w (t) r (s)w (s) r (r) r (l) r (q) r (q) w (q)