Threads Overview

Threads Overview - Threads Source: Operating System...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSC 4103: Operating System Threads Source: Operating System Concepts by Silberschatz, Galvin and Gagne.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 CSC 4103: Operating System Overview Process can have a single thread of control or activity multiple threads of control or activity. A thread is a flow of control within a process a basic unit of CPU utilization – also called a LWP thread ID, program counter, register set and stack all threads share the same address space of their process. Multithreaded computer systems are common. e.g., desktop PCs Web browser can have two threads, one for display and the other for data retrieving. Pthreads Win32 Threads Java Threads
Background image of page 2
3 CSC 4103: Operating System Single and Multithreaded Processes Threads belonging to a given process share with each other code section, data section and other resources, e.g., open files.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 CSC 4103: Operating System Benefits Increased responsiveness to user: A program continues running with other threads even if part of it is blocked or performing a lengthy operation in one thread. Resource Sharing Threads share memory and resources of their process. Economy Less time consuming to create and manage threads than processes as threads share resources, e.g., thread creating is 30 times faster than process creating in Solaris. Utilization of Multiprocessor Architectures Increases concurrency because each thread can run in parallel on a different processor.
Background image of page 4
CSC 4103: Operating System Thread Types User Threads Threads are implemented at the user level by a thread library Library provides support for thread creation, scheduling and management. User threads are fast to create and manage. Kernel Threads Supported and managed directly by the OS. Thread creation, scheduling and management take place in kernel space. Slower to create and manage.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 21

Threads Overview - Threads Source: Operating System...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online