1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Multi-threaded and Multi-process Applications</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Getting Started with Berkeley DB Transaction Processing" />
10    <link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
11    <link rel="prev" href="apireq.html" title="Application Requirements" />
12    <link rel="next" href="recovery-intro.html" title="Recoverability" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Multi-threaded 
19        <span>and Multi-process</span>
20        Applications</th>
21        </tr>
22        <tr>
23          <td width="20%" align="left"><a accesskey="p" href="apireq.html">Prev</a> </td>
24          <th width="60%" align="center">Chapter 1. Introduction</th>
25          <td width="20%" align="right"> <a accesskey="n" href="recovery-intro.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="multithread-intro"></a>Multi-threaded 
35        <span>and Multi-process</span>
36        Applications</h2>
37          </div>
38        </div>
39      </div>
40      <p>
41            DB is designed to support multi-threaded  <span>and
42            multi-process</span> applications, but their usage means
43            you must pay careful attention to issues of concurrency.
44            Transactions help your application's concurrency by providing various levels of
45            isolation for your threads of control. In addition, DB
46            provides mechanisms that allow you to detect and respond to
47            deadlocks. 
48        </p>
49      <p>
50            <span class="emphasis"><em>Isolation</em></span> means that database modifications made by
51            one transaction will not normally be seen by readers from another
52            transaction until the first commits its changes.  Different threads 
53            use different transaction handles, so
54            this mechanism is normally used to provide isolation between
55            database operations performed by different threads.
56        </p>
57      <p>
58            Note that DB supports different isolation levels. For example,
59            you can configure your application to see uncommitted reads, which means
60            that one transaction can see data that has been modified but not yet
61            committed by another transaction. Doing this might mean your
62            transaction reads data "dirtied" by another transaction, 
63            but which subsequently might change before that
64            other transaction commits its changes.
65            On the other hand, lowering your isolation
66            requirements means that your application can experience
67            improved throughput due to reduced lock contention.
68        </p>
69      <p>
70            For more information on concurrency, on managing isolation
71            levels, and on deadlock detection, see <a class="xref" href="txnconcurrency.html" title="Chapter 4. Concurrency">Concurrency</a>.
72        </p>
73    </div>
74    <div class="navfooter">
75      <hr />
76      <table width="100%" summary="Navigation footer">
77        <tr>
78          <td width="40%" align="left"><a accesskey="p" href="apireq.html">Prev</a> </td>
79          <td width="20%" align="center">
80            <a accesskey="u" href="introduction.html">Up</a>
81          </td>
82          <td width="40%" align="right"> <a accesskey="n" href="recovery-intro.html">Next</a></td>
83        </tr>
84        <tr>
85          <td width="40%" align="left" valign="top">Application Requirements </td>
86          <td width="20%" align="center">
87            <a accesskey="h" href="index.html">Home</a>
88          </td>
89          <td width="40%" align="right" valign="top"> Recoverability</td>
90        </tr>
91      </table>
92    </div>
93  </body>
94</html>
95