Lecture10-intro-to-processes-part2 - Announcements Exercise...

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

View Full Document Right Arrow Icon
1 CS 3214 Computer Systems Godmar Back Lecture 10 Announcements • Exercise 4 due Sep 30 – Brand new! – Reverse-engineering and observation exercise • Project 3 due Oct 14 CS 3214 Fall 2011 THREADS AND PROCESSES Part 1 CS 3214 Fall 2011 Processes • Def: An instance of a program in execution • OS provides each process with key abstractions – Logical control flow • 1 flow – single-threaded process • Multiple flows – multi-threaded process – Private address space – Abstracted resources: e.g., stdout/stdin file descriptors • These abstractions create the illusion that each process has access to its own – CPU (or CPUs for multi-threaded processes) – Memory – Devices: e.g., terminal CS 3214 Fall 2011 A Context Switch Scenario Process 1 Process 2 Timer interrupt: P1 is preempted, context switch to P2 I/O device interrupt: P2’s I/O complete switch back to P2 CS 3214 Fall 2011 Kernel user mode kernel mode System call: (trap): P2 starts I/O operation, blocks context switch to process 1 Timer interrupt: P2 still has time left, no context switch Reasoning about Processes: Process States RUNNING Process must wait for event Scheduler picks process Process preempted CS 3214 Fall 2011 • Only 1 process (per CPU) can be in RUNNING state READY BLOCKED Event arrived
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Process States • RUNNING: – Process is on CPU, its instructions are executed • READY: – Process could make progress if a CPU were available • BLOCKED: – Process cannot make progress even if a CPU were available because it’s waiting for something (e.g., a resource, a signal, a
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/31/2011 for the course CS 3214 taught by Professor Staff during the Fall '11 term at Virginia Tech.

Page1 / 3

Lecture10-intro-to-processes-part2 - Announcements Exercise...

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

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