Discussion
Segmentation differs from paging in that
Answer: D
Correct answer: segments are variable in size and correspond to logical divisions of a program
Segmentation divides a program along its logical lines - code, data, stack, individual procedures, arrays - so segments vary in size. Paging divides memory into fixed-size blocks with no regard to program structure. A segmented address is a pair: a segment number and an offset within it. The segment table gives a base address and a limit, and the hardware checks the offset against the limit - which is how a segmentation fault is detected. The trade-off follows from the sizes. Because segments are variable, segmentation suffers external fragmentation but no internal; because pages are fixed, paging suffers internal but no external. Segmentation’s advantage is that protection and sharing are natural: a whole segment can be marked read-only or execute-only, and a shared library becomes one segment mapped into several processes. Paging cannot express that as cleanly, since a page has no logical meaning. Many systems combine the two, paging each segment.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development