Machine-translated by Google. Questions are authored in English.
Top

Discussion

The principal difference between a page and a segment is that

  • A.a page is a fixed-size physical division while a segment is a variable-size logical one
  • B.a page is always larger than a segment
  • C.segments are stored only on disk
  • D.pages cannot be shared between processes

Answer: A

Correct answer: a page is a fixed-size physical division while a segment is a variable-size logical one

A page is a fixed-size division imposed by the system with no regard to program structure; a segment is a variable-size division corresponding to a logical unit of the program - code, data, stack, a procedure, an array. Everything else follows from that. Paging is invisible to the programmer, since the division is arbitrary; segmentation reflects the programmer’s own view. Paging suffers internal fragmentation and none external; segmentation suffers external and none internal. A paged address is one number split into page and offset; a segmented address is genuinely two-dimensional, a segment number and an offset. Segmentation makes protection and sharing natural, since a whole segment can be marked read-only and a shared library is one segment mapped into several processes. Paging can share too - the fourth option is wrong - but a page has no logical meaning, so the unit is arbitrary. Many real architectures combine both, dividing a program into segments and then paging each segment.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.