3i Infotech Placement: Sample Questions 145 - 146 of 1245

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

Question 145


Describe in Detail


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


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.

Question 146


Write in Short

Short Answer▾

Does a class inherit the constructors of it՚s super class?


  • No constructor of the superclass is not inherited.
  • Access to super class parameterized constructors is done through use of super keyword.
  • Constructors are special functions in that are not inherited by the subclass.
  • One of the main reasons is to prevent overriding of superclass constructors, which would be possible if they were inherited.
  • Overriding the superclasses constructor would erode encapsulation in the language.

Developed by: