This is completely undocumented so I thought I’d share.
Set app pool A in advanced settings, to have affinity True, and mask 255. It will use the first 8 processors. Confirm in task manager.
Set app pool B affinity True, and mask 65280. It will use processors 9-16. Works.