Practice mode Operating Systems

In segmentation, what happens if the offset in a logical address is greater than or equal to the segment’s limit?

Correct answer C. The hardware traps to the operating system with an addressing error

Explanation

Each segment-table entry holds a base and a limit. The hardware checks that the offset is less than the limit before adding it to the base; if not, it raises a trap, which the OS usually treats as a segmentation fault and terminates the program. This bounds check is what protects other segments and processes from stray accesses.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.