A theoretical model of ionization and ion extraction in hot cavity ion sources is presented. The model enables the calculation of the total ionization efficiency in the hot cavity, as well as to study changes in the number of ions and neutral particles inside the cavity. A general formula describing the evolution of the system is derived -which could be especially useful for fast numerical calculations. Examples of calculation results are presented and discussed, showing that high ionization efficiencies (significantly exceeding the predictions of the Saha-Langmuir formula) can be achieved especially for small extraction openings. An alternative (to the ion and neutral numbers) description of the system has been proposed in terms of the total number of particles and the difference between the neutrals and the ions, which in some cases makes understanding the dynamics of the system much easier. The possibilities of the model are illustrated considering four special cases: closed cavity, cold cavity, and the cases of weak extraction and super-efficient extraction ("each ion" mode). The theoretical formulae enabling total ionization efficiency for the two latter cases are derived in the paper, and their predictions are compared to the results of numerical calculations.