Electronic Drive Locking

The LOCK command will be generated by the protect mode FSD or cache as soon their buffers are dirty. The lock request can also be issued by real mode cache programs when their buffers are dirty. A lock request can also come from a MS-DOS-based or Windows-based applications.

The volume-tracking layer will only send the first LOCK command to the hardware but it will keep a depth counter for all the LOCK requests. Volume tracking layer will issue an UNLOCK command to the hardware when the LOCK count goes to zero. Volume tracking layer will wait for a predefined time before issuing the unlock to avoid excessive lock/unlock requests to the hardware.

The volume tracking layer will also hook MS-DOS Lock and UnLock IOCtl calls and INT 13 LOCK and UNLOCK requests to properly increase or decrease the LOCK depth counter.