1. A computer-implemented method comprising: conducting a runtime analysis of a multi-threaded execution environment; 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 to acquire a lock 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; and granting the request if both the lock redundancy component and the execution context component are not satisfied.