【MIT6.828】LAB-1 Booting a PC

https://pdos.csail.mit.edu/6.828/2018/labs/lab1/
note:

32位cpu 内存空间4GB 是怎么算的?为什么单位从b变成了B

处理器最小寻址粒度一般是byte,字节
32位处理器一般理论寻址空间2^32Bytes
2^32=2^10(K)*2^10(M)*2^10(G)*4

CS & IP

Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions.
Instruction Pointer (IP) is a 16-bit register.

Since the Instruction Pointer (IP) is 16 bit it means you can only have 64k instructions (2^16), which wasn’t much even in the 80s. So to expand the address space you have a second register which addresses 64k blocks. You could consider cs:ip together as one 32 bit register which is then capable of addressing 2^32 bytes…ie 4G which is what you get on a processor which uses 32 bit addresses. The 8086 was using 20 bits of addresses, so you could access 1M of memory.


https://xinqiu.me/2016/10/15/MIT-6.828-1/

MIT 6.828 Lab1 - Booting a PC (The Kernel) https://yangbolong.github.io/2017/02/13/lab1-cont/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值