硬件保护
字数: 0
Lecture 13b Hardware protection for run time applications
(2019-Summer-Exam)Describe some hardware protection mechanisms built into a modern CPU. In each case, explain how they prevent one application interfering with the operation of another.

I/O 保护

双模式操作

Dual Mode Operation
notion image
User mode is monitored by the OS, programs must go through the operating system to make requests that may affect other programmes.
notion image

CPU 保护

通过 check memory limit bounds,超出此范围的内存将受到保护。
  • 基址寄存器 (base register) 加载的是内存中最低安全地址
  • 限制寄存器 (limit register) 加载的是内存中最高安全地址
当操作系统在每个进程之间切换时,它会更改寄存器以限制进程的地址空间。

内存保护

如果程序出现严重错误,操作系统如何有机会重新获得控制权?
大多数系统都有一个单独的“实时时钟”来监控时间和日期。
定时器 (Timer) 用来判断用户程序是否运行时间过长。定时器中断以固定间隔触发,它可以用于在进程之间进行上下文切换。这会停止一个进程并切换到另一个进程,实现多任务处理。
 
2023 - 2026