The Unix Operating System Kernel maintains two key data structures related to…

2016

The Unix Operating System Kernel maintains two key data structures related to processes, the process table and the user structure. Now, consider the following two statements :

I. The process table is resident all the time and contain information needed for all processes, even those that are not currently in memory.

II. The user structure is swapped or paged out when its associated process is not in memory, in order not to waste memory on information that is not needed.

Which of the following options is correct with reference to above statements ?

  1. A.

    Only (I) is correct.

  2. B.

    Only (II) is correct.

  3. C.

    Both (I) and (II) are correct.

  4. D.

    Both (I) and (II) are wrong.

Attempted by 642 students.

Show answer & explanation

Correct answer: C

Answer: Both statements are correct.

  • Statement I — The process table is resident all the time: The kernel keeps a process-table (process table) in memory to maintain bookkeeping information (process state, scheduling information, pointers to address space, etc.) for every process. This table must be available even for processes that are not currently loaded into physical memory so the kernel can manage them.

  • Statement II — The user structure can be swapped or paged out: The user structure (often called the u-area in traditional Unix) holds per-process kernel-mode state such as the kernel stack and process-specific kernel data. To avoid wasting physical memory on processes that are not resident, this per-process data may be swapped or paged out when the process is not in memory.

Summary: The process table remains resident for system-wide process management, while the user structure can be moved out of memory when its process is swapped to conserve kernel memory.

Explore the full course: Mppsc Assistant Professor