First, I'd like to apologize for asking so many questions in one thread, but I assume it's okay because they're all based around a central topic, and thus presumably the answers are related.
Anyway, I've been reading about the Ottoman Empire back when the Barbary states could still get away with corsaring, and I get the distinct impression that a large portion of the Ottoman Navy was made up of pirates who happened to have a vague disposition in favor of the Ottoman Empire. They clearly were an important part of the Ottoman Navy, as you have pirates like Redbeard (I refuse to call him Barbarossa because Redbeard is an amazing pirate name and is what he deserves to be remembered as) who become an admiral in the Ottoman Navy. But how did the central government and its regular navy actually coordinate things with the corsairs? It's not like they could just mail every pirate in the empire and tell them "hey, group up with the Sultan's fleet so we can sink the Spanish navy," as pirates tend to move around a lot and don't really have fixed mailing addresses. Hell, what even made the pirates follow the Sultan's orders in the first place?
On top of that, was the differences in discipline between regular navy sailors and the pirates an issue? While I'm not sure how disciplined the sailors in the regular ottoman navy were, I assume they were more disciplined than actual, honest to god pirates. Were there any incidents of fights breaking out, either between sailors themselves or larger scale fights between warships because of this?
I'll try to answer your question, sorry if it doesn't satisfy you. You're right that it's impossible for the sultan to contact and dictate corsairs in the Barbary region and command them to do things. That's why, most of the time, the Barbary fleet that joined the Ottoman fleet weren't commanded by random reis or corsair captain, but the beylerbey/bey or governors of the North African Provinces. People such as Redbeard, Dragut (Turgut Reis) and Ochialli (Uluj Ali) were all beys (and at times even kapudan pasha themselves) who commanded their own fleet and can encourage or summon other pirate fleet to join their fleet and aid the Ottoman fleet under the Kapudan Pasha when requested. For example, in the siege of Malta, the main Ottoman fleet were also joined by the Egyptian Fleet of Uluj Ali and Corsairs from Tripoli under Turgut Reis and Algiers under Salah Reis.
However, it should be noted that these people, before becoming a beylerbey and started to actively aid the Ottoman fleet were themselves corsairs before, who for some reason or another aided or joined the Ottoman Empire. Redbeard brothers Khizr and Aruj Barbarossa were at first Turkish corsair raiding the Italian coast. While they had successes like capturing Algeria and Tunis, they started to get hammered down by Spanish and especially Genoese fleet under Andrea Doria to the point where the Spanish army landed on Algeria and captured Tlemcen. At that point, Khizr (the will-be famous redbeard. His brother died fighting off the Spanish in Tlemcen) submitted to the Ottomans, thus granting the Ottomans lordship over Algeria with Redbeard as the governor.
Turgut were also privateer who joined Redbeard's fleet and proved himself to be a successful corsair in the battle of Preveza to the point that Redbeard himself demanded the release Turgut when he was captured by the Genoese. After Redbeard's death Turgut were given a governorship of the island of Djerba, which was ravaged by Andrea Doria in retaliation of Turgut's raid and capture of Mahdia. Turgut barely escaped with what remained of his fleet, and cooperated with the Ottoman fleet under Sinan Pasha when naval conflict with the Habsburg started to brew again. After Sinan Pasha died of sickness, Turgut took over the fleet's command and captured Tripoli, earning him the governorship, and later on also granted the governorship of Algiers, replacing Redbeard's son Hassan Pasha. Afterwards he continued his achievements like defeating his nemesis Andrea Doria at Naples and Djerba, finally having his revenge.
was the differences in discipline between regular navy sailors and the pirates an issue?
Corsairs rarely, if not never manned the ships of the Ottoman fleet as they man their own ships. However, Ottoman troops and Janissaries were sent to augment their combat capabilities. These Janissaries were at first send to aid Redbeard in conquering Algeria, and later stayed to help maintain order, and to safeguard the regencies from internal or external threats. The beys know well of their combat capabilities and so provided them with high social status, comfortable barracks with slaves attending to their needs, good pay and good food. In return they had to fight, unquestioningly and unflinchingly. They had three principal duties, First was to take part in expeditions into the interior, to gather the annual tribute or to subdue unruly Berber or Bedouin tribes. Second was to garrison the cities and ports of the regencies, to serve their artillery and defend their walls, and generally to maintain the security of the state. This also involved ensuring the security of the regent himself (or at least, when the janissaries themselves were not involved in plotting a coup against him). And third, to serve at sea, and this was a popular assignment because not only did it mean they were actively fighting their Christian foes, but they also directly profited from a share of the plunder even if they received less share because they're already paid. Conflicts between the janissaries and corsairs themselves were rare, probably because the mean aboard fought the same enemy and for the same prospect of plunder, and because cruises by galiots and galleys were of reasonably short duration, often little more than two to three weeks
Sources:
The Barbary Corsairs by Angus Konstam
Lords of the Sea: A History of the Barbary Corsairs by Alan Jamieson