04_thread

04_thread - Chapter 4: Threads Chapter Chapter 4: Threads...

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

View Full Document Right Arrow Icon
Chapter 4: Threads Chapter 4: Threads
Background image of page 1

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

View Full DocumentRight Arrow Icon
4.2 Modified by Bo Li ©2009 Operating System Concepts Chapter 4: Threads Chapter 4: Threads ± Multithreading Models ± Examples ± Thread state ± User and kernel threads
Background image of page 2
4.3 Modified by Bo Li ©2009 Operating System Concepts Thread and Motivations Thread and Motivations ± A thread is a basic unit of CPU utilization; it comprises of a thread ID, a program counter, a register set and a stack. ± Typically, a process has multiple threads, so a thread can share with other threads within the same process its code section, data section, the other resources such as open files and signals ± A traditional (or heavy-weight) process has a single thread of control. If a process has multiple threads (for execution), it can perform more than one task at a time (concurrency and efficiency) ± A thread is considered to be a light-weighted process , its creation, manipulation is much simpler than a process
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.4 Modified by Bo Li ©2009 Operating System Concepts Threads Threads ± Thread: a sequential execution stream within an process z Process still contains a single address apace z Little if any protections between threads (with the same process) ± Multithreading: a single program made up of a number of different concurrent activities z Sometimes called multitasking , ± Why separate the concept of a thread from that of a process? z Discuss the “thread” part of a process (concurrency) z Separate from the “address space” (Protection) z Heavyweight Process Process with one thread ± Benefits z Responsiveness z Resource Sharing z Economy z Utilization of multi-processors architectures
Background image of page 4
4.5 Modified by Bo Li ©2009 Operating System Concepts
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.

This note was uploaded on 09/24/2010 for the course COMP 252 taught by Professor Wong during the Fall '09 term at HKUST.

Page1 / 16

04_thread - Chapter 4: Threads Chapter Chapter 4: Threads...

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