3_process - Processes Chapter 3 1 Introduction: Von Neuman...

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

View Full Document Right Arrow Icon
1 Processes C ha pte r 3
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 Introduction: Von Neuman Model Both text (program) and data reside in memory Execution stages: Fetch instruction Decode instruction Execute instruction Write back result OS is just a program OS text and data reside in memory too Invoke OS functionality through procedure calls CPU Memory
Background image of page 2
3 Execution Mode Two modes of execution for protection reasons Privileged - kernel-mode Non-privileged - user-mode Kernel executes in kernel-mode Access hardware resources Protected from interference by user programs Portion of the OS User code executes in user-mode OS functionality that does not need direct access to hardware may run in  user-mode Microkernel design basis
Background image of page 3

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

View Full DocumentRight Arrow Icon
4  Interrupts and traps Interrupt: an asynchronous event External event Independent instruction execution in the processor E.g. DMA completion Can be masked (specifically or not)  Trap: a synchronous software event Synchronous event Caused by the execution of the current instruction E.g. system calls, floating point error Conditional or unconditional
Background image of page 4
5 More Interrupts and Traps Interrupt and trap events Statically defined (typically as integers) Each interrupt and trap has an associated interrupt vector Interrupt vector specifies handler Code that should be called when the event occurs At interrupt or trap, processor  Saves current state of execution Jumps to the handler interrupt code restore
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Process An  instantiation  of a program System abstraction  Set of resources for executing a program Execution context(s) Address space File handlers, communication endpoints, etc. Historically: all  lumped  into a single abstraction More recently: split into several abstractions Threads Address space Protection domain etc.
Background image of page 6
7 OS Process Management: Supports creating, destroying, etc. processes Supports interprocess communication (IPC)  Allocates resources to process(es) According to specific policies Interleaves multiple processes Multi-tasking, multi-processing Why? Increase system utilization Increase average response and turn-around time
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Process Image The physical representation of a process in the OS A process control structure includes  Control information: Scheduling (process state, process priority) Resources (memory, opened files) IPC facilities used Execution contexts   threads  program counter, CPU registers, thread execution stack Identification information: Process ID, parent process ID, user ID An address space Code, data, and stack segments
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 / 53

3_process - Processes Chapter 3 1 Introduction: Von Neuman...

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