<P> In computer science, a lock or mutex (from mutual exclusion) is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution . A lock is designed to enforce a mutual exclusion concurrency control policy . </P> <P> Generally, locks are advisory locks, where each thread cooperates by acquiring the lock before accessing the corresponding data . Some systems also implement mandatory locks, where attempting unauthorized access to a locked resource will force an exception in the entity attempting to make the access . </P>

When do we use lock in data processing
find me the text answering this question