操作系统 OSTEP Chapter 3——A Dialogue on Virtualization

Professor: And thus we reach the first of our three pieces on operating systems: virtualization.

Student: But what is virtualization, professor?

Professor: Imagine we have a peach.

Student: A peach? (incredulous)

Professor: Yes, a peach. Let us call that the physical peach. But we have many eaters who would like to eat this peach. What we would like to present to each eater is their own peach, so that they can be happy. We call the peach we give eaters virtual peaches; we somehow create many of these virtual peaches out of the one physical peach. And the important thing: in this illusion, it looks to each eater like they have a physical peach, but in reality they don’t.

Student: So you are sharing the peach, but you don’t even know it?

Professor: Right! Exactly.

Student: But there’s only one peach.

Professor: Yes. And...?

Student: Well, if I was sharing a peach with somebody else, I think I would notice.

Professor: Ah yes! Good point. But that is the thing with many eaters; most of the time they are napping or doing something else, and thus, you can snatch that peach away and give it to someone else for a while. And thus we create the illusion of many virtual peaches, one peach for each person!

Student: Sounds like a bad campaign slogan. You are talking about computers, right professor?

Professor: Ah, young grasshopper, you wish to have a more concrete example. Good idea! Let us take the most basic of resources, the CPU. Assume there is only one physical CPU in a system (though now there are often two or four or more). What virtualization does is take that single CPU and make it look like many virtual CPUs to the applications running on the system. Thus, while each application thinks it has its own CPU to use, there is really only one. And thus the OS has created a beautiful illusion: it has virtualized the CPU.

Student: Wow! That sounds like magic. Tell me more! How does that work?

Professor: In time, young student, in good time. Sounds like you are ready to begin.

Student: I am! Well, sort of. I must admit, I’m a little worried you are going to start talking about peaches again.

Professor: Don’t worry too much; I don’t even like peaches. And thus we begin...

Part One:Virtualization

This part includes:

(1) CPU Virtualization:

  • 4. The Abstraction: The Process
  • 5. Interlude: Process API
  • 6. Mechanism: Limited Direct Execution
  • 7. Scheduling: Introduction
  • 8. Scheduling: The Multi-Level Feedback Queue
  • 9. Scheduling: Proportional Share
  • 10. Multiprocessor Scheduling (Advanced)
  • 11. Summary Dialogue on CPU Virtualization

(2) Memory Virtualization:

  • 12. A Dialogue on Memory Virtualization
  • 13. The Abstraction: Address Spaces
  • 14. Interlude: Memory API
  • 15. Mechanism: Address Translation
  • 16. Segmentation
  • 17. Free-Space Management
  • 18. Paging: Introduction
  • 19. Paging: Faster Translations (TLBs)
  • 20. Paging: Smaller Tables
  • 21. Beyond Physical Memory: Mechanisms
  • 22. Beyond Physical Memory: Policies
  • 23. Complete Virtual Memory Systems
  • 24. Summary Dialogue on Memory Virtualization
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Snivellus Snape

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值