0
1.8kviews
What is segmentation?Explain it with example?
1 Answer
0
26views

Segmentation:

  1. Paging was invisible to the programmer and serves the purpose of providing the programmer with a larger address space, segmentation is usually visible to the programmer and is provided as a convenience for organizing programs and data and as a means for associating privilege and protection attributes with instructions and data. Segments basically contain many pages.
  2. Thus Segmentation allows the programmer to view memory as consisting of multiple address spaces or segments. Segments are of variable, indeed dynamic, size while pages were fixed size fragments. OS will assign programs and data to different segments. There may be a number of program segments for various types of programs as well as a number of data segments. Each segment may be assigned access and usage rights. Memory references consist of a (segment number, offset) form of address.
  3. The address translation mechanism when segmentation and paging is used with paging is shown in Figure 8.

enter image description here

  1. The virtual address is now composed of three parts: The higher order bits give the segment number, the bits after that give the page number and the bits after that give the offset.
  2. Thus an extra Segment table is used. This along with the page number is used to index the page table.
  3. The process after that is similar to the address translation mechanism when paging was used.
  4. Segmentation is optional and can be disabled.
Please log in to add an answer.