memory-managementoperating-systemvirtual-memorydynamic-loadingdemand-paging

Difference between dynamic loading and demand paging


I think the differences are:

But I think there are more differences which I missed, Any help is much appreciated!

Also this is my first question, so go easy on me:)


Solution

  • Comparing dynamic loading with demand paging is like comparing driving a car with using a Content Management System. You can argue they both can help you be more efficient and get things done faster, but that is it in terms of similarities between the two.

    Dynamic loading is the mechanism by which a program loads at runtime another binary (a library is considered a binary). Demand paging is an optimization technique used in virtual memory management to load pages in memory only when need (usually on a page fault).

    They serve different purposes. Dynamic loading is often used for implementing a plugin system. Demand paging is just an optimization technique. They are used by different systems at different levels. One by user applications at the application level, the other by the OS, very close to the hardware, at the Virtual Memory level. They load two different things. One a binary, the other a virtual page. They use different strategies for when to load. One on explicit request, one on page fault. They use different implementation mechanisms.

    Sure, you can say both use the principle of lazy loading, but this principle is applied to two different things, in two different ways to serve two different purposes.

    Ultimately they are just two fundamentally different things.