Provide exclusive access to a resource using lock file.