When a city has excess food it pushes it toward cities that have less. The longer the supply line the slower the transfer rate.
Is the search for needy cities done in any particular order? E.g. absolute distance, number of hops, etc? For example, if a staging area on the frontier is demanding a lot of food, will a city clear across the map push to it, perhaps at the expense of a nearer but less needy city? Does a given city send all of its excess to a single needy city, or is there some sort of proportion system?
I realise that you probably have more important things to do and I ask really only out of interest, since I haven't yet managed to run seriously low on food anywhere. ("Yet" being the operative term. Population to build units is another story, but I suspect I'm over-garrisoning and not knocking down enough walls. Having been surprised by the AI on a number of occasions, I'm a little paranoid now.... :-)