html5-img
1 / 36

We are living in a New Virtualized World

We are living in a New Virtualized World. Sorav Bansal IIT Delhi Feb 26, 2011. Old Virtualized World. App. App. App. App. App. App. OS. OS. OS. VMM. IBM Mainframe. IBM Mainframes (circa 1960). New Virtualized World. App. App. App. App. App. App. OS. OS. OS. “Cloud-OS”.

elsie
Download Presentation

We are living in a New Virtualized World

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. We are living in aNew Virtualized World SoravBansal IIT Delhi Feb 26, 2011

  2. Old Virtualized World App App App App App • App OS OS OS VMM IBM Mainframe IBM Mainframes (circa 1960)

  3. New Virtualized World App App App App App • App OS OS OS “Cloud-OS”

  4. “Cloud-OS”(stuff that you have heard many times before… uh yawn…) • Infrastructure Layer (slave) + Management layer (master) • Divide hardware into resource pools • Unit of abstraction = VM • Efficient • Effective Isolation • Dynamic • Fault-Tolerant

  5. “Cloud-OS”(more exciting stuff) • Dynamic Performance Optimizations • Compiler Optimizations • OS-level Optimizations • Providing Determinism • Efficient Para-virtual Record/Replay • Improving Reliability • Micro-Replays

  6. “Cloud-OS”(more exciting stuff) • Security • VMM-level security checks • Efficient Thin Clients • Remote Desktopping using VM Record/Replay

  7. Performance Optimizations • Dynamic Binary Translation (Compiler Optimizations) • Translation Blocks • Direct Jump Chaining • Peephole Optimizations • Trace Optimizations • Exception rollbacks • Interrupt delays

  8. Performance Optimizations • Dynamic Binary Translation (OS-level Optimizations) • Eliminate traps from system calls • Better TLB/cache locality by using dedicated OS cores

  9. Traditional Picture Application 1 Application 2 OS Hardware

  10. Virtualized Picture Application 1 Application 2 OS Optimizing VMM

  11. Some Initial Results Lower is Better

  12. Providing Determinism: Record/Replay • Uniprocessor • Non-determinism is quite low. Can be efficiently recorded. • Multiprocessor • Non-determinism high due to shared memory. • Recording overhead scales poorly with multiple processors • Assuming we can patch the guest in some way, can we improve this situation?

  13. Micro-Replays Recording non-determinism Replay Hit a Bug (e.g., assertion failure) Snapshot Choose a rollback point. Also guess bug-inducing non-deterministic choice Execution timeline Potentially bug-free execution

  14. Tolerating Non-deterministic Bugsusing Record/Replay VMM records an execution On assert failure, the VMM interposes and rolls back the execution a few milliseconds VMM guesses the non-deterministic choices that could have caused the failure (e.g., instruction at timer interrupt) VMM replays the execution avoiding the previous non-deterministic choices In this example, VMM infers the critical section after a few runs and avoids interrupting it debit = 0; credit = total; void transfer(void) { for(i = 0; i < 1000; i++) { debit--; credit++; assert(debit + credit == total); } } for (t = 0; t < max_threads; t++) { thread_create(transfer); } shared vars unprotected critical section

  15. Number of Replays Required? Technical Report: Micro-Replays: Improving Reliability in Presence of Non-deterministic Software Bugs http://www.cse.iitd.ac.in/~sbansal/pubs/micro_replays.pdf

  16. Security ExampleA Simple Scheme to Prevent Stack-Overflows … push ra, shadow … call … ra pop ra1pop shadow if (ra != ra1) error … ret

  17. Remote Desktop Using Streaming VM Record/Replay Typical Remote Desktop

  18. Remote Desktop Using Streaming VM Record/Replay Record Replay Remote Desktop using Streaming VM Rec/Rep

  19. Bandwidth Comparison Cumulative Data Transfer as function of time

  20. Steady-state Bandwidth Comparison Rate (MiB/s) Steady State Bandwidth Requirement

  21. Conclusions • We are living in a new virtualized world • Many implications in different application areas

  22. Backup Slides

  23. Translation Blocks • Divide code into “translation blocks” • A translation block ends if • Reach a control-flow instruction • Or, MAX_INSNS instructions have been translated

  24. A Simple Scheme x: tx: Original code fragment Translated code fragment Binary Translator

  25. Use a Cache x: tx: Original code fragment Translated code fragment Binary Translator save Lookup using x found Translation Cache not-found

  26. Direct Jump Chaining Ta a lookup(b) lookup(c) b c Tb Tc d lookup(d) lookup(d) Td

  27. Indirect Jumps push b jmp Tf call Ta Tf f a b tmp JTABLE[retaddr & MASK] if (tmp.src == retaddr) goto tmp.dst ret pop retaddr lookup(retaddr) Tb

  28. Lower is Better

  29. Lower is Better

  30. logarithmic scale printf Overheads

  31. Effect of Maximum Size of Translation Block Overhead Max Size of Translation Block

  32. clock Effect of Translation Cache Size random Overhead Number of 4k pages in Translation Cache

  33. Optimizations • Peephole Optimizations • Trace Optimizations • Cross-layer optimizations

  34. An Example ld M, r1 ld M, r0 ld M, r0 mov r0, r1

  35. Interrupts ld M, r1 ld M, r0 ld M, r0 mov r0, r1 Delay Interrupt delivery till end of current translation

  36. Precise Exceptions ret ld (sp),t0 add $4, sp … jmp t0 Page fault rollback code sub $4, sp restore t0 page fault handler

More Related