How does a single-engine upper stage, like that of Falcon 9, do ullage control before starting the engine? Does it fire its cold gas thrusters? Does it fire the engine at minimum throttle for a second before going full throttle---if this even makes sense to do? Some other way? Or does it just not do ullage control?
If the upper stage is fired promptly after first-stage shutdown, it's possible that no ullage is needed at all. The thrust from the first stage engines settles the upper stage propellants. Any separation impulse between the stages tends to keep them settled, and there isn't enough time for any of the ullage gas to drift to the engine inlets before the upper stage fires. Solid-fueled rockets on the upper stage are sometimes used for the dual purpose of separating the stages and providing ullage force (e.g. Saturn V S-II stage).
For upper stage ullage after a coast, though, the situation is different. An ullage burn of some kind will be needed in most cases. Usually this is done with a separate RCS thruster system using bladder pressurization. For small pressure-fed engines, if the ullage volume is low enough, the ullage burn can be skipped; if pressurant goes into the combustion chamber instead of propellant, it still provides a small amount of thrust, which provides ullage for the rest of the burn -- the first one or two burns of the Apollo CSM engine was normally done this way. Turbopumps can't risk ingesting significant volumes of pressurant gas, however.
I assume Falcon 9 uses the RCS thrusters on the upper stage.
Ullage for the Apollo command/service module and the lunar module was performed by those reaction control system engines which pointed in the same direction (+X) as the main engine. These engines are essentially digital in nature; they are either off or on. Some control modes allowed the RCS engines to be pulsed for finer control. However, ullage burns always turned the RCS engines fully on, without pulsing.
Most engine burns were controlled by programs on the guidance computer. Part of the parameters were the number of seconds for ullage burn, and whether 2 versus 4 RCS engines should be fired for the ullage burn. For example, prior to LM descent, two RCS engines were fired for 7.5 seconds, and the main engine was ignited when 0.5 second of ullage burn remained.
This was always done when the main engines were started in microgravity (i.e. no need to do it on the surface of the moon).
Ullage burns could also be performed manually. This was done by pressing the
DIRECT ULLAGE button in the CM, or the
+X TRANSL button in the LM. The backup procedure was to use the pilot's translational control stick to thrust in the +X direction. In any case, the RCS engines burned as long as the pilot held down the appropriate button.
The upper stages of the Saturn booster used solid rocket engines for ullage burns. Once lit, they fired until they burned out.