Dosage compensation is a mechanism by means of which the activity of X-linked or Z-linked genes is made equal in the two sexes of organisms with an XX compared to XY or ZZ compared to ZW basis of sex determination. In mammals, compensation is achieved by the inactivation of one X chromosome in somatic cells of females. In Drosophila, compensation does not involve inactivation. The two X chromosomes in females as well as the single X in males are regulated, and individual genes are thought to respond independently to the regulatory mechanism. It is proposed that in both groups of organisms the evolution of heteromorphic sex chromosomes was gradual and occurred as the direct result of the evolution of dosage compensation rather than the reverse.