When maintaining a constant speed on the highway whether up, down or flat the engine still has the same RPM (assuming the incline is shallow enough not to require a gear change) - common sense would suggest that less fuel should be required to maintain the engine speed on a flat as opposed to an incline. Is there a mechanism in the vehicle that takes care of this, or is that what the driver is doing as they adjust there foot in response to feedback from the speedometer?
If you have cruise control switched on, then the electronics will monitor the vehicle speed and will adjust the amount of fuel/air into the engine to adjust engine output, in so doing keeping the speed fairly constant. If cruise control is switched off, then the driver has to do this job manually by slightly altering pressure on the gas pedal.
You are correct that less fuel will be required when moving at a constant speed on a level surface than on an positive incline. When going down a negative incline, engine power may not be required at all and the gas pedal may need to be released to use engine braking to slow the vehicle down.
Cruise control basically has 2 components. It watches the vehicle's Speed Distance Sensor (SDS) to determine the vehicle speed. It then uses a servo connected to the throttle to open/close the throttle. On older vehicles, it is remotely mounted with its own throttle cable On newer cars with drive by wire, its the throttle motor.
When you set the speed for your cruise control, it records the average speed from the SDS. It then sets the throttle to maintain speed. It will constantly change the throttle setting to attempt to achieve the lowest possible required throttle while still maintaining the same speed. If it detects the speed has dropped, it will apply more throttle until the vehicle is accelerating. If it detects the speed has increased it will apply less throttle until the vehicle is decelerating. Once it has reached its target speed again, it will try to set the lowest possible required throttle again.
BTW - the speed is not measure in MPH, it is measured in the 'pulse width' of the amount of time it takes the SDS gear to spin 1 revolution. This is measured in milliseconds. Changes in speed that will go unnoticed to the driver can be detected though the ECU.
Part B: As for fuel per RPM... There are many things that determine how much fuel is spent at any given RPM. Engine size, number of valves, size of valves, intake setup, throttle position, air temperature, humidity, etc. The biggest changing factor on a given engine at a given RPM is the throttle position.
The sensors that determine how much fuel is needed are typically: Cam or Crank sensor for RPM Manifold Absolute Pressure or Mass Air Flow sensor to determine air/load Throttle position sensor - used to give an extra bit of fuel when you snap the throttle. Usually makes adjustments at WOT. Oxygen sensor - makes adjustments based on what the engine puts out coolant temperature sensor - riches mixture when cold
Crank/Cam and MAP/MAF are your main 2, the others make fine tuned adjustments