1 / 22

Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism

Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism. THOMAS E. ANDERSON, BRIAN N. BERSHAD, EDWARD D.LAZOWSKA, and HENRY M. LEVY University of Washington. Speaker : 강동우 ( redcdang@gmail.com ) 박해윤 (park8312@nate.com) . Threads?.

filomena
Download Presentation

Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism

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. Scheduler Activations: Effective KernelSupport for the User-Level Managementof Parallelism THOMAS E. ANDERSON, BRIAN N. BERSHAD, EDWARD D.LAZOWSKA, and HENRY M. LEVY University of Washington Speaker : 강동우 (redcdang@gmail.com) 박해윤 (park8312@nate.com)

  2. Threads? • Multithreading Models • User Threads + Kernel Threads를 모두 지원 • 종류 • Many-to-One • One-to-One • Many-to-Many • User Threads • 커널의 지원없이 유저 공간에서 스레드 생성, 스케줄링, 관리를 지원하는 스레드 라이브러리에 의해 구현. • Kernel Threads • 커널이 직접 커널 공간에서 스레드의 생성, 스케줄링, 관리 지원.

  3. User Level VS Kernel Level User-Level Thread Kernel-Level Thread • Flexible • Low cost • Fast • OS can manage • Cheaper than process • OS can schedule all of the threads • OS don’k know a existence of thread • Heavy • Worse -performance

  4. Multithreading Models(1) User thread 2 User Space User thread 3 User thread 4 User thread 1 Mapping Kernel Space Kernel thread Many-to-One Models • Many-to-One Models • 장점 : 스레드관리는 사용자공간에서 행해진다.(효율적) • 단점 : 스레드가 blocking system call할 경우 전체가 다 block됨.

  5. Multithreading Models(2) User thread 2 User Space User thread 3 User thread 4 User thread 1 Mapping Kernel thread 4 Kernel thread 2 Kernel Space Kernel thread 1 Kernel thread 3 One-to-One Models • One-to-One Models • 장점 : 하나의 스레드가 blocking system call을 하더라도 다른 스레드가 작업 할 수 있다. • 단점 : 사용자 스레드를 생성할 때마다 커널 스레드를 생성해야 한다. → 성능저하 ☞ 스레드 수 제한시킴

  6. Multithreading Models(3) User thread 2 User Space User thread 3 User thread 4 User thread 1 Mapping Kernel thread 2 Kernel Space Kernel thread 1 Kernel thread 3 Many-to-Many Models • Many-to-Many Models • 여러 개의 사용자 수준 스레드를 그보다 작거나 같은 수의 커널 스레드로 다중화한다. • 필요한 만큼 많은 사용자 스레드를 생성하면 상응하는 커널 스레드가 다중 처리기에서 병렬로 수행.

  7. Scheduler Activations • Goals • Integrate User-level threads Through improved kernel support • The Performance and flexibility of user-level threads. • The functionality of kernel threads.

  8. Specific of Scheduler Activations • Three roles • Vessels for running user-level threads • Notifies the user-level thread system of a kernel event. • Provides space in the kernel for saving the processor context of the activations’s current user-level thread, when the thread is stopped by the kernel. • Two Stacks • User-level stack : used for upcalls • Kernel stack : used for system calls.

  9. Upcall Points • Kernel User • Add this processor • Execute a runnable user-level thread • Processor has been preempted • Return to the ready list the user=level thread that was executing in the context of the preempted scheduler activation. • Scheduler activation has blocked • The blocked scheduler activation is no longer using its processor. • Scheduler activation has unblocked( • Return to the ready list the user-level thread that was executing in the context of the blocked scheduler activation

  10. System Call Points • User Kernel • Add more Processors • Allocate more processors to this address space and start them running scheduler activations. • This processor is idle() • Preempt this processor if another address space needs it.

  11. Processor Allocation • Kernel notified • User-Level has more runnable threads than processors • User-Level has more processors than runnable threads • No idle processor in presence of runnable threads.

  12. Example T1 User Program User-LevelRuntime System (1) (2) (1) (2) (3) (4) (A) (B) Operating System Kernel Add Processor Add Processor Processors

  13. Example 상황소개? 자원소개? Thread 1 Thread 2 Thread 3 Thread 4 Processor 1 Processor 2

  14. Example T1 User Program User-LevelRuntime System (1) (2) (2) (3) (4) (1) (A) (B) Operating System Kernel Add Processor Add Processor Processors

  15. Example T2 User Program User-LevelRuntime System (1) (2) B (3) (4) (A) (B) (C) Operating System Kernel A’s thread has blocked Upcall 불러만 주세요~ Processors

  16. Example T3 User Program User-LevelRuntime System (1) (2) (3) (4) (A) (B) (C) Operating System Kernel A’s thread and B’s thread can continue Upcall 불러만 주세요~ Upcall 불러만 주세요~ Processors

  17. Example T4 User Program User-LevelRuntime System (3) (1) (1) (2) (3) (4) (C) (D) Operating System Kernel Processors

  18. Example 결론 Scheduler activation은 upcall을 통해 user level thread를 스케줄러 하는 활동이고, 이를 통해 멀티 프로세서에 대한 스케쥴링을 지원한다.

  19. Performance

  20. Performance

  21. Q & A 질문은 메일로. park8312@nate.com

More Related