Procedure and routine are closer than algorithm and routine. (I consider them identical and use them interchangably.) If routine is a synonym of algorithm, I think procedure is just as good. Neither word is exactly the same as algorithm, though both are very close.