Lecture 2 Flashcards
What are the 3 fundamential Abstractions?
- Interipreters/Processors
- Memory
- Communication Links
(Hard to manage resources)
Resources Management:
- High peak demands -> OVERPRVISIONING
- HETROGENTITY for h/w + s/w
- Machine Failure
What is virtualisation?
- Virtualisation is a ‘virutal’ creation of something
- It ABSTRACTS the resources and SIMPLIFIES it; it ISOLATES users from one another + SUPPORTS REPLICATION to increase elasticity
How does virtualisation stimulate a physical object?
- Reduces IT costs but increases utilisation, flexibility + effiency on exisiting hardware.
- Runs multiple OS & Applications on the SAME server at the SAME TIME to increase utilisation + flexibility of hardaware
Important:
- Performance Isolation: Assigns + accounts resources to different applications.
- System security: Isolates services + runs on the same hardware.
- Performance & Reliability: allows appliations to mitigate from one platform to another.
What is Layering and the importance
a common approach to manage SYSTEM COMPLEXITY
Important
- It simplifies subsystems, abstract via interfaces with other subsystems
- Minimises interaction SUBSYSTEMS of a COMPLEX SYSTEMS
- Can DESIGN, IMPLEMENT + MODIFY individually and independently
Interfaces
- ISA - Provides commands to the processor
- Application Binary Interface (ABI) - an INTERFACE between two program modules‘library/OS’ at machine code to access HARDWARE - invokes system calls
- Appreciation Program Interface (API) - A set of routine/tools to build software applications (Gives access to the ISA; HLL library calls to invoke system calls
- A dynamic binary translation: Converts BLOCKS of guest instructions from PORTABLE CODE to the host instruction to improve performance.
- Blocks are CACHED + REUSED
Difference between VMM & VM
- Partitions resources into separate virtual machines
- Allows SEVERAL OS to run concurrently on a platform
- VM is an execution environment, runs on OS, it is an isolated environment but has access to PORTIONS of the computer resources
VMM advantages
Allows:
- Multiple SERVICES to share the SAME platform
- Live mitigation: Movement of a server from one platform to another
- System Modification - Maintaining BACKWARD compatiability of the original system
How does the VMM virtualises the CPU + Memory?
- Traps PRIVILEDGED INSTRUCTIONS execute by a guest OS + enforces the safety operation.
- Traps INTERRUPTS + dispatches them to individual guest
- Controls VIRTUAL MEMORY MANAGEMENT
- Maintains SHADOW PAGE TABLE for guest OS replicates made by guest OS (Uses MMU for translation)
- Monitor SYSTEMS PERFORMANCE to take action to avoid performance degration.
What is guest OS?
A guest OS runs VM under VMM
Name and Describe the Hypervisions
- Type 1 - (Native) VM runs directly from the hardware
- Type 2 - (Hosted) User mode - VM runs on the OS
Dual-Mode Operation + Difference between Kernal and User Mode
allows OS to protect itself + the system components
Kernal mode = “INTERRUPT HANDLERS”:
- Has access to the hardware
- Can execute CPU instruction + reference memory access
- Reserved for lowest levels of the OS
- When the computer crashes, the PC halts
User mode runs EVERYTHING:
- Has NO access to the hardware or reference memory
- Code running on use mode must delegate system API’s to access hardware + memory
- Crashes in a system in user mode is recoverable
Challanges in x86 Virtualisation
- There are 4 layers of priviledge execution rings.
- The “Host computer system hardware” must exectute the priviledge ring 0 first.
- It requires a layer on top under the OS to deliver and manage shared resources
What are the 3 classes of machine instructions?
- Priviledge instructions - Executed in kernal mode, when executed, it causes a TRAP and executes in kernal mode.
- Non-priviledged instructions - the ones that can be executed in user mode.
- Sensetive instructions - can be executed in EITHER user/kernal mode but BEHAVE differently. (Requires special precautions at execution time)
What are the 3 techniques of Virtualisation CPU on x86?
- Full Vertualisation using Binary Translation
- Paravirtualisation
- Hardware assisted Virtualisation
Technique 1: Full Virtualisation using Binary Translation
- Uses a set of binary translation + direct execution
- Guest OS runs unchanged under VMM if directly from the hardware platform
- Runs exact copy of the actual copy
- Binary: REWRITES parts of the code to REPLACE sensitive but not priviledge instruction with safe code to emulate orginal instruction
- Advantages: No hardware assistance, No change to guest OS, Isolation + Security
- Disadvantages: Speed of execution
Examples: VMware, Micosoft Virtual Server