1. A computer-implemented method comprising: conducting a runtime analysis of a multi-threaded execution environment including a first thread and a second thread; identifying a context-based lock condition based on the runtime analysis and a threshold, wherein the threshold includes at least one of a wait time threshold and an occurrence threshold, and the context-based lock condition includes a lock redundancy component and an execution context component; detecting a request issued by the first thread to acquire a lock held by the second thread, wherein the lock is associated with a shared resource in the multi-threaded execution environment; denying the request if both the lock redundancy component and the execution context component are satisfied to permit access to the shared resource by the first thread without acquiring any lock for the shared resource; and granting the request if both the lock redundancy component and the execution context component are not satisfied.