Materials design of new functional diluted magnetic semiconductors (DMSs) is presented based on first principles calculations. The stability of the ferromagnetic state in ZnO-, ZnS-, ZnSe-, ZnTe-, GaAs- and GaN-based DMSs is investigated systematically and it is suggested that V- or Cr-doped ZnO, ZnS, ZnSe and ZnTe are candidates for high-TC ferromagnetic DMSs. V-, Cr- or Mn-doped GaAs and GaN are also candidates for high-TC ferromagnets. It is also shown that Fe-, Co- or Ni-doped ZnO is ferromagnetic. In particular, the carrier-induced ferromagnetism in ZnO-based DMSs is investigated and it is found that their magnetic states are controllable by changing the carrier density. The origin of the ferromagnetism in the DMSs is also discussed.