Category : C++ Source Code
Archive   : C_ALL.ZIP
Filename : TI1002.ASC

 
Output of file : TI1002.ASC contained in archive : C_ALL.ZIP







PRODUCT : Paradox Engine NUMBER : 1002
VERSION : All
OS : All
DATE : October 21, 1992 PAGE : 1/1

TITLE : Lock File Contention




Lock file contention is caused when many users attempt to
use a single table at the same time in a tight and repetitive
loop. When the Engine opens a table, it attempts to place a PFL
(Prevent Full Lock) on the table. To do this, the Engine must
access the table's lock file. The Engine detects a Lock by
opening the lock file and scanning it from beginning to end.
Each entry in the lock file is checked for potential conflicts
with the lock that the Engine is attempting to place.

A problem arises when the lock count for a table drops to
zero. When the count reaches zero, the Engine deletes the lock
file for the table. However, under MS-DOS, in order to delete a
file, the file must be closed. So the Engine closes the table's
lock file and then attemps to delete the file. However, another
user can (re)open the file in the meantime ( i.e. after our user
closes the lock file but before the file can be deleted ). Thus,
our user is on hold waiting for the file to be closed before the
deletion can succeed. If the lock file is not closed for a long
time, the user is effectively locked up and unable to do
anything. To avoid the stalled situation, tables should not be
opened and closed in a tight loop.

Under Windows, the Paradox Engine optimizes the locking
necessary between applications running in different windows but
sharing the same DLL. If two or more such applications share the
same table, and the table is on the local disk (not stored on a
networked disk), the lock files are kept entirely in memory and
are never created on disk. If there is memory corruption, the
state of the locks might be disturbed. The problem should
disappear if the optimization is turned off by selecting "Share
Local Tables" in the configuration utility, PXEngCfg.EXE.


DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.














  3 Responses to “Category : C++ Source Code
Archive   : C_ALL.ZIP
Filename : TI1002.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/