In semiconductors, we should consider holes and electrons at the same time while in metal we just need to consider electrons.

Holes are fictious but a vacant state of electron. Still, we describe all the formulations presuming that there is a postive carrier (instead of vacant electron state).

Then, we should consider the Fermi-energy level (Ef) in different ways to metal. In metal, Ef is simply the highest energy of electons being filled at 0 T. But at non-zero T, thermally activated carrier occupation changes such simple shape. And Ef corresponds to that level which has probability with 1/2. There should be a state with 1/2 probability instead. Then, conduction band (CB) edge is empty; then, with 0 probability. So, the 1/2 probability point should be in the middle of CB edge and VB edge.

You can also think of ficitous probabilty for holes in equilibrium. Holes are fully filled from the highest to the conduction band edge. And there is no hole state in VB in equilibrium. This is exactly oppostite propability of electrons. Still we should describe the probability distribution to match "0" at VB edge and 1 and CB edge. And the middle point with 1/2 probability becomes the norminal Ef for holes.

The Ef is the concept used for probability function in semiconductor. It doesn't mean that electron states itself but it's a probability for a electron to be filled. And Ef is an adjusting parameter for the F-D function. They are related with thermally excited No. of electrons in conduction band, described in ch. 3. In this case, middle of band gap matches well with Ef again at low temperature. Low temperature implies there is no electrons in CB.

More exactly, Ef = { ( Ec+Ev)/2} + (3/4) kT log (Mh / Me) , with k Boltzmann constant, Mh hole effective mass, and Me electron effective mass.

If we assume Me = Mh the second term vanishes giving same result Ef =( Ec+Ev )/2 .