I'd think that dosing of specific amounts of fluids is achieved by valves, with separate inlets for each component. The tubes never should become empty, because the exchange of remaining fluid by air, entering from the outlet, can not normally be controlled. Once the desired amount of fluid has been pumped out, the valve is closed or closes itself (nonreturn valve), preventing further liquid dropping out of the tube.
Details depend on the type of pump you're using. Rotary pumps can be stopped at almost every angle, others only after every dose step.