In my research I have found that if you want to use more than one cpu core, you have to interface with the kernel. As I understand it, this is to utilize its scheduler.
However, how does the kernel interface with the cpu cores to create this abstraction?
For example, if I was writing an OS from scratch, what code would I write to utilize multiple cpu cores?
I'm confused because AFAIK there is no assembly instruction to say 'all this code is will be executed on core 1, and all this code on core 2' etc.