GATE - 1998 | OS | The overlay tree for a program is as shown below:

GATE - 1998 | OS | The overlay tree for a program is as shown below:
Posted on 28-02-2022

GATE - 1998 [Operating System]

Question:

 The overlay tree for a program is as shown below:

Overlay Tree

What will be the size of the partition (in physical memory) required to load (and run)  this program?

A

12 KB

B

14 KB

C

10 KB

D

8 KB

   

Solution:

Option (B) is Correct.

To enable a process which is larger than the amount of memory allocated to it, we can use overlays.

The idea of overlays is to heap only those instructions and data that are needed at any given time.

When some instructions are needed, they are loaded into space occupied previously by instructions that are no longer needed.


For the above program, maximum memory will be required when running code portion present at leaves.


Maximum requirement
= MAX(12, 14, 10, 14)
= 14

 

Thank You

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh