Unlike your gas car engine. The old mechanically injected Perkins
by engine RPM
In newer injected gas engines the air is measured for volume, temp and density. This is then put in an algorithm to adjust the fuel
amount. Then it's burnt, The O2 sensor sniffs the exhaust
to confirm and adjust the mixture.
In a mechanically injected diesel. The fuel is controlled by the governor. The governor is adjusted by the rotational speed of the crankshaft*. As load increases the engine can't make enough power to maintain that RPM
. The crank then slows down. This causes the gov to increase the fuel to the engine. Causing the power output and RPM to go back up
*=For the fact checkers, yes the gov can be on the cam. I'm trying for the simplest explanation.