Subject | Re: [IB-Architect] Synchronisation between classic architecture server processes |
---|---|
Author | Ann Harrison |
Post date | 2000-03-23T23:22:14Z |
At 09:15 AM 3/24/00 +1100, Jan Mikkelsen wrote:
If there's no answer, after careful consideration, the blockee declares
the blocker dead.
it works.
LCK_database = 1, /* Root of lock tree */
LCK_relation, /* Individual relation lock */
LCK_bdb, /* Individual buffer block */
LCK_tra, /* Individual transaction lock */
LCK_rel_exist, /* Relation existence lock */
LCK_idx_exist, /* Index existence lock */
LCK_attachment, /* Attachment lock */
LCK_shadow, /* Lock to synchronize addition of shadows */
LCK_sweep, /* Sweep lock for single sweeper */
LCK_file_extend, /* Lock to synchronize file extension */
LCK_retaining, /* Youngest commit retaining transaction */
LCK_expression, /* Expression index caching mechanism */
LCK_record_locking, /* Lock on existence of record locking for this
database */
LCK_record, /* Record Lock */
LCK_prc_exist, /* Relation existence lock */
LCK_range_relation, /* Relation refresh range lock */
LCK_update_shadow /* shadow update sync lock*/
};
/* Shared Prot Shared Prot
none null Read Read Write Write Exclusive */
/* none */ 1, 1, 1, 1, 1, 1, 1,
/* null */ 1, 1, 1, 1, 1, 1, 1,
/* SR */ 1, 1, 1, 1, 1, 1, 0,
/* PR */ 1, 1, 1, 1, 0, 0, 0,
/* SW */ 1, 1, 1, 0, 1, 0, 0,
/* PW */ 1, 1, 1, 0, 0, 0, 0,
/* EX */ 1, 1, 0, 0, 0, 0, 0 };
Ann
>Presumably any server process connects to the shared memory and acquires andMore or less. When there's a block, the blockee signals the blocker.
>releases locks. Given that a server process can die at any time for any
>reason, how are locks for dead processes released?
>
>Off the top of my head, I can imagine a scheme where each server process
>records its process ID in the shared locking structure. If another server
>process gets contention on a particular lock, it checks to see whether the
>process is alive, and if not can clean up. Is that what happens?
If there's no answer, after careful consideration, the blockee declares
the blocker dead.
>I guess the server processes just communicate using a TCP circuit, and theNo, I don't think it's a TCP circuit... but I really don't remember how
>locking process is responsible for releasing the locks of processes that
>die.
it works.
>On lock types:enum lck_t {
>
>You've mentioned page locks, table locks and transaction locks. Presumably
>transaction locks are used for distinguishing between a dead and an in
>progress transaction.
>
>Other than these, what locks are there?
LCK_database = 1, /* Root of lock tree */
LCK_relation, /* Individual relation lock */
LCK_bdb, /* Individual buffer block */
LCK_tra, /* Individual transaction lock */
LCK_rel_exist, /* Relation existence lock */
LCK_idx_exist, /* Index existence lock */
LCK_attachment, /* Attachment lock */
LCK_shadow, /* Lock to synchronize addition of shadows */
LCK_sweep, /* Sweep lock for single sweeper */
LCK_file_extend, /* Lock to synchronize file extension */
LCK_retaining, /* Youngest commit retaining transaction */
LCK_expression, /* Expression index caching mechanism */
LCK_record_locking, /* Lock on existence of record locking for this
database */
LCK_record, /* Record Lock */
LCK_prc_exist, /* Relation existence lock */
LCK_range_relation, /* Relation refresh range lock */
LCK_update_shadow /* shadow update sync lock*/
};
>Are the only locking modes shared and exclusive?static CONST UCHAR compatibility[] = {
/* Shared Prot Shared Prot
none null Read Read Write Write Exclusive */
/* none */ 1, 1, 1, 1, 1, 1, 1,
/* null */ 1, 1, 1, 1, 1, 1, 1,
/* SR */ 1, 1, 1, 1, 1, 1, 0,
/* PR */ 1, 1, 1, 1, 0, 0, 0,
/* SW */ 1, 1, 1, 0, 1, 0, 0,
/* PW */ 1, 1, 1, 0, 0, 0, 0,
/* EX */ 1, 1, 0, 0, 0, 0, 0 };
>When can we get the source code, so we don't have to ask so many questions?You are an inspiration.
>:-)
Ann