Imx7d emmc 2-cpu core usage

I am using imx7d 1gb emmc yocto embedded Linux 3.0 version.
due to multiple threads and load sometimes i see htop shows CPU utilization upto 180%, I know there are two cores, Could you please explain more about both cores and how load is shared b/w them.

  1. if one cpu is 100% code execution automatically goes to 2nd core or is there any setting
  2. is it also possible if I can decide what piece of code should run in which core

Thank you

There are a lots of details documentation available Linux Symmetric multiprocessing (SMP) and its Linux support. For example this or this or this etc. Fill free to google more.

CPU process affinity can be set by taskset command. But you need to include schedutils to your Yocto build or install schedutils if you are using Debian container.

Inside your application you can set tread affinity by using sched_setaffinity() call.