There is a RATED RPM which is the rpm level the engine mfgr. states you can pull full or maximum hp. That's what you see in your brochures,
X hp @ Y rpm. That point is also the point the propellor should be sized for and allow the engine to reach when the boat is FULLY LOADED with EVERYTHING and EVERYONE. Not that it is ok to run at that rpm for very long for pleasurecraft ratings. There are ratings that will allow that but then the final hp allowed and usually the final rpm is lower than that commonly offered for pleasurecraft. At that point the engine will be pulling full fuel and making full hp if the propellor is correct.
If not then you are either overpropped or underpropped. Overpropping can be a serious problem, causing engine damage, if not handled correctly and carefully.
There is also HIGH IDLE or WOT, NO LOAD [out of gear] This is the point the mfgr. sets the governor for to stop any further rpm increase. At this point very little fuel is actually used. This HIGH IDLE rpm is always somewhat higher than the RATED, often 200-300 rpm. This is tested for with a fully up to running temperature engine and then only for long enough for the governor to stabilize the rpms, get the reading and then back off, usually on the order of a few seconds. There is no damage done to the engine and this test is normal and for diesels necessary to check governor operation. All engine mfgrs publish this spec. although it may or may not be in the manuals you get unless you purchase beyond the usual owners manual. SOmetimes it is actually stamped right on the ID plate.
There is also DROOP. That is the difference between the HIGH IDLE and the RATED. When the governor is approaching the HIGH IDLE it actually starts to defuel the engine. If the two were set at the same point the engine would never reach max hp since the governor would need to be defueling before it actually reached RATED to be able to stop further rpm increase at RATED.
As Eric pointed out with out doing these two tests plus a few other checks you will usually not know if you are under or overpropped.
Art
you are correct about your gas engines but they have no governor. The closest you would come is a revlimiter as I used to know them in race cars. Those things would start cutting the spark when a predetermined rpm was reached to avoid blowing the engine. If a high power shift was missed , before those limiters, you almost guaranteed you would be redoing/replacing the engine. I've seen that happen and in boats too when someone panicked and put the gear in neutral when the throttle was set for cruise speed. Usually a response to seeing a log right in front of you resulting in an extra hole in the block, wrong lever.
A diesel governor won't allow that to happen even with a sudden unloading. Of course the real reason is to stop overevving, whether from accident or intention.