Announcement

Collapse
No announcement yet.

Where is pid been stored?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Where is pid been stored?

    Hello.. this seems stupid question. This is about Linux in general. We know every process in Linux has identification which we call "PID" (Process Identification). I have been asked, where does Linux store the list of PIDs. I mean it must know such PID is such process. Does it save in some files, or maybe it save on memory. Can somebody answer me? Thanks before
    P4 3.06 HT,RAM 512 MB, 80GB HD, Geforce 6200 LE, Kubuntu 8.04

    #2
    Re: Where is pid been stored?

    I think I get it just now.
    It should store at /proc
    if I see the directory at /proc ,there are folders that contain numbers. Those numbers are pids. Seems like it should be from there the 'top' or 'ps' got the pid...
    P4 3.06 HT,RAM 512 MB, 80GB HD, Geforce 6200 LE, Kubuntu 8.04

    Comment


      #3
      Re: Where is pid been stored?

      "stored" is probably not the right characterization for this. PIDs are established in real time by the kernel, as each process is initiated, and they live in memory for as long as they are running. They are not saved anywhere, AFAIK. Shut down the system and they are gone forever. Next boot you get new PIDs.

      Comment

      Working...
      X