Article ID: 129202 - Last Review: December 5, 2003 - Revision: 3.0 PC Ext: Explanation of Opportunistic Locking on Windows NTThis article was previously published under Q129202 On This PageSUMMARY
With Exclusive Oplock, if a file is opened in a non-exclusive (deny none)
mode, the redirector requests an opportunistic lock of the entire file. As
long as no other process has the file open, the server will grant this
oplock, giving the redirector exclusive access to the specified file. This
will allow the redirector to perform read-ahead, write-behind, and lock
caching, as long as no other process tries to open the file. When a second process attempts to open the file, the original owner will be asked to Break Oplock or Break to Level II Oplock. At that point, the redirector must invalidate cached data, flush writes and locks, and release the oplock, or close the file. Opportunistic Locking level II, provides a method for granting read access to a file by more than one workstation, and these workstations can cache read data locally (read-ahead). As long as no station writes to the file, multiple stations can have the file open with level II oplock. MORE INFORMATION
An illustration of how level II oplocks work:
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk. Workstation Service Entries\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet \Services\LanmanWorkstation\Parameters UseOpportunisticLocking REG_DWORD 0 or 1 Default: 1 (true) Server Service Entries\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet \Services\LanmanServer\Parameters EnableOplocks REG_DWORD 0 or 1 Default: 1 (true) MinLinkThroughput REG_DWORD 0 to infinite bytes per second Default: 0 MaxLinkDelay REG_DWORD 0 to 100,000 seconds Default: 60 OplockBreakWait REG_DWORD 10 to 180 seconds Default: 35 APPLIES TO
| Article Translations
|
Back to the top
