transforming policies into mechanisms with infokernel
Download
Skip this Video
Download Presentation
Transforming Policies into Mechanisms with Infokernel

Loading in 2 Seconds...

play fullscreen
1 / 52

Transforming Policies into Mechanisms with Infokernel - PowerPoint PPT Presentation


  • 49 Views
  • Uploaded on

Transforming Policies into Mechanisms with Infokernel. Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, Nathan C. Burnett, Timothy E. Denehy , Thomas J. Engle, Haryadi S. Gunawi, James A. Nugent, and Florentina I. Popovici Department of Computer Sciences University of Wisconsin - Madison.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Transforming Policies into Mechanisms with Infokernel' - odette-bird


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
transforming policies into mechanisms with infokernel

Transforming Policies into Mechanisms with Infokernel

Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau,

Nathan C. Burnett, Timothy E. Denehy,

Thomas J. Engle, Haryadi S. Gunawi,

James A. Nugent, and Florentina I. Popovici

Department of Computer Sciences

University of Wisconsin - Madison

policies and mechanisms
Policies and Mechanisms
  • Definitions
    • Policies are schemes for deciding what to do
    • Mechanisms are tools for implementing policies
  • From user or application perspective
    • See only fixed OS policies
    • Defaults may not be the best policies
policies and mechanisms1
Policies and Mechanisms
  • Definitions
    • Policies are schemes for deciding what to do
    • Mechanisms are tools for implementing policies
  • From user or application perspective
    • See only fixed OS policies
    • Defaults may not be the best policies
  • How can we transform existing OS policies into useful mechanisms for higher-level services?
from policies to mechanisms
From Policies to Mechanisms
  • Information empowers transformation

Application

OS - Policies

from policies to mechanisms1
From Policies to Mechanisms
  • Information empowers transformation

Application

OS - Policies

(infokernel)

small changes

from policies to mechanisms2

Information

From Policies to Mechanisms
  • Information empowers transformation

Application

algorithms, state

OS - Policies

(infokernel)

small changes

from policies to mechanisms3

Information

From Policies to Mechanisms
  • Information empowers transformation

Application

Library

algorithms, state

OS - Policies

(infokernel)

small changes

from policies to mechanisms4

Information

From Policies to Mechanisms
  • Information empowers transformation

exploit

predict

Application

Library

algorithms, state

OS - Policies

(infokernel)

small changes

from policies to mechanisms5

Information

From Policies to Mechanisms
  • Information empowers transformation

exploit

predict

adapt

Application

Library

algorithms, state

OS - Policies

(infokernel)

small changes

from policies to mechanisms6

Information

From Policies to Mechanisms
  • Information empowers transformation

exploit

predict

adapt

manipulate

Application

Library

algorithms, state

OS - Policies

(infokernel)

small changes

building infokernels
Building Infokernels
  • Exploit information to control policies in Linux, BSD
  • File cache replacement
    • Convert 2Q into FIFO, LRU, MRU, LFU
  • File and directory placement
    • Control placement of data on disk
  • Disk scheduling
    • Enable background scheduling and free-block scheduling
  • Network scheduling
    • Convert TCP Reno into TCP Vegas congestion control
infokernel observations
Infokernel Observations
  • Policies can be manipulated efficiently
  • Ideas applicable to diverse policies
  • Several useful abstractions
  • Simple to implement
infokernel questions
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
case study inforeplace

Information

Case Study: InfoReplace
  • Convert a source OS file cache replacement policy into a different target policy
  • Manipulate source policy by accessing cache pages favored by the target policy

Application

InfoReplace

File Caching

(infokernel)

repeated sequential scans
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU

Read page 1

1

Read page 2

1

2

Read page 3

1

2

3

Read page 4

2

3

4

Read page 1

3

4

1

Read page 2

4

1

2

0% Hit Rate

repeated sequential scans1
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU

LIFO

Read page 1

1

1

Read page 2

1

2

2

1

Read page 3

1

2

3

3

2

1

Read page 4

2

3

4

4

2

1

Read page 1

3

4

1

4

2

1

Read page 2

4

1

2

4

2

1

0% Hit Rate

50% Hit Rate

repeated sequential scans2
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU (source)

LIFO (target)

InfoReplace

Read page 1

1

1

1

Read page 2

1

2

2

1

1

2

Read page 3

1

2

3

3

2

1

1

2

3

Read page 4

2

3

4

4

2

1

Read page 1

3

4

1

4

2

1

Read page 2

4

1

2

4

2

1

0% Hit Rate

50% Hit Rate

repeated sequential scans3
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU (source)

LIFO (target)

InfoReplace

Read page 1

1

1

1

Read page 2

1

2

2

1

1

2

Read page 3

1

2

3

3

2

1

2

3

1

Read page 4

2

3

4

4

2

1

Read page 1

3

4

1

4

2

1

Read page 2

4

1

2

4

2

1

0% Hit Rate

50% Hit Rate

repeated sequential scans4
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU (source)

LIFO (target)

InfoReplace

Read page 1

1

1

1

Read page 2

1

2

2

1

1

2

Read page 3

1

2

3

3

2

1

3

1

2

Read page 4

2

3

4

4

2

1

Read page 1

3

4

1

4

2

1

Read page 2

4

1

2

4

2

1

0% Hit Rate

50% Hit Rate

repeated sequential scans5
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU (source)

LIFO (target)

InfoReplace

Read page 1

1

1

1

Read page 2

1

2

2

1

1

2

Read page 3

1

2

3

3

2

1

3

1

2

Read page 4

2

3

4

4

2

1

1

2

4

Read page 1

3

4

1

4

2

1

Read page 2

4

1

2

4

2

1

0% Hit Rate

50% Hit Rate

repeated sequential scans6
Repeated Sequential Scans
  • Imagine a 3 page cache and a 4 page file

LRU (source)

LIFO (target)

InfoReplace

Read page 1

1

1

1

Read page 2

1

2

2

1

1

2

Read page 3

1

2

3

3

2

1

3

1

2

Read page 4

2

3

4

4

2

1

1

2

4

Read page 1

3

4

1

4

2

1

2

4

1

Read page 2

4

1

2

4

2

1

4

1

2

0% Hit Rate

50% Hit Rate

50% Hit Rate

infokernel questions1
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
amount of information
Amount of Information
  • InfoReplace
    • Could export exact file page cache structures
      • Specific to the source policy and the particular implementation
      • Kernel changes would force user-level modifications
    • Instead, export an abstract ordered list of file pages
      • Order indicates which pages are likely to be evicted
      • Possible to build a single library for many source policies
  • General observations
    • Information must be recast
    • Hide actual implementations
    • Export general abstractions applying to a range of policies
infokernel questions2
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
efficient abstractions
Efficient Abstractions
  • InfoReplace
    • Victim list, next N victims from file cache page list
      • Faster to copy a small portion of the list
    • Victim counter, tracks additions to the victim list
      • Faster to determine when manipulation is necessary
  • General observations
    • Efficient optimizations for each case study
    • Reusable abstractions for exporting information
      • Lists, counters, notifiers
infokernel questions3
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
emulating target policies
Emulating Target Policies
  • InfoReplace
    • Interpose on file reads and writes
    • Simulate the target policy and compare its shadow file cache entries to the actual cache
    • Access pages that may be evicted but are favored under the target policy

compare

Simulated cache

OS cache

1

2

3

3

2

1

manipulate

infokernel questions4
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
implementation complexity
Implementation Complexity
  • InfoReplace
    • Kernel: 109 lines of code
    • User-level: 1,361 lines of code
      • Most due to the simulation framework (720 lines)
      • About 100 lines of code for each target policy
  • General observations
    • Small code sizes for all case studies (< 1,900 lines)
    • Abstractions easily implemented in Linux and BSD
infokernel questions5
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
inforeplace accuracy
InfoReplace Accuracy
  • Convert Linux 2Q into FIFO, LRU, MRU, LFU
  • Workload varies recency and frequency of access to a file
  • Compare pages in actual and simulated caches
  • Accuracy is high except for MRU, which is opposed to 2Q
infokernel questions6
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
inforeplace overhead
InfoReplace Overhead
  • Convert Linux 2Q into FIFO, LRU, MRU, LFU
  • Overheads are small except LFU which is expensive to simulate
  • Even LFU overhead is acceptable if we can gain just 1% in hit rate
infokernel questions7
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
inforeplace workload benefits
InfoReplace Workload Benefits
  • Convert Linux 2Q policy into PinRange
  • Pin the upper levels of a database index tree in memory
  • Workload of random index lookups
  • Level 6 hit rate increases under PinRange
  • Run time decreases 22%
inforeplace workload benefits1
InfoReplace Workload Benefits
  • Convert Linux 2Q policy into PinRange
  • Pin the upper levels of a database index tree in memory
  • Workload of random index lookups
  • Level 6 hit rate increases under PinRange
  • Run time decreases 22%
infokernel questions8
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
adding mechanisms
Adding Mechanisms
  • InfoReplace
    • Could build several cache policies into the OS
      • Difficult to supply the right policy for every application
  • General observations
    • Infeasible to deliver all policies for all applications
    • Provide abstract tools for policy customization
infokernel questions9
Infokernel Questions
  • Exporting information
    • How much information should we export?
    • How do we access information efficiently?
  • Controlling policies
    • How can we emulate other policies?
    • How complex is the implementation?
  • Evaluation
    • How accurate is our policy control?
    • How much overhead is incurred?
    • What benefits can we achieve?
  • Other issues
    • Why not add new mechanisms for control?
    • Could greedy processes misbehave?
greedy processes
Greedy Processes
  • InfoReplace
    • A process could monopolize the file cache
    • Such activity was possible before
  • General observations
    • Stresses the role of the OS to arbitrate resources
    • No new mechanisms, so no new OS responsibilities
case study infofreesched

Information

Case Study: InfoFreeSched
  • Provide free-block scheduling on a source disk scheduling policy
  • Manipulate source policy by carefully introducing background requests

Application

InfoFreeSched

Disk Sched

(infokernel)

infofreesched abstractions
InfoFreeSched Abstractions
  • Name of disk scheduling policy
    • Determine where new requests will be placed
  • Disk request list
  • Notifier for changes to disk request list
    • Faster to recognize new scheduling opportunities
  • Timers for disk accesses
    • Build an approximate disk model based on logical block distances
infofreesched operation
InfoFreeSched Operation
  • Lack complete control over disk request queue
    • Limited by source policy and existing requests
infofreesched operation1
InfoFreeSched Operation
  • Lack complete control over disk request queue
    • Limited by source policy and existing requests
  • Obtain current list of disk requests
infofreesched operation2
InfoFreeSched Operation
  • Lack complete control over disk request queue
    • Limited by source policy and existing requests
  • Obtain current list of disk requests
  • For each background request
infofreesched operation3
InfoFreeSched Operation
  • Lack complete control over disk request queue
    • Limited by source policy and existing requests
  • Obtain current list of disk requests
  • For each background request
    • Determine its queue position
infofreesched operation4
InfoFreeSched Operation
  • Lack complete control over disk request queue
    • Limited by source policy and existing requests
  • Obtain current list of disk requests
  • For each background request
    • Determine its queue position
    • Calculate effect on foreground using disk model
infofreesched operation5
InfoFreeSched Operation
  • Lack complete control over disk request queue
    • Limited by source policy and existing requests
  • Obtain current list of disk requests
  • For each background request
    • Determine its queue position
    • Calculate effect on foreground using disk model
    • Insert request if impact is minimal
infofreesched workload benefits
InfoFreeSched Workload Benefits
  • Workload of foreground and background random read requests
  • Increase overall bandwidth with minimal impact on foreground
conclusions
Conclusions
  • Infokernels
    • Can efficiently manipulate OS polices
    • Apply to a diverse set of policies
    • Can be built from several useful abstractions
    • Are simple to implement
conclusions1
Conclusions
  • Infokernels
    • Can efficiently manipulate OS polices
    • Apply to a diverse set of policies
    • Can be built from several useful abstractions
    • Are simple to implement
  • Information empowers applications
questions
Questions?

http://www.cs.wisc.edu/wind/

ad