tailieunhanh - Lecture Operating system concepts - Chapter 5: Threads
The process model introduced in Chapter 4 assumed that a process was an executing program with a single thread of control. Many modern operating systems now provide features for a process to contain multiple threads of control. This chapter introduces many concepts associated with multithreaded computer systems and covers how to use Java to create and manipulate threads. We have found it especially useful to discuss how a Java thread maps to the thread model of the host operating system. | Chapter 5: Threads n Overview n Multithreading Models n Threading Issues n Pthreads n Solaris 2 Threads n Windows 2000 Threads n Linux Threads n Java Threads Operating System Concepts Silberschatz, Galvin and Gagne ©2002 Single and Multithreaded Processes Operating System Concepts Silberschatz, Galvin and Gagne ©2002 1 Benefits n Responsiveness n Resource Sharing n Economy n Utilization of MP Architectures Operating System Concepts Silberschatz, Galvin and Gagne ©2002 User Threads n Thread management done by user-level threads library n Examples - POSIX Pthreads - Mach C-threads - Solaris threads Operating System Concepts Silberschatz, Galvin and Gagne ©2002 2 Kernel Threads n Supported by the Kernel n Examples - Windows 95/98/NT/2000 - Solaris - Tru64 UNIX - BeOS - Linux Operating System Concepts Silberschatz, Galvin and Gagne ©2002 Multithreading Models n Many-to-One n One-to-One n Many-to-Many Operating System Concepts Silberschatz, Galvin and Gagne ©2002 3 Many-to-One n Many user-level threads mapped to single kernel thread. n Used on systems that do not support kernel threads. Operating System Concepts Silberschatz, Galvin and Gagne ©2002 Many-to-One Model Operating System Concepts Silberschatz, Galvin and Gagne ©2002 4 One-to-One n Each user-level thread maps to kernel thread. n Examples - Windows 95/98/NT/2000 - OS/2 Operating System Concepts Silberschatz, Galvin and Gagne ©2002 One-to-one Model Operating System Concepts Silberschatz, Galvin and Gagne .
đang nạp các trang xem trước