process 0 ("swapper")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I see that the idle process (process 0) , is called "swapper".


init_idle() in kernel/sched/core.c:
...
#if defined(CONFIG_SMP)
	sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu);
#endif
...
#define INIT_TASK_COMM "swapper" in include/linux/init_task.h

Two questions:
1) why does this  #if defined(CONFIG_SMP) here ? shouldn't we name
   it swapper also in non SMP mode ?

2) Is there a reason that we do not see it with ps aux  (and also not
under proc; there is no /proc/0).
   - 1) no process 0; processes start from "1".
   - 2)  following command gives nothing:
        ps aux | grep  -i swapper


rgs,
Kevin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux