  We use a set of twelve high-resolution N-body/hydrodynamical simulations in
the $\Lambda$CDM cosmology to investigate the origin and formation rate of
fossil groups (FGs), which are X-ray bright galaxy groups dominated by a large
elliptical galaxy, with the second brightest galaxy being at least two
magnitudes fainter. The simulations invoke star formation, chemical evolution
with non-instantaneous recycling, metal dependent radiative cooling, strong
star burst driven galactic super winds, effects of a meta-galactic UV field and
full stellar population synthesis. We find an interesting correlation between
the magnitude gap between the first and second brightest galaxy and the
formation time of the group. It is found that FGs have assembled half of their
final dark matter mass already at $z\ga1$, and subsequently typically grow by
minor merging only, wheras non-FGs on average form later. The early assembly of
FGs leaves sufficient time for galaxies of $L \sim L_*$ to merge into the
central one by dynamical friction, resulting in the large magnitude gap at
$z=0$. A fraction of 33$\pm$16% of the groups simulated are found to be fossil,
whereas the observational estimate is $\sim$10-20%. The FGs are found to be
X-ray over-luminous relative to non-FGs of the same optical luminosity, in
qualitative agreement with observations. Finally, from a dynamical friction
analysis is found that only because infall of $L \sim L_*$ galaxies happens
along filaments with small impact parameters do FGs exist at all.
