What is demand paging in an operating system?

What is demand paging in an operating system?

a) A method where pages are loaded into memory only when they are needed
b) A scheduling algorithm used to prioritize processes
c) A technique for allocating file system resources
d) A way to allocate CPU time to real-time processes

Answer:

a) A method where pages are loaded into memory only when they are needed

Explanation:

Demand paging is a memory management technique where pages are loaded into physical memory only when they are needed, rather than loading all pages of a process at the start. This reduces memory usage and allows for more efficient use of system resources.

When a page that is not currently in memory is accessed, a page fault occurs, and the operating system loads the required page from disk into memory. Demand paging is a key part of virtual memory systems, allowing processes to run with more memory than is physically available.

Demand paging improves system performance by reducing the initial load time for processes and conserving memory space for other processes or tasks.

Reference:

Operating System MCQ (Multiple Choice Questions)

Scroll to Top