In the northern Iraqi city of Mosul, General David Petraeus, commander of the 101st Airborne, drew on his extensive knowledge of military history to improvise strategies he hoped would “secure and serve” the people of the city and thereby deny the insurgents popular support.