Fermi level is defined as the energy level where the probability of finding an electron is 50%. Why should Fermi levels of two metals/semiconductors in contact be the same? Why don't the energy levels where the probability of finding and electron is x% line up?
[Physics] Fermi levels be equal
semiconductor-physics
Related Solutions
I believe that the authors, of the reference you provided, explain the reason behind introducing these so-called quasi-Fermi levels at the end of section 4.3.3. For simplicity, let me just repeat it here; perhaps explaining it in different words, with a little more elaboration, would help. I’m sure you're aware of the fact that in $n$- ($p$-) doped semiconductors the Fermi level is closer to the conduction (valence) band as opposed to being close to the middle of the band gap. To be more mathematically precise, the Fermi level of $n$- ($E_{F,e}$) and $p$-doped ($E_{F,h}$) semiconductors is given by $$E_{F,e}=E_{F,i}+k_{B}T\ln\left(\frac{n}{n_{i}}\right)$$ and $$E_{F,h}=E_{F,i}-k_{B}T\ln\left(\frac{p}{n_{i}}\right)$$ respectively. The quantities $E_{F,i}$, $k_B$, $T$, and $n_i$ are the intrinsic Fermi level, Boltzmann constant, temperature, and intrinsic carrier concentration respectively. The quantities $n\approx N_{D}-N_{A}$ and $p\approx N_{A}-N_{D}$ where $N_A$ and $N_D$ are the acceptor and donor concentrations.
Now, when you have a steady light source irradiating your semiconductor sample, you create a large number (compared to thermal excitations) of Electron-Hole Pairs (EHPs). You could think of it as doping of the sample with equal number of electrons and holes; let us call this “photo-doping.” In this photo-doping picture it is much easier to think of two separate quasi-Fermi levels for electrons and holes. You can notice that the above two equations are nothing but a rearrangement of equation (4-15) from the reference you provided. The reason they are called “quasi”-Fermi levels is because the Fermi level is only defined in equilibrium. But in this particular case, steady-state could just be treated as a different type of equilibrium.
To answer your question as to why we don’t have two quasi-Fermi levels in equilibrium I would say: in principle you could define quasi-Fermi levels even when we have EHPs due to thermal excitations. However, the typical concentrations of thermally excited EHPs are so small that it can be incorporated into the broadening of the Fermi-Dirac distribution function. In the mathematical sense, you could also incorporate the case of photo-excitation (or photo-doping) into the broadening of the Fermi-Dirac distribution as well. But then you run into the physically counterintuitive problem of defining what temperature means. First of all, a sample irradiated with light is not under thermal equilibrium. Secondly, since temperature, in the conventional sense, is associated with thermal energy of the system, it makes sense to only incorporate thermally generated EHPs into the broadening of the Fermi-Dirac distribution.
In your particular example, we have an $n$-doped system. Consequently, the concentrations $n_0 = 10^{14}$ cm$^{-3}$ and $p_0 = 2.25 \times 10^{6}$ cm$^{-3}$ exist under thermal equilibrium. When (say) you shine light on it, we have $n \approx p = 2 \times 10^{13}$ cm$^{-3}$ due to photo-excitations. In this particular example, the quasi-Fermi level of electrons is not that far away from the Fermi level in equilibrium. The quasi-Fermi level of the holes, however, is significantly away from the Fermi level at equilibrium. This is a direct consequence of the fact that the concentration of minority carriers jumps by a large amount. Now, if we were to define separate Fermi-Dirac distribution functions for electrons and holes, under this steady-state condition, and we computed the respective Fermi-Dirac integrals using the density of states of the conduction and valence bands, then we would obtain the correct electrons and hole concentrations (i.e. $2 \times 10^{13}$ cm$^{-3}$). This is another way of justifying two separate quasi-Fermi levels.
It makes sense why the separation between the quasi-Fermi levels would be proportional to the rate of EHP generation due to photo-excitation. As a result, the separation between the quasi-Fermi levels, just as the authors say, is a measure of how much the system is out of equilibrium. So, in summary, I believe that the best way to get an intuition for quasi-Fermi levels is by considering the photo-doping picture. Although the authors don’t mention this explicitly, I have a hunch that the concept of quasi-Fermi levels was inspired from conventional doping (using donor or acceptor atoms).
This subject causes me confusion too (as well as frustration). Below is my understanding, but take it with a grain of salt because I may be wrong about it. I think that it basically comes down to how correctly you want to define the term "Fermi level" (and to a lesser extent, if you're a physicist or engineer).
Short answer: for engineering (and most practical) purposes, the Hyperphysics figure is wrong even tho it's right.
The spacing between the donor levels and the conduction band minimum is typically very small (typically order 50 meV --- compared to a typical bandgap of order 1000 meV), and that plot shows that any amount of doping (even the eleven atoms in the figure!) will force the Fermi level to be just a hair below the conduction band minimum, which would sound nuts to an engineer.
Strictly speaking, the Fermi level is only defined at absolute zero. So, you could argue (correctly) that the Fermi level has to be above the donor levels since the donor levels are occupied at zero temperature. (It takes thermal energy to ionize the dopants.) However, most people care about their semiconductors around room temperature, and many engineers[*] say "Fermi level" when they really should say "chemical potential". So, in many device physics contexts, "Fermi level" really means "chemical potential around room temperature". If that isn't an abuse of terms, I don't know what is.
So, check out the following plot (stolen from here):
What the plot calls $E_F$ (which is really the chemical potential) starts above the donor level and then drops down below it as the temperature is increased. What many people refer to as the "Fermi Level" is really that value of that curve around 300 K.
What's the moral of the story? People who confuse/abuse the terms "Fermi level" and "chemical potential" cause unnecessary confusion (and by extension, are horrible people). You do the world a service any time you correct someone who abuses the term "Fermi level".
EDIT: I should add that some seem to draw a distinction between "Fermi energy" (defined only at zero temperature) and "Fermi level" (meaning chemical potential). I don't think that this distinction improves anything. Both "Fermi energy" and "Fermi level" are invariably denoted as $E_F$, and IMHO, should mean the same thing. After all, all the other Fermi quantities (Fermi velocity, Fermi wavevector, etc.) are defined at zero temperature, so making Fermi level an exception is still unnecessarily confusing. We should just use an existing term (chemical potential) to make things clear. Rant over.
[*] And yes, some physicists too.
Best Answer
The Fermi level of a solid (metal, semiconductor, etc.) is synonymous to the total chemical potential of a body, which is a thermodynamic quantity but also plays a role in statistical physics as the reference energy of the Fermi-Dirac energy distribution. It is a thermodynamic law that upon contact of two systems the total chemical potentials align, so that the combined system has again one constant total chemical potential. This is similar to the temperatures of two systems equilibrating when brought into contact.