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

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. | Chapter 4: Threads 1 Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads 2 Objectives To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems To discuss the APIs for the Pthreads, Win32, and Java thread libraries To examine issues related to multithreaded programming Motivation Threads run within application Multiple tasks with the application can be implemented by separate threads Update display Fetch data Spell checking Answer a network request Process creation is heavy-weight while thread creation is light-weight Can simplify code, increase efficiency Kernels are generally multithreaded Single and Multithreaded Processes 5 Benefits Responsiveness Resource Sharing Economy Scalability 6 Multicore Programming Multicore systems putting pressure on programmers, challenges include: Dividing activities Balance Data splitting Data dependency Testing and debugging Multithreaded Server Architecture Concurrent Execution on a Single-core System Parallel Execution on a Multicore System User Threads Thread management done by user-level threads library Three primary thread libraries: POSIX Pthreads Win32 threads Java threads 11 Kernel Threads Supported by the Kernel Examples Windows XP/2000 Solaris Linux Tru64 UNIX Mac OS X 12 Multithreading Models Many-to-One One-to-One Many-to-Many 13 Many-to-One Many user-level threads mapped to single kernel thread Examples: Solaris Green Threads GNU Portable Threads 14 Many-to-One Model 15 One-to-One Each user-level thread maps to kernel thread Examples Windows NT/XP/2000 Linux Solaris 9 and later 16 One-to-one Model 17 Many-to-Many Model Allows many user level threads to be mapped to many kernel threads Allows the operating system to create a sufficient number of kernel threads Solaris prior to version 9 Windows NT/2000 with the ThreadFiber package 18 Many-to-Many . | Chapter 4: Threads 1 Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads 2 Objectives To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems To discuss the APIs for the Pthreads, Win32, and Java thread libraries To examine issues related to multithreaded programming Motivation Threads run within application Multiple tasks with the application can be implemented by separate threads Update display Fetch data Spell checking Answer a network request Process creation is heavy-weight while thread creation is light-weight Can simplify code, increase efficiency Kernels are generally multithreaded Single and Multithreaded Processes 5 Benefits Responsiveness Resource Sharing Economy Scalability 6 Multicore Programming Multicore systems putting pressure on programmers, challenges include: Dividing activities Balance Data .

TỪ KHÓA LIÊN QUAN