home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progc
/
c_all592.arj
/
TI1002.ASC
< prev
next >
Wrap
Text File
|
1992-04-29
|
2KB
|
67 lines
PRODUCT : Paradox Engine NUMBER : 1002
VERSION : All
OS : All
DATE : April 29, 1992 PAGE : 1/1
TITLE : Lock File Contention
Lock file contention is caused by many users attempting to use
the same table at the same time in a tight, 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 file lock by
opening the lock file and scanning it from beginning to end.
Each entry in the lock file is checked for potential conflict
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 issues a delete command to DOS. However, another user
can open the file in the interval between closing of the file and
the issuance of the delete command. Thus, the first user is
stuck on hold waiting for the file to close before the delete can
occur. If the file doesn't close for a long time, that user is
effectively locked up and unable to do anything.
Under Windows, the Paradox Engine tries to optimize the locking
necessary between applications running in different windows
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
never see the 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.