Segment processes threads pc t2 pc t1 pc t3 26

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: pport two enFFes:   the process, which defines the address space and general process agributes (such as open files, etc.)   the thread, which defines a sequenMal execuMon stream within a process   A thread is bound to a single process / address space   address spaces, however, can have mulMple threads execuMng within them   sharing data between threads is cheap: all see the same address space   creaMng threads is cheap too!   Threads become the unit of scheduling   processes / address spaces are just containers in which threads execute 25 May 2012 Processes & Threads 22 University of Washington Threads     Threads are concurrent execuFons sharing an address space (and some OS resources) Address spaces provide isolaFon   If you can’t name it, you can’t read or write it   Hence, communicaFng between processes is expensive   Must go through the OS to move data from one address space to another   Because threads are in the same address space, communicaFon is simple/cheap   Just update a shared variable! 25 May 2012 Processes & Threads 23 University of Washington The design space Key older UNIXes MS/DOS address space thread one thread per process one process Java many threads per process one process 25 May 2012 one thread per process man...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online