Bài giảng Operating System Concepts - Chapter 5: Threads

Tài liệu Bài giảng Operating System Concepts - Chapter 5: Threads: Chapter 5: ThreadsOverviewMultithreading ModelsThreading IssuesPthreadsSolaris 2 ThreadsWindows 2000 ThreadsLinux ThreadsJava ThreadsOperating System ConceptsSingle and Multithreaded ProcessesOperating System ConceptsBenefitsResponsiveness Resource Sharing Economy Utilization of MP ArchitecturesOperating System ConceptsUser ThreadsThread management done by user-level threads library Examples - POSIX Pthreads - Mach C-threads - Solaris threadsOperating System ConceptsKernel ThreadsSupported by the Kernel Examples - Windows 95/98/NT/2000 - Solaris - Tru64 UNIX - BeOS - LinuxOperating System ConceptsMultithreading ModelsMany-to-One One-to-One Many-to-ManyOperating System ConceptsMany-to-OneMany user-level threads mapped to single kernel thread. Used on systems that do not support kernel threads.Operating System ConceptsMany-to-One ModelOperating System ConceptsOne-to-OneEach user-level thread maps to kernel thread. Examples - Windows 95/98/NT/2000 - OS/2Operating System ConceptsOne-to-on...

ppt20 trang | Chia sẻ: honghanh66 | Ngày: 17/03/2018 | Lượt xem: 284 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Bài giảng Operating System Concepts - Chapter 5: Threads, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Chapter 5: ThreadsOverviewMultithreading ModelsThreading IssuesPthreadsSolaris 2 ThreadsWindows 2000 ThreadsLinux ThreadsJava ThreadsOperating System ConceptsSingle and Multithreaded ProcessesOperating System ConceptsBenefitsResponsiveness Resource Sharing Economy Utilization of MP ArchitecturesOperating System ConceptsUser ThreadsThread management done by user-level threads library Examples - POSIX Pthreads - Mach C-threads - Solaris threadsOperating System ConceptsKernel ThreadsSupported by the Kernel Examples - Windows 95/98/NT/2000 - Solaris - Tru64 UNIX - BeOS - LinuxOperating System ConceptsMultithreading ModelsMany-to-One One-to-One Many-to-ManyOperating System ConceptsMany-to-OneMany user-level threads mapped to single kernel thread. Used on systems that do not support kernel threads.Operating System ConceptsMany-to-One ModelOperating System ConceptsOne-to-OneEach user-level thread maps to kernel thread. Examples - Windows 95/98/NT/2000 - OS/2Operating System ConceptsOne-to-one ModelOperating System ConceptsMany-to-Many ModelAllows many user level threads to be mapped to many kernel threads.Allows the operating system to create a sufficient number of kernel threads.Solaris 2 Windows NT/2000 with the ThreadFiber packageOperating System ConceptsMany-to-Many ModelOperating System ConceptsThreading IssuesSemantics of fork() and exec() system calls.Thread cancellation.Signal handlingThread poolsThread specific dataOperating System ConceptsPthreadsa POSIX standard (IEEE 1003.1c) API for thread creation and synchronization.API specifies behavior of the thread library, implementation is up to development of the library.Common in UNIX operating systems.Operating System ConceptsSolaris 2 ThreadsOperating System ConceptsSolaris ProcessOperating System ConceptsWindows 2000 ThreadsImplements the one-to-one mapping.Each thread contains - a thread id - register set - separate user and kernel stacks - private data storage areaOperating System ConceptsLinux ThreadsLinux refers to them as tasks rather than threads.Thread creation is done through clone() system call.Clone() allows a child task to share the address space of the parent task (process)Operating System ConceptsJava ThreadsJava threads may be created by: Extending Thread classImplementing the Runnable interface Java threads are managed by the JVM.Operating System ConceptsJava Thread States Operating System Concepts

Các file đính kèm theo tài liệu này:

  • pptch5_4764.ppt
Tài liệu liên quan