- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-4-21 08:35:56
Distributed Lock Manager (DLM)
The DLM is an integral part of OPS and the RAC stack. As mentioned, earlier Oracle versions relied on OS vendors to provide this component, which coordinated resources globally and kept the system in sync. Data consistency and integrity are maintained by this layer in all versions of Oracle OPS from 7 to 10g. Any reference to DLM from Oracle 8/8i onward pertains to the Integrated DLM (IDLM), which was introduced with Oracle 8 and integrated into the Oracle OPS kernel. The terms DLM and IDLM are used to describe a single entity and are one and the same.
In versions prior to version 8, the DLM API module had to rely on external OS routines to check the status of a lock (since DLM functions were provided by the OS vendor). This communication was done using UNIX sockets and pipes. With IDLM, the required data is in the SGA of each instance and requires only a serialized lookup using latches and/or enqueues (see the next section) and may require global coordination, the algorithm for which was built into Oracle kernel code.
With OPS 8i, the IDLM has undergone significant development and stabilization. IDLM holds an inventory of all the locks and global enqueues that are held by all the instances in the OPS database. Its job is to track every lock granted to a resource. The coordination of requests from various instances for lock acquisition and release is done by the DLM. The memory structures required by DLM to operate are allocated out of the shared pool. The lock resources, messages buffers, and so on are all in the shared pool of each instance. DLM is designed such that it can survive node failures in all but one node of the cluster.
The DLM is always aware of the current holders or requestors of locks and the grantee. In case locks are not available, the DLM queues the lock requests and informs the requestor when a lock resource becomes available. Some of the resources that the DLM manages are data blocks and rollback segments. Oracle resources are associated with the DLM locks by instance, using a complex hashing algorithm. The lock and enqueue functionality in OPS is the same as in a single instance RDBMS server, except that OPS takes a global view.
DLM relies on the core RDBMS kernel for locking and enqueues services. These established and already proven techniques and
oracle 8/8i之前 DLM 依赖于 OS vendor, 版本8之后才被加入到 oracle kennel中
This is the Lock Manager Daemon. Prior to Oracle8 when DLM was external to Oracle this process was part of the DLM and did not start as Oracle background process.
This process performs most of the lock management functions and is the master of the DLM.
在 8之前 LMD Lock Manager Daemon是 DLM的一部分。
In Oracle 8i, the DLM is implemented by two background processes, Lock Manager Daemon (LMD) and Lock Monitor (LMON) (see Figure 2-5). Each instance has its own set of these two processes. The DLM database stores information on resources, locks, and processes. In Oracle 9i, the DLM has been renamed Global Cache Services (GCS) and Global Enqueue Services (GES). While some of the code has changed, the basic functionality of GES and GCS remain the same as the prior versions of DLM.
8i 开始 DLM 通过2个后台进程实现 即 LMD和 LMON
从9i开始 DLM 被更名为 Global Cache Services (GCS) 和Global Enqueue Services (GES).
|
|