Find the answer to your Linux question:
Results 1 to 6 of 6
Understanding linux kernel book states that kernel itself is not a process but a process manager. Is it so? Kernel is a program under execution. That is nothing but a ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    4

    Question Kernel is not a process?

    Understanding linux kernel book states that kernel itself is not a process but a process manager. Is it so? Kernel is a program under execution. That is nothing but a process right? Or is it just a collection of kernel threads?

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    In Linux, a "process" is defined as anything that's running that isn't the kernel. So the kernel isn't a process by definition. Of course, if you choose to define a process as any executing program, you get a different outcome, but why use a terminology that doesn't match everyone else's?
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    The way I tend to think of it is that the kernel is the environment in which processes execute. In this model, the kernel isn't a process, but exactly as you say, it manages everybody else and provides them with resources.

    However, from the perspective of the CPU, then the kernel is just like anybody else who needs registers, memory, etc.
    DISTRO=Arch
    Registered Linux User #388732

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    The problem here is pure terminology.

    A "process" is not just a running program, but, more concretely: it is a well defined structure in your memory. That structure, amongst many other things, contains the live copy of the program. It's not that simple, but I don't want to get too technical (not that I have the knowledge nowadays either).

    Also by definition, processes are managed by the kernel, just like mem, cpu and i/o resources, and that's why the kernel can't be one, by definition. When the kernel loads there's no kernel that can create such an structure like a linux process.

    Officially, the first process, and the parent of the rest of processes, is always "init".

    Since we are in linux, we should stick the the linux definition for the word "proccess" and in that case, the kernel is not such a thing.

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    The following is just a clarification of the meanings of the technical terms "parent" and "ancestor".
    Officially, the first process, and the parent of the rest of processes, is always "init".
    Almost. Each process has only one parent. If you take a given process (call it "fred"), and look at its parent, and look at that process's parent, and look at that process's parent, you'll eventually get to the init process (process 1).

    All the process you have looked at in this exercise (except fred itself, obviously) are ancestors of fred.

    It would be more accurate to say:
    Officially, the first process, and an ancestor of the rest of processes, is always "init".
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    True. Thanks for the correction

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...