Threads become the unit of scheduling processes

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: instrucMon   a set of general ­purpose processor registers and their values   25 May 2012 Processes & Threads 19 University of Washington How could we achieve this?   Given the process abstracFon as we know it:   fork several processes   cause each to map to the same physical memory to share data     see the shmget() system call for one way to do this (kind of) This is like making a pig fly – it’s really inefficient   space: PCB, page tables, etc.   Mme: creaMng OS structures, fork/copy address space, etc.   Some equally bad alternaFves for some of the examples:   EnMrely separate web servers   Manually programmed asynchronous programming (non ­blocking I/O) in the web client (browser) 25 May 2012 Processes & Threads 20 University of Washington Can we do beler?   Key idea:   separate the concept of a process (address space, OS resources)   … from that of a minimal “thread of control” (execuMon state: stack, stack pointer, program counter, registers)   This execuFon state is usually called a thread, or someFmes, a lightweight process thread 25 May 2012 Processes & Threads 21 University of Washington Threads and processes   Most modern OS’s (Mach (Mac OS X), Chorus, Windows, UNIX) therefore su...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online