i have a windows service written in .net 4 which doing jobs periodically using Threads. the server has more than 20 cpu core.
i create 10 threads in my windows service.
The OS already does precisely that for you. It doesn't guarantee that each thread will stay on the same core forever (and in nearly all cases, there's no need for that either), but it does try to keep as many cores busy as possible. Which means giving all available threads their own core as much as possible.