Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / gsg_txn / C / multithread-intro.html
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 xmlns="" class="navheader">
16       <div class="libver">
17         <p>Library Version 11.2.5.3</p>
18       </div>
19       <table width="100%" summary="Navigation header">
20         <tr>
21           <th colspan="3" align="center">Multi-threaded 
22         <span xmlns="http://www.w3.org/1999/xhtml">and Multi-process</span>
23         Applications</th>
24         </tr>
25         <tr>
26           <td width="20%" align="left"><a accesskey="p" href="apireq.html">Prev</a> </td>
27           <th width="60%" align="center">Chapter 1. Introduction</th>
28           <td width="20%" align="right"> <a accesskey="n" href="recovery-intro.html">Next</a></td>
29         </tr>
30       </table>
31       <hr />
32     </div>
33     <div class="sect1" lang="en" xml:lang="en">
34       <div class="titlepage">
35         <div>
36           <div>
37             <h2 class="title" style="clear: both"><a id="multithread-intro"></a>Multi-threaded 
38         <span>and Multi-process</span>
39         Applications</h2>
40           </div>
41         </div>
42       </div>
43       <p>
44             DB is designed to support multi-threaded  <span>and
45             multi-process</span> applications, but their usage means
46             you must pay careful attention to issues of concurrency.
47             Transactions help your application's concurrency by providing various levels of
48             isolation for your threads of control. In addition, DB
49             provides mechanisms that allow you to detect and respond to
50             deadlocks. 
51         </p>
52       <p>
53             <span class="emphasis"><em>Isolation</em></span> means that database modifications made by
54             one transaction will not normally be seen by readers from another
55             transaction until the first commits its changes.  Different threads 
56             use different transaction handles, so
57             this mechanism is normally used to provide isolation between
58             database operations performed by different threads.
59         </p>
60       <p>
61             Note that DB supports different isolation levels. For example,
62             you can configure your application to see uncommitted reads, which means
63             that one transaction can see data that has been modified but not yet
64             committed by another transaction. Doing this might mean your
65             transaction reads data "dirtied" by another transaction, 
66             but which subsequently might change before that
67             other transaction commits its changes.
68             On the other hand, lowering your isolation
69             requirements means that your application can experience
70             improved throughput due to reduced lock contention.
71         </p>
72       <p>
73             For more information on concurrency, on managing isolation
74             levels, and on deadlock detection, see <a class="xref" href="txnconcurrency.html" title="Chapter 4. Concurrency">Concurrency</a>.
75         </p>
76     </div>
77     <div class="navfooter">
78       <hr />
79       <table width="100%" summary="Navigation footer">
80         <tr>
81           <td width="40%" align="left"><a accesskey="p" href="apireq.html">Prev</a> </td>
82           <td width="20%" align="center">
83             <a accesskey="u" href="introduction.html">Up</a>
84           </td>
85           <td width="40%" align="right"> <a accesskey="n" href="recovery-intro.html">Next</a></td>
86         </tr>
87         <tr>
88           <td width="40%" align="left" valign="top">Application Requirements </td>
89           <td width="20%" align="center">
90             <a accesskey="h" href="index.html">Home</a>
91           </td>
92           <td width="40%" align="right" valign="top"> Recoverability</td>
93         </tr>
94       </table>
95     </div>
96   </body>
97 </html>