All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Nobin Mathew <nobin.mathew@gmail.com>
Cc: Shivdas Gujare <shivdas.tech@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: init_task belongs to "process 0" or "process 1"?
Date: Tue, 05 Jan 2010 09:52:15 -0600	[thread overview]
Message-ID: <4B43602F.1050202@nortel.com> (raw)
In-Reply-To: <8d6898731001042332m6b5b97b0n5515ae166f62aad2@mail.gmail.com>

On 01/05/2010 01:32 AM, Nobin Mathew wrote:
> init_task is the head of doubly linked list which holds all
> task_structs in the system. init_task is again the task_struct for
> process 0/swapper/idle task. This process is created manually (I meant
> to say not by copy_process() calls). Manually means they are static
> structures defined in the code (see INIT_TASK, init_mm, init_fs etc).
> There will be multiple idle task if there is more than 1 cpu core.
> Idle task is the one which is scheduled if there is no other task
> ready for scheduling.
> 
> Init task is process 1 which is initially a kernel thread created from
> process 0 using copy_process(), then it does an execv() (/sbin/init )
> or similar one to create the normal process init.
> 
> Name given to process 0 is swapper.
> .comm           = "swapper"

Oddly enough, this name makes no sense anymore.  Why don't we call
process 0 "idle"?

Chris

  reply	other threads:[~2010-01-05 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04  8:07 init_task belongs to "process 0" or "process 1"? Shivdas Gujare
2010-01-05  7:32 ` Nobin Mathew
2010-01-05 15:52   ` Chris Friesen [this message]
2010-01-10 20:58   ` Leonidas .
2010-01-11 12:23     ` Nobin Mathew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B43602F.1050202@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nobin.mathew@gmail.com \
    --cc=shivdas.tech@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.