Chapter04-OS7e - Operating Systems Internals and Design Principles n SeventhEdition n ByWilliamStallings Chapter4 Threads OperatingSystems contri

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

View Full Document Right Arrow Icon
Chapter 4 Threads n Seventh Edition n By William Stallings Operating  Systems: Internals  and  Design  Principles
Background image of page 1

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

View Full DocumentRight Arrow Icon
Operating Systems: Internals and Design Principles The basic idea is that the several  components in any complex system will  perform particular subfunctions that  contribute to the overall function. THE SCIENCES OF THE ARTIFICIAL,  Herbert Simon
Background image of page 2
Processes and Threads n Resource Ownership      Process includes a virtual  address space to hold the  process image n the OS performs a  protection function to  prevent unwanted  interference between  processes with respect to  resources n Scheduling/Execution Processes have two characteristics: Follows an execution path  that may be interleaved with  other processes n a process has an execution state  (Running, Ready, etc.) and a  dispatching priority and is  scheduled and dispatched by the  OS
Background image of page 3

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

View Full DocumentRight Arrow Icon
Processes and Threads n The unit of dispatching is referred to as a  thread  or  lightweight process n The unit of resource ownership is referred to  as a  process  or  task n Multithreading -  The ability of an OS to  support multiple, concurrent paths of  execution within a single process
Background image of page 4
Single Threaded Approaches n A single thread of  execution per process,  in which the concept of  a thread is not  recognized, is referred  to as a single-threaded  approach n MS-DOS is an  example
Background image of page 5

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

View Full DocumentRight Arrow Icon
Multithreaded Approaches n The right half of Figure  4.1 depicts  multithreaded  approaches n A Java run-time  environment is an  example of a system of  one process with  multiple threads
Background image of page 6
Processes § The unit of resource allocation and a unit of protection § A virtual address space that holds the process image § Protected access to: Ø processors Ø other processes  Ø files Ø I/O resources
Background image of page 7

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
Background image of page 8
Threads vs. Processes 
Background image of page 9

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

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

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

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

This note was uploaded on 12/14/2011 for the course CS 490 taught by Professor Weisskop during the Fall '11 term at University of Alabama - Huntsville.

Page1 / 54

Chapter04-OS7e - Operating Systems Internals and Design Principles n SeventhEdition n ByWilliamStallings Chapter4 Threads OperatingSystems contri

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

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