How? The Devshirme, a program in which they kidnapped Christian boys, converted them to Islam, and raised them either to be part of an elite military fighting force called the Janissaries, or to be government bureaucrats. Incidentally, which of those gigs would you prefer? Because I think that says a lot about you as a person. Either way, you weren't allowed to have kids, which prevented the whole hereditary nobles problem, and also ensured that the Ottoman government would contain quite a lot of eunuchs. Oh, it's time for the open letter? An open letter to Ottoman eunuchs.