To give you an idea how it is done with more sophisticated systems is with the use of electronic gearing, where the servo axis is geared off of the relatively imprecise spindle encoder/axis.
AFAIK Linux has the ability to use a motion card, which may make it possible, the Galil cards I use can do it, the other alternative is the relatively imprecise 1pulse/rev method.
Al.