Utilizing NDR effect to reduce switching threshold variations in memristive devices