260 likes | 405 Views
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:
E N D
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: • Mod-free “system” service • Solution: • Gray-box design! • Gray-Box? • Some knowledge about system internals • No direct interface • Indirect resource management
Gray-Box Examples • Historical • Microbenchmarks • TCP congestion control • Modern Systems • Distributed systems (middleware) • Virtual machines
Gray-Box ICLs • Layer interposed between apps/OS • “Enhanced interfaces” • Goals • Improve app performance • Provide novel functionality • Exploit knowledge unique to abstraction level
The Gray-Box Method • Assumption • Algorithmic knowledge • Implementation details • Observation • Microbenchmarks (a priori) • Dynamic probing • Inference • Statistical analysis • Influence
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
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
FCCD: What can we do? • Infer: • Whether file data is present • Influence: • Ordering of data accesses • Re-order file accesses based on probe time
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?
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
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
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
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
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
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?
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
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
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
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