If the kernel is spawned as threads and resides in the memory then how could the
ps command identify them if those are not normal process and i give you more look here:
root 2 0 0 févr.04 ? 00:00:00 [kthreadd] root 3 2 0 févr.04 ? 00:00:01 [ksoftirqd/0] root 5 2 0 févr.04 ? 00:00:00 [kworker/0:0H]
those kernel threads as we see has the same information as linux process children id, parent id (which is 0) and user owner (which is root)
Please explain this.
So if those threads are executed with different manner how could the CPU tell the difference between a kernel thread and linux process elf executable or library in the memory i need to know this please.
Another question: when the compiler builds the executable it creates a vma (virtual memory address) which is used then by the CPU to allocate memory space; how could the compiler generate those addresses?
Thank you guys.