1
$\begingroup$

I checked wikipedia PCB and its written that -

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.

My question why not keep it in the process's memory itself? During context switching OS can just copy the data by seeing the process. A process is normally protected because other processes can only access the data present within their own process memory.

$\endgroup$
  • 2
    $\begingroup$ The operating system is protecting the PCB from that process, not from other processes. The operating system does not trust any of the processes. $\endgroup$ – Derek Elkins Jul 22 '18 at 8:08
  • $\begingroup$ Oh right, that didn't cross my mind..!! $\endgroup$ – shiwang Jul 22 '18 at 8:15

Your Answer

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

Browse other questions tagged or ask your own question.