Nice video about using an RPi with linux and managing a stepper. My 2 cents, you are better off using a real RTOS as from the list below.
http://www.isy.liu.se/edu/kurs/TSEA81/lecture_linux_realtime.html
http://en.wikipedia.org/wiki/List_of_real-time_operating_systems