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