Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-09-2006, 06:30 PM   #1
LQ Newbie
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
Post Process Table-Process Control Block


My questions are about Process ID, Process Control Block (PCB), and Process Table (PT), and thread table

My old notes state that:

1- Each Process is allocated an identifier: Process ID (PID)
2- The PID indexes a process Table (PT)
3- Each process table entry contains a pointer to a relevant process ' PCB

However, the process table definition at [i am not allowed to paste the url since this my 1st post]

states instead that every process has an entry in the table. These entries are known as process control blocks.

So I am just wondering, are the process table entries pointers to the processes' PCB or rather the PCBs contents?

I think these entries include (among others) pointers to the PCBs considering the latter expected size.

A second question do we use any hashing to index the process table since the PIDs values seem not be allocated sequentially

Actually how PID values are allocated and how are they used to index the process table (and afterwards the PCBs)

at the end, i presume that each process pcb contains a pointer to the process thread table and that the thread table has more and less the same structure than the process table, exempt that PCB contents is different from Thread control block

Many thanks for your assistance
Old 01-09-2006, 09:14 PM   #2
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180
This is Linux! There are no secrets here! Have a peek at the Linux source-code in /usr/src/linux/kernel/pid.c and see for yourself!

It's probably more complicated than you expected ...

Logically speaking, a PID (process ID) is simply that: an identifier. Maybe in the earliest days it was some kind of physical index into a table, but I doubt it.

What the Linux system needs, and what pid.c provides, is:
  • PIDs are positive integers greater than 1; PID #1 is reserved. Other than that, the actual value is completely meaningless and arbitrary. Very large gaps in the numbering sequence are to be expected.
  • PID-values will not be re-used for a very long time. A value will never be reassigned if there are any "dangling" references to it, even if the process in question no longer exists.
  • No two simultaneously-existing processes will ever exist with the same PID.
  • New unique PIDs can be assigned almost-instantaneously, even on multiprocessor machines.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Features of the process struct table alltime Programming 2 10-23-2005 12:14 PM
Process control...? kleptophobiac Linux - General 2 09-25-2004 10:03 AM
Diassociating process from control terminal beginner16 Programming 0 01-18-2004 09:02 AM
Reading thread/process control block murali Linux - General 0 09-05-2002 05:44 AM
Regaining Process Control mikeyt_333 Linux - General 5 03-21-2002 02:21 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration