Virtual Memory : Demand Segmentation

In this scheme, CPU allocates memory in segments. A process is partitioned in the form of segment. At any given moment of time only those segment of process are kept in memory which required current execution and not all the segment. The information regarding each segment such as size of segment, its location and status is kept in the form of table.


During the execution, if CPU demands a segment, the hardware checks, in the table the valid bit corresponding to segment. If segment is not in memory then a segment fault occurs. Then we have to swap our a segment to disk. To implement this scheme the hardware requirement is often less than the Demand paging.


The advantages of Demand Segmentation are :
  1. It simplifies the handling of growing data structures.
  2. It allows programs to be altered and recompiled independently.
  3. It tends itself to sharing among processes. A programmer can place a utility program or a useful table of data in a segment that can be referenced by other processes.
  4. It tends itself to protection.





Next Topic :

No comments:

Post a Comment