Thousands of Iraqi security personnel launched an operation aimed at retaking areas north of Baghdad from the Islamic State jihadist group, officials said.