1 / 26

Gray-Box Design

Gray-Box Design. Problem Statement. Add new OS functionality Device Drivers Really-good-memory-manager Approaches: Direct modification May be impractical/impossible Extensible systems Uncommon Interposition Limited, requires OS mod. Gray-Box Systems. Problem:

rowena
Download Presentation

Gray-Box Design

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. Gray-Box Design

  2. Problem Statement • Add new OS functionality • Device Drivers • Really-good-memory-manager • Approaches: • Direct modification • May be impractical/impossible • Extensible systems • Uncommon • Interposition • Limited, requires OS mod

  3. Gray-Box Systems • Problem: • Mod-free “system” service • Solution: • Gray-box design! • Gray-Box? • Some knowledge about system internals • No direct interface • Indirect resource management

  4. Gray-Box Examples • Historical • Microbenchmarks • TCP congestion control • Modern Systems • Distributed systems (middleware) • Virtual machines

  5. Gray-Box ICLs • Layer interposed between apps/OS • “Enhanced interfaces” • Goals • Improve app performance • Provide novel functionality • Exploit knowledge unique to abstraction level

  6. The Gray-Box Method • Assumption • Algorithmic knowledge • Implementation details • Observation • Microbenchmarks (a priori) • Dynamic probing • Inference • Statistical analysis • Influence

  7. Case Study: File-Cache Content Detector • LRU-based replacement • Sequential access • Data-size > cache-size • Worst-case performance! • We can do better T-9 T-8 T-7 T-6 T-5 T-4 T-3 T-2 T-1

  8. FCCD: What do we know? • Assume • LRU-like replacement • Spatial locality in file accesses • Correlation: page, neighbor presence • Observe • File-cache probes (byte/page) • Access size

  9. FCCD: What can we do? • Infer: • Whether file data is present • Influence: • Ordering of data accesses • Re-order file accesses based on probe time

  10. FCCD E1: Single-scan

  11. FCCD E2: ICL clients

  12. FCCD: Portability

  13. FCCD: Caveats • So many assumptions.. • Implementation may deviate (BSD, Solaris) • Conflict with disk assumptions • Make assumptions as general as possible • Violation of E2E principle • All gbp-grep users incur cost of probes; some benefit • Side effects • Is gbp-grep correct?

  14. File Layout Detector Controller (FLDC) • Assumes: • Spatial locality of data blocks associated with files (inodes) which share a directory • Observes: • stat( ) • Infers: • Neighboring files (sorts by inode number) • Influences: • File layout (move system to known state) • Order in which files are accessed

  15. FLDC: Aging Effects

  16. ICL Composition • FCCD + FLDC = ? • Both re-order file accesses • How do we know a file is cached? • FCCD just orders data-units by probe time • We were trying to avoid this problem! • Solution: statistical clustering

  17. Memory-Based Admission Controller (MAC) • Hypothesis: • Working set of competing processes is stable • Observes: • Response time of memory probes • Infers: • Available physical memory • Influences: • Memory allocation (passively) • Goal: eliminate swapping

  18. MAC: Adaptation of Memory Usage

  19. Strengths of Gray-Box Design • Novel design method • Good background • Comparison with related work • Excellent case studies • Paper: Imp & analysis of *1* ICL • Technically sound • Analysis of aberrant behavior

  20. Limitations of Gray-Box Design • When you assume... • Conflicting assumptions (raw devices) • Bad assumptions (wireless) • Portability challenges • Implementation will change • The Heisenberg effect • “Gray-box knowledge” may not be cheap

  21. Gray-Box Design in VMMs • Virtualized computing environments • VMM is resource manager • Goal: provide OS-like services in VMM • Issue: VMM lacks knowledge of OS software abstractions • We know something about how OS works • We’d like to infer state of OS • We can observe behavior from VMM • Sound familiar?

  22. Geiger • Buffer cache monitor • Observe disk accesses from VMM • Associate disk locations with physical memory pages • Infer cache presence, evictions • Uses: • Estimate working set size (better provisioning) • Secondary-level caching • Shared cache • Eviction-based cache

  23. Antfarm • Process monitor • Observe: • contents of page directory register • page table, TLB behavior • Infer process creation/exit, context switch • Uses: • Anticipatory disk scheduling • Reorder VM disk requests to reduce seek time

  24. Lycosid • Rootkit detector • How it works: • Interpose VMM between OS and hardware • Cross-view validation: • Get ‘untrusted’ process-list from OS • Get ‘trusted’ process-list from Antfarm

  25. Summary • Gray-Box design methodology • Gray-Box ICLs • Exploit general knowledge of implementation • Observe: microbenchmarks, probes • Infer state of OS • Influence system behavior! • Improve application performance • Implement novel functionality in VMMs

  26. Thoughts?

More Related