{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter04-OS7e - Operating Systems Internals and Design...

Info icon This preview shows pages 1–13. 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
Image of page 1

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

View Full Document Right 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
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
Image of page 3

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

View Full Document Right 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
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
Image of page 5

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

View Full Document Right 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
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
Image of page 7

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

View Full Document Right Arrow Icon
One or More Threads  in a Process
Image of page 8
Threads vs. Processes 
Image of page 9

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

View Full Document Right Arrow Icon
Benefits of Threads
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
Image of page 11

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

View Full Document Right Arrow Icon
Threads n
Image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern