  Based on recent X-ray observations of the Milky Way, Magellanic Clouds and
nearby starburst galaxies we study population of high mass X-ray binaries,
their connection with ultra-luminous X-ray sources and relation to the star
formation. Although more subtle SFR dependent effects are likely to exist, the
data in the lg(Lx)~36-40.5 luminosity range are broadly consistent with
existence of a ``universal'' luminosity function of HMXBs, which can be roughly
described as a power law with differential slope of ~1.6 and a cutoff at
lg(Lx)~40.5. The ULX sources found in many starburst galaxies occupy the high
luminosity end of this single slope power law distribution, whereas its low
luminosity part is composed of ``ordinary'' high mass X-ray binaries, observed,
e.g. in the Milky Way and Magellanic Clouds.
  As the normalization of the ``universal'' luminosity function is proportional
to the star formation rate, the number and/or the collective X-ray luminosity
of HMXBs can be used to measure the current value of SFR in the host galaxy.
Distant (unresolved) starburst galaxies observed by Chandra at redshifts of
z~0.2-1.3 obey the same Lx-SFR relation as local galaxies, indicating that the
ULXs at these redshifts were not significantly more luminous than those found
in nearby galaxies.
