Ensure proper locking for Parameter Server access