Operating System [3i Infotech Placement]: Sample Questions 52 - 53 of 81

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 52

Question MCQ▾

In the process table entry for the kernel process, the process id value is

Choices

Choice (4)

a.

2

b.

255

c.

1

d.

0

Edit

Answer

d.

Explanation

Understanding of Process Table
  • The most important UNIX data structure is the process table, which stores information about all currently running processes including memory layout of the process, current execution point, open file descriptors, etc.
  • A process on Unix is created by executing the fork system call.
  • Process executing fork becomes parent process and the created process becomes the child processes.
  • A process can thus have many children but only one parent.
  • Kernel identifies every process by a unique identifier called the process ID or PID.
  • Process is created without using this system call and all other processes are created using the fork system call.
  • Thus in the process table entry for the kernel process, the process id value is .

Question 53

Write in Short Short Answer▾

What are the events done by the kernel after a process is being swapped out from the main memory?

Edit

Explanation

When kernel swaps the process out of the primary memory, it performs:

  • Reference count of each region of the process.
  • If the reference count becomes zero, swaps the region out the main memory.
  • For the swapped process kernel allocates the space in the swap device.
  • Kernel locks the other swapping process during current swapping operation.
  • Kernel saves the swap address of the region in the region table.