What is Opportunist locking?

John Savill

September 29, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. With Exclusive Oplock, if a file is opened in a non-exclusive (denynone) mode, the redirector requests an opportunistic lock of the entire file. Aslong 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 allowthe redirector to perform read-ahead, write-behind, and lock caching, as long asno other process tries to open the file.

When a second process attempts to open the file, the original owner will beasked to Break Oplock or Break to Level II Oplock. At that point, the redirectormust invalidate cached data, flush writes and locks, and release the oplock, orclose the file.

Opportunistic Locking level II, provides a method for granting read access to afile by more than one workstation, and these workstations can cache read datalocally (read-ahead). As long as no station writes to the file, multiplestations can have the file open with level II oplock.

For more information see http://support.microsoft.com/support/kb/articles/Q129/2/02.asphas LOADS of information about tuning both the server and workstation.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like