Unit 5 - Part 2 Notes
Unit 5 - Part 2 Notes
Unit 5 - Part 2 Notes
S.N
O Internal fragmentation External fragmentation
It occurs in worst fit memory It occurs in best fit and first fit
8. allocation method. memory allocation method.
It is faster in comparison to
4. Segmentation is slow.
segmentation.
The size of the page needs always There is no constraint on the size of
15.
be equal to the size of frames. segments.
In demand paging, the operating system loads only the necessary pages of a
program into memory at runtime, instead of loading the entire program into
memory at the start.
A page fault occurred when the program needed to access a page that is not
currently in memory. The operating system then loads the required pages from the
disk into memory and updates the page tables accordingly. This process is
transparent to the running program and it continues to run as if the page had always
been in memory.
So in the Demand Paging technique, there are some benefits that provide efficiency
of the operating system.
Efficient use of physical memory: Query paging allows for more efficient use
because only the necessary pages are loaded into memory at any given time.
Support for larger programs: Programs can be larger than the physical memory
available on the system because only the necessary pages will be loaded into
memory.
Faster program start: Because only part of a program is initially loaded into
memory, programs can start faster than if the entire program were loaded at once.
Reduce memory usage: Query paging can help reduce the amount of memory a
program needs, which can improve system performance by reducing the amount of
disk I/O required.
Drawbacks of the Demand Paging
Page Fault Overload: The process of swapping pages between memory and disk
can cause a performance overhead, especially if the program frequently accesses
pages that are not currently in memory.