intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Hệ điều hành nâng cao - Chapter 4: Threads

Chia sẻ: Xaydung K23 | Ngày: | Loại File: PPTX | Số trang:45

137
lượt xem
8
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Bài giảng Hệ điều hành nâng cao - Chapter 4: Threads trình bày tổng quan về chủ đề, mô hình đa luồng, chủ đề thư viện, các vấn đề luồng, hệ điều hành, chủ đề windows XP,...Mời bạn đọc cùng tham khảo.

Chủ đề:
Lưu

Nội dung Text: Bài giảng Hệ điều hành nâng cao - Chapter 4: Threads

  1. Chapter 4: Threads Operating System Concepts – 8th8th Edition Operating System Concepts – Edition 4.1 Silberschatz, Galvin and Gagne ©2009 Silberschatz, Galvin and Gagne ©2009
  2. Chapter 4: Threads s Overview s Multithreading Models s Thread Libraries s Threading Issues s Operating System Examples s Windows XP Threads s Linux Threads Operating System Concepts – 8th Edition 4.2 Silberschatz, Galvin and Gagne ©2009
  3. Objectives s To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems s To discuss the APIs for the Pthreads, Win32, and Java thread libraries s To examine issues related to multithreaded programming Operating System Concepts – 8th Edition 4.3 Silberschatz, Galvin and Gagne ©2009
  4. Motivation s Threads run within application s Multiple tasks with the application can be implemented by separate threads q Update display q Fetch data q Spell checking q Answer a network request s Process creation is heavy-weight while thread creation is light-weight s Can simplify code, increase efficiency s Kernels are generally multithreaded Operating System Concepts – 8th Edition 4.4 Silberschatz, Galvin and Gagne ©2009
  5. Single and Multithreaded Processes Operating System Concepts – 8th Edition 4.5 Silberschatz, Galvin and Gagne ©2009
  6. Benefits s Responsiveness s Resource Sharing s Economy s Scalability Operating System Concepts – 8th Edition 4.6 Silberschatz, Galvin and Gagne ©2009
  7. Multicore Programming s Multicore systems putting pressure on programmers, challenges include: q Dividing activities q Balance q Data splitting q Data dependency q Testing and debugging Operating System Concepts – 8th Edition 4.7 Silberschatz, Galvin and Gagne ©2009
  8. Multithreaded Server Architecture Operating System Concepts – 8th Edition 4.8 Silberschatz, Galvin and Gagne ©2009
  9. Concurrent Execution on a Single-core System Operating System Concepts – 8th Edition 4.9 Silberschatz, Galvin and Gagne ©2009
  10. Parallel Execution on a Multicore System Operating System Concepts – 8th Edition 4.10 Silberschatz, Galvin and Gagne ©2009
  11. User Threads s Thread management done by user-level threads library s Three primary thread libraries: q POSIX Pthreads q Win32 threads q Java threads Operating System Concepts – 8th Edition 4.11 Silberschatz, Galvin and Gagne ©2009
  12. Kernel Threads s Supported by the Kernel s Examples q Windows XP/2000 q Solaris q Linux q Tru64 UNIX q Mac OS X Operating System Concepts – 8th Edition 4.12 Silberschatz, Galvin and Gagne ©2009
  13. Multithreading Models s Many-to-One s One-to-One s Many-to-Many Operating System Concepts – 8th Edition 4.13 Silberschatz, Galvin and Gagne ©2009
  14. Many-to-One s Many user-level threads mapped to single kernel thread s Examples: q Solaris Green Threads q GNU Portable Threads Operating System Concepts – 8th Edition 4.14 Silberschatz, Galvin and Gagne ©2009
  15. Many-to-One Model Operating System Concepts – 8th Edition 4.15 Silberschatz, Galvin and Gagne ©2009
  16. One-to-One s Each user-level thread maps to kernel thread s Examples q Windows NT/XP/2000 q Linux q Solaris 9 and later Operating System Concepts – 8th Edition 4.16 Silberschatz, Galvin and Gagne ©2009
  17. One-to-one Model Operating System Concepts – 8th Edition 4.17 Silberschatz, Galvin and Gagne ©2009
  18. Many-to-Many Model s Allows many user level threads to be mapped to many kernel threads s Allows the operating system to create a sufficient number of kernel threads s Solaris prior to version 9 s Windows NT/2000 with the ThreadFiber package Operating System Concepts – 8th Edition 4.18 Silberschatz, Galvin and Gagne ©2009
  19. Many-to-Many Model Operating System Concepts – 8th Edition 4.19 Silberschatz, Galvin and Gagne ©2009
  20. Two-level Model s Similar to M:M, except that it allows a user thread to be bound to kernel thread s Examples q IRIX q HP-UX q Tru64 UNIX q Solaris 8 and earlier Operating System Concepts – 8th Edition 4.20 Silberschatz, Galvin and Gagne ©2009
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
4=>1