  We study the formation of globular clusters (GCs) in a Milky Way-size galaxy
using a high-resolution cosmological simulation. The clusters in our model form
in the dense cores of supergiant molecular clouds in the gaseous disks of
high-redshift galaxies. The properties of clusters are estimated using a
physically-motivated subgrid model of the isothermal cloud collapse. The first
clusters in the simulation form at z ~ 12, while we conjecture that the best
conditions for GC formation appear to be at z ~ 3-5. Most clusters form in the
progenitor galaxies of the virial mass >10^9 Msun and the total mass of the
cluster population is strongly correlated with the mass of its host galaxy with
a fraction ~2x10^-4 of the galactic baryons being in the form of GCs. In
addition, the mass of the GC population and the maximum cluster mass in a given
region strongly correlate with the local average star formation rate. We find
that the mass, size, and metallicity distributions of the cluster population
identified in the simulation are remarkably similar to the corresponding
distributions of the Milky Way globulars. We find no clear mass-metallicity or
age-metallicity correlations for the old clusters. The zero-age cluster mass
function can be approximated by a power-law, dN/dM ~ M^-alpha, with alpha ~ 2,
in agreement with the mass function of young stellar clusters in starbursting
galaxies. However, the shape of the zero-age mass function may be better
described by the high-mass tail of a lognormal distribution which peaks at
~10^3 Msun. We discuss in detail the origin, universality, and dynamical
evolution of the globular cluster mass function. Our results indicate that
globular clusters with properties similar to those of observed clusters can
form naturally within young dense gaseous disks at z >~ 3 in the LCDM
cosmology.
