Scenario: Suppose a DLL file was loaded by a process P1 at time T0, 25 seconds l
ID: 3619597 • Letter: S
Question
Scenario:Suppose a DLL file was loaded by a process P1 at time T0, 25 seconds later another process P2 linked the same (instance of) DLL file (while this instance of DLL was already loaded and linked with P1), After 45 seconds of P1 still another process P3 linked the same (instance of) DLL. Now after this, the Process P1 (that first time loaded DLL) has completed its task and wants to unload the DLL.
Question:
Now what will happen, i.e. either DLL file will be unloaded or NOT?, Give reasons for your answer, and also specify that what will happen to P2 and P3 (which are still using this instance) in case, the DLL is unloaded.
Explanation / Answer
The code in a DLL is usually shared among all the processes that use the DLL; that is, they occupy a single place in physical memory, and do not take up space in the page file. If the physical memory occupied by a code section is to be reclaimed, its contents are discarded, and later reloaded directly from the DLL file as necessary. In this case it will not be unloaded as it is claim by P2 and P3. If it is unloaded, it will again loaded when P2 and P3 will use this dll functions.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.