According to Wikipedia and many other sources,

Since PCB contains the critical information for the process, it must be kept in an area of memory protected from normal user access. In some operating systems the PCB is placed in the beginning of the kernel stack of the process since that is a convenient protected location.

It makes a lot of sense: when a switch occurs, the current context has to be saved somewhere and a (kernel) stack looks a good place to do that. However, Tanenbaum states that

To implement the process model, the operating system maintains a table (an array of structures), called the process table, with one entry per process . (Some authors call these entries process control blocks.)

Later, Tanenbaum mention that the process context is saved onto a stack. Clearly, the process table and the stack are different beasts and now I am confused: what is the relationship between the stack and the process table?


Tanenbaum is just saying that there are two common ways of storing information about a process. How a particular OS chooses to do that — on some kernel stack or in a table/array — is just one of the myriad freedoms available to the OS designer.

The OS designer doesn't even have to call them process control blocks.

  • Hum, so the conceptual issue I was trying to spot actually was a language issue. Perhaps that "process table" is an array of handlers, in the same fashion the processes queues (ready, blocked, etc) are implemented? I mean, logically a queue is a set of PCBs pointing to each other as in a linked list, but its physical implementation is likely to resemble an array of handlers to those PCBs. Probably, this "process table" is implemented the same way? – Humberto Fioravante Ferro Apr 8 '17 at 2:14
  • @HumbertoFioravanteFerro: Point me at a particular bit of code, and I can tell you whether we're talking about an array, or a queue, or a linked list or whatever. Give me prose instead and I can't tell you how a "table" is implemented. It could be any of those things or none of them. – Warren Young Apr 8 '17 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.