1 / 12

A Lazy Buddy System Bounded by Two Coalescing Delays per Class

A Lazy Buddy System Bounded by Two Coalescing Delays per Class. R. E. Barkley, T. Paul Lee SOSP '89: Proceedings of the twelfth ACM Symposium on Operating Systems Principles , pp. 167~176, 1989. Speaker : 백승재

daisy
Download Presentation

A Lazy Buddy System Bounded by Two Coalescing Delays per Class

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. A Lazy Buddy System Bounded by Two Coalescing Delays per Class R. E. Barkley, T. Paul Lee • SOSP '89: Proceedings of the twelfth ACM Symposium on Operating Systems Principles, pp. 167~176, 1989 Speaker : 백승재 ibanez1383@gmail.com

  2. Lazy... CoW, vfork(), Lazy TLB, ...

  3. 8 9 Standard Buddy 동작 예 – 1/3 . . 4 alloc 2 page 요청 free 3 2 12 9 1 8 8 0 10 5 free_area.free_list free_area[order].map -> 0 Physical Memory

  4. 12 9 8 13 Standard Buddy 동작 예 – 2/3 . . 4 alloc 2 page 요청 13 free 12 3 2 12 9 1 14 8 0 10 5 free_area.free_list free_area[order].map -> 1 -> 0 Physical Memory

  5. 11 Standard Buddy 동작 예 – 3/3 . . 4 alloc 11번 page 해제 요청 free index = page_idx >> (order + 1)=> 11 >> ( 0 + 1 ) = 5 11 8 3 12 2 1 8 0 10 5 free_area.free_list index >>= 1 free_area[order].map -> 0 -> 0 -> 0 -> 1 Physical Memory

  6. Basic Idea • Cost of malloc() and free() • Dominated by the costs of fragmenting or coalescing memory • Reducing the number of times we have to fragment and coalesce memory

  7. Related Works • (θl, θs) • θl : lazy ratio, θs : speed up ratio • (0 ≤θl ≤θs ≤ 1/2) • Watermark-based lazy buddy policy • Block class mode (θ = free / total) • (θ≤θl) = lazy : coalescing is not necessary • (θl < θ≤θs) = reclaiming : coalescing is needed • (θs < θ) = accelerated : allocator must coalesce faster • Globally free, Locally free • Depends on the mode of the class • Normally lazy mode

  8. The State-driven DELAY-2 Algorithm • (N,Fl,Fg) • N : Total number of blocks in that class • Fl : number of locally free blocks in the free list • Fg : number of globally free blocks in the free list • (i) 0 ≤ Fg ≤┌ N/2 ┐ • (ii) Fg ≤ N-2Fl • No watermark, focuses directly on maintaining the state of each block class within the lazy space • More aggressive, more lazier • The state S of a class of blocks • Lazy space • First, desreaseFl,then check the state

  9. Algorithm and State Transition Diagram • (i) 0 ≤ Fg ≤┌ N/2 ┐ • (ii) Fg ≤ N-2Fl

  10. A Slack Variable-based Implementation D = N - 2Fl - Fg Initially 0

  11. Measurement and Comparison – 1/2

  12. Measurement and Comparison – 2/2

More Related