1 / 19

Lottery Scheduling : Flexible Proportional-Share Resource Management Carl A. Waldspurger and William E. Weihl MIT La

Lottery Scheduling : Flexible Proportional-Share Resource Management Carl A. Waldspurger and William E. Weihl MIT Laboratory for Computer Science. 2011-04-11 컴퓨터학과 컴퓨터학과 720100401 방지웅 bang21c@naver.com. 목 차. Introduction Lottery Scheduling

lok
Download Presentation

Lottery Scheduling : Flexible Proportional-Share Resource Management Carl A. Waldspurger and William E. Weihl MIT La

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. Lottery Scheduling : Flexible Proportional-Share Resource Management Carl A. Waldspurger and William E. Weihl MIT Laboratory for Computer Science 2011-04-11 컴퓨터학과 컴퓨터학과 720100401 방지웅 bang21c@naver.com

  2. 목 차 • Introduction • Lottery Scheduling • Modular Resource Management & Implementation • Experiments • Managing Diverse Resources • Q & A

  3. 1. Introduction (1/4)

  4. 1. Introduction (2/4) • 다중 스레드 시스템에서 스케줄링 계산은 복잡하고 어려운 문제임. • Decay usage 알고리즘 • CPU를 최근에 적게 사용한 프로세스를 우선시하는 스케줄링 방법. • 전통적으로 UNIX 등의 시분할 운영체제에서의 CPU 스케줄러로 널리 사용. • 각 프로세스에게 주어지는 고정된 값인 기본 우선 순위(base priority)와 동적으로 변하는 CPU 사용량 정보를 조합하여 우선 순위를 표현함.

  5. 1. Introduction (3/4) • 우선 순위 기반 스케줄링 경우 무한 봉쇄(indefinite blocking) 또는 기아 상태(starvation)이 발생하는 문제점 존재 • 부하가 과중한 컴퓨터 시스템에서 높은 우선 순위의 프로세스가 증가하여 낮은 우선 순위를 갖는 프로세스가 CPU을 점유하지 못하는 경우가 발생함. • 1973년에 MIT에서 IBM 7094를 폐쇄했을때, 1967년에 입력된 낮은 우선 순위 프로세스가 수행되지 못했음. • Fair share and microeconomic schedulers 경우 프로세스 간의 CPU 점유에 대한 우선 순위 문제가 존재함. • 이러한 문제점을 해결하기 위해서 Lottery Scheduling을 제안함.

  6. 1. Introduction (4/4) • Lottery scheduling • A randomized mechanism that provides responsive control over the relative execution rates of computations • It efficiently implements proportional-share resource management • It also provides excellent support for modular resource management • Lottery scheduling can be generalized to manage many diverse resources like I/O bandwidth, memory, and access to locks. • A variant of lottery scheduling can also be used to efficiently manage space-shared resources such as memory

  7. 2. Lottery Scheduling (1/2) • Lottery scheduling • a randomized resource allocation mechanism • Resource rights are represented by lottery tickets • Each allocation is determined by holding a lottery • The client that wins the lottery gets the resource

  8. 2. Lottery Scheduling (2/2) • Lottery Scheduling의 특징 • Lottery Scheduling을 통한 공정한 CPU 점유. • 클라이언트가 갖고 있는 Lottery Ticket의 양에 따라 공정하게 CPU을 사용할 수 있도록 함. • 클라이언트의 당첨된 Lottery 수는 이항 분포(binomial distribution)을 갖음 • Lottery Ticket을 갖지 않은 클라이언트는 없으므로 기아(starvation) 문제는 발생하지 않음. • 모든 클라이언트는 Lottery Ticket의 수에 따라 공정하게 CPU을점유할 수 있는 기회를 가짐.

  9. 3. Modular Resource Management & Implementation (1/6) • Random Number • Lottery Ticket의 추첨을 위한 난수 발생기 • Park-Miller pseudo-random number generator을 사용

  10. 3. Modular Resource Management & Implementation (2/6) • Random Number을 이용한 Lottery 추첨 방식 트리구조 탐색의 경우 시간 복잡도 : O (log n) 순차적 탐색의 경우 시간 복잡도 : O(n)

  11. 3. Modular Resource Management & Implementation (3/6) • Lottery Ticket의 구성

  12. 3. Modular Resource Management & Implementation (4/6) • Ticket Currencies Run Queue 비활성화 Thread 1 0 비활성화 Thread 2 400 활성화 Thread 3 600 활성화 Thread 4 2000 활성화 200 200 Thread 2 : 1000 = 200 X X 500 200 100 100 Thread 4 : 2000 = 2000 X X 100 100

  13. 3. Modular Resource Management & Implementation (5/6) • Compensation Tickets • Lottery Ticket의 수가 같으면 어떻게 할 것인가? 답변) CPU 점유 시간을 양보하는 대신 Lottery Ticket을 늘려줌. A 400 B 400 A 400 B 400 A 400 B 2000 100ms 20ms 1 1 5 C-Tickets = 400 X = 2000 F = 20/100 = 1/5

  14. 3. Modular Resource Management & Implementation (6/6) • Ticket Inflation • 하나의 클라이언트가 Lottery Ticket을 너무 많이 할당받을 경우는? 답변) 상관없음 • 하나의 클라이언트만 동작하는 시스템 상황에서 Lottery Ticket 수가 많은 경우 오히려 유용함. • Ticket Transfers • 클라이언트는 Lottery Ticket을 동기식 RPC을통해 서버로부터 받음. • 이러한 방법은 우선 순위 역전 문제 (priority inversion problem)를방지 할 수 있음. • 논문에서는 구현 시 mach_msg system 수정하여 사용함. 로또 10만원치 사도 ….. 1 8140000

  15. 4. Experiments (1/3) • Fairness 평가 • Dhrystone benchmark • 2개의 Task를 가지고 60초 동안 체크

  16. 4. Experiments (2/3) • Client-Server Computation (1/2)

  17. 4. Experiments (3/3) • Client-Server Computation (2/2)

  18. 5. Managing Diverse Resources • Synchronization Resources • A lottery-supported mutex • An associated mutex currency • inheritance ticket in that currency

  19. 6. Q & A Q & A 경청해주셔서 감사합니다.

More Related