[mit 6.S081]Lecture 3 OS Organization and System Calls笔记

本文主要介绍了操作系统如何组织以及系统调用的工作原理。在UNIX接口中,操作系统抽象了硬件资源,如进程代替CPU,文件代替磁盘块。为了防御性地运行,操作系统提供了用户/内核模式和虚拟内存,确保应用不能崩溃或破坏其隔离状态。内核作为受信任的计算基(TCB),必须无bug并对待进程为恶意。文中提到了单片机和微内核设计的优缺点,并讨论了如何通过设置页表进行内存隔离。此外,还解释了如何通过处理器标志位确定执行模式,以及如何防止恶意用户代码绕过操作系统。最后,文章提到了操作系统实现语言选择C的原因,主要是因为C语言对硬件控制的灵活性。
摘要由CSDN通过智能技术生成

Lecture 3 OS Organization and System Calls

  • UNIX interface

  • abstract the hardware resources

    • process: instead CPU
    • exec: instead of memory
    • file: instead of disk block
  • OS should be defensive

    • app cannot crash the OS
    • app cannot break out of its isolation
  • strong isolation between apps and os

    • typical: hardware support
      • user/kernel mode
      • virtual memory
  • user/kernel mode

    • kernel: privileged instructions(setting up page table register, disabling clock interrupt… )
    • user: unprivileged instructions(add, sub, jr, branch…)
  • CPUs provide virtual memory

    • page table: virtual address -> physical address
    • process has own page table
    • memory isolation
  • Ent

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值