Basic CS-Operating System [TCS Placement]: Sample Questions 33 - 34 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 33

Operating System
Edit

Write in Short

Short Answer▾

what are demand-paging and pre-paging?

Explanation

Table of Demand-Paging and Pre-Paging
Demand-pagingPre-paging
With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution.
  • Pre-paging, pages other than the one demanded by a page fault are brought in.
  • The selection of such pages is done based on common access patterns, especially for secondary memory devices.
Pages swapped in on demandPages swapped in before use in anticipation.
More page faults (especially initially) .Reduce future page faults.
No wastage of page frames.Pages may not be used (wastage of memory space) .
No such overheadGood strategies to pre-page (working set, contiguous pages, etc …) .
demand-paging-the transfer of page from secondary memory toprimary memory at the moment of need.pre-paging-the retrieval of a page other then demanded by apage fault. the hope is that the additional page will beneeded in near future.

Question 34

Operating System
Edit

Describe in Detail

Essay▾

What is thrashing?

Explanation

  • It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions, due to an inordinate number of page faults.
  • Thrashing in computing is an issue caused when virtual memory is in use.
  • It occurs when the virtual memory of a computer is rapidly exchanging data for data on hard disk, to the exclusion of most application-level processing.
  • As the main memory gets filled, additional pages need to be swapped in and out of virtual memory.
  • The swapping causes a very high rate of hard disk access.
  • Thrashing can continue for a long duration until the underlying issue is addressed.
  • Thrashing can potentially result in total collapse of the hard drive of the computer.
  • Thrashing is also known as disk thrashing.
Given the Image is Define the Trashing

Developed by: