lecture08-chapter04 - Operating Systems Operating Lecture...

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

View Full Document Right Arrow Icon
Operating Systems Operating Systems Lecture 08: Lecture 08: Threads Threads Anda Iamnitchi [email protected] 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Processes vs. Threads Processes vs. Threads A process viewed so far as units of: Resource ownership Scheduling/execution In multithreading OS: Process stays the unit of resource ownership Thread (or lightweight process ) is the unit of scheduling Multithreading: the ability of an OS to support multiple, concurrent paths of execution within a single process 2
Background image of page 2
3 Single vs. Multi-Threaded Approaches MSDOS Old UNIX Java Runtime Env Windows, Unix, etc
Background image of page 3

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

View Full DocumentRight Arrow Icon
One or More Threads in a Process Each thread in a process has: A thread execution state (Running, Ready, etc.) A saved thread context when not running; one way to view a thread is as an independent program counter operating within a process An execution stack Some per-thread static storage for local variables Access to the memory and resources of its process, shared with all other threads in that process 4
Background image of page 4
Threads vs. Processes 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Benefits of Threads 6
Background image of page 6
Thread Use in a Single-User System Foreground and background work Asynchronous processing Speed of execution Modular program structure 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Threads In an OS that supports threads, scheduling and dispatching is done on a thread basis Most of the state information dealing with execution is maintained in thread-level data structures
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/18/2012 for the course COP 4600 taught by Professor Andaiamnitchi during the Fall '08 term at University of South Florida - Tampa.

Page1 / 41

lecture08-chapter04 - Operating Systems Operating Lecture...

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

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