lec02-concurency

lec02-concurency - CS162 Operating Systems and Systems...

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

View Full Document Right Arrow Icon
CS162 Operating Systems and Systems Programming Lecture 2 Concurrency: Processes, Threads, and Address Spaces January 23, 2012 Anthony D. Joseph and Ion Stoica http://inst.eecs.berkeley.edu/~cs162
Background image of page 1

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

View Full DocumentRight Arrow Icon
Lec 1.2 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Very Brief History of OS Several Distinct Phases: Hardware Expensive, Humans Cheap » Eniac, … Multics Hardware Cheaper, Humans Expensive » PCs, Workstations, Rise of GUIs Hardware Really Cheap, Humans Really Expensive » Ubiquitous devices, Widespread networking Rapid Change in Hardware Leads to changing OS Batch Multiprogramming Timeshare Graphical UI Ubiquitous Devices Gradual Migration of Features into Smaller Machines Situation today is much like the late 60s Small OS: 100K lines/Large: 10M lines (5M browser!) 100-1000 people-years
Background image of page 2
Lec 1.3 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Review: Migration of OS Concepts and Features
Background image of page 3

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

View Full DocumentRight Arrow Icon
Lec 1.4 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Implementation Issues (How is the OS implemented?) Policy vs. Mechanism Policy: What do you want to do? Mechanism: How are you going to do it? Should be separated, since policies change Algorithms used Linear, Tree-based, Log Structured, etc… Event models used Threads vs. event loops Backward compatibility issues Very important for Windows 2000/XP/Vista/… POSIX tries to help here System generation/configuration How to make generic OS fit on specific hardware
Background image of page 4
Lec 1.5 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Goals for Today How do we provide multiprogramming? What are processes ? How are they related to threads and address spaces ? Note: Some slides and/or pictures in the following are adapted from slides ©2005 Silberschatz, Galvin, and Gagne. Slides courtesy of Anthony D. Joseph, John Kubiatowicz, AJ Shankar, George Necula, Alex Aiken, Eric Brewer, Ras Bodik, Ion Stoica, Doug Tygar, and David Wagner.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Lec 1.6 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Threads Unit (“thread”) of execution: Independent Fetch/Decode/Execute loop Unit of scheduling Operating in some address space
Background image of page 6
Lec 1.7 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Fetch Exec R0 R31 F0 F30 PC Data1 Data0 Inst237 Inst236 Inst5 Inst4 Inst3 Inst2 Inst1 Inst0 Addr 0 Addr 2 32 -1 Recall (61C): What happens during execution? Execution sequence: Fetch Instruction at PC Decode Execute (possibly using registers) Write results to registers/mem PC = Next Instruction(PC) Repeat PC PC PC PC
Background image of page 7

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

View Full DocumentRight Arrow Icon
Lec 1.8 1/22/12 Anthony D. Joseph and Ion Stoica CS162 ©UCB Spring 2012 Uniprograming vs. Multiprograming Uniprogramming: one thread at a time MS/DOS, early Macintosh, Batch processing Easier for operating system builder Get rid of concurrency (only one thread accessing resources!) Does this make sense for personal computers?
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.

Page1 / 44

lec02-concurency - CS162 Operating Systems and Systems...

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