Discussion
Which register pair is typically used to protect memory in a contiguous allocation scheme?
Answer: D
Correct answer: Base and limit registers
The base register holds the smallest physical address the process may use, and the limit register holds the size of its range. Every address generated is checked: it must be less than the limit, and the base is then added to give the physical address. The check is performed by hardware on every reference, so it costs nothing in time, and any violation traps to the operating system as an addressing error. The registers can be loaded only by a privileged instruction, executable in kernel mode alone. That is what makes the protection genuine: a user program cannot alter the bounds of its own confinement. The distinction between user and kernel mode exists largely to support arrangements of this kind. The scheme also supplies relocation, since changing the base register moves the process without altering any address within it - which is what makes swapping and compaction possible. Paging generalises the idea, replacing the single register pair with a page table.
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