3i Infotech Papers: Sample Questions 167 - 168 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 167

» Operating System » Unix

Essay Question▾

Describe in Detail

What is the main goal of the Memory Management?

Explanation

Understanding of memory management

Understanding of Memory Management

Understanding of memory management

Memory Management:

  • Decides the process, which should reside in the main memory.

  • Manages parts of the virtual address space of a process which are non-core resident.

  • Monitors the available main memory and periodically writes the processes into the swap device so that processes fit in the main memory.

Here are some important points on memory management:

  • Unix is machine independent so its memory management scheme varies from one system to another.

  • Early versions of UNIX used variable partitioning with no virtual memory scheme.

  • Process is either in the memory or on the disk.

  • The process is likely to swapped if it is idle, has been in main memory a long time or is large.

  • A process is likely to be swapped in completely if it has been swapped out a long time, or it is small.

Question number: 168

» Operating System » Unix

Essay Question▾

Describe in Detail

How does kernel handle the copy on write bit of a page, when the bit is set?

Explanation

Define copy on write

Define Copy on Write

Define copy on write

  • In situations where the copy on write bit of a page is set and that page is shared by more than one process, the kernel allocates new page and copies the content to the new page. The other processes retain their references to the old page.

  • Then kernel decrements the reference count of the old pfdata table entry.

  • Where the copy on write bit is set and no processes are sharing the page, the kernel allows the physical page to be reused by the processes.

  • By doing so, it clears the copy on write bit and disassociates the page from its disk copy, because other process share the disk copy.

  • Then it removes the pfdata table entry from the page-queue as the new copy of the page is not on the swap device.

  • It decrements the swap-use count for the page and if count drops to 0, frees the swap space.