Lecture Notes for Operating Systems Concepts

23 September 2003 - Process Management


  1. the processor (or cpu)

    1. keep it busy - an idle processor is a waste

    2. keep it fair (for various definitions of fair) - predictable behavior

    3. this almost always involves sharing - unless you've got a lot of cpus

  2. job scheduling and process scheduling

    1. job scheduling - what to admit; the admissions policy

    2. process scheduling - what to run next

    3. also, recovery from poor decisions - what to punt

    4. this can be recursive - scheduling multiprocessors

  3. programs, processes, and threads

    1. program - computation to perform

    2. process - the resources needed to perform a computation

    3. thread - the processor abstraction

  4. processes

    1. a bag of resources needed for a computation - except for the cpu

    2. implementing resources

      1. the resource managers create resource abstractions for processes

      2. not all resources can be allocated at process create time

      3. resource managers coordinate with other resource managers and the process manager - files use disk and memory; not enough memory suspends the process

    3. process address spaces - where process resources are stored; only the address space is accessible; code and data reside in the address space

      1. creation - compilation (.o) to linking (.o and .a) to loading (a.out)

      2. process loading - reading in the executable, starting execution

      3. address space consistency

        1. there are many memories - registers, cache, primary, secondary

        2. to improve performance, parts process state may be copied

        3. changing state while keeping all copies the same - the consistency problem

    4. process control blocks - the actual bag

      1. identification, status, state, accounting

      2. frequently shifted from queue to queue within the os

    5. the process state and transitions

      1. where is the process now? where can it go next? how?

      2. states - running, waiting, blocked

      3. state diagram - indicates the transitions between states, and how

  5. process scheduling policies

    1. objectives - throughput, response time, turnaround time, waiting, utilization, fairness

    2. two tasks - when to swap out, what to swap in

    3. when to swap out - pre-emptive or non preemptive

      1. pre-emption - on natural boundries, on a time slice, or external factors

      2. non-pre-emptive - process cedes the cpu, or exits

    4. what to swap in - it's all priority scheduling

      1. fcfs, sjn, round robin, srt next, priority scheduling

    5. implementation - when one is not enough

      1. multi-level queues - implement different policies or different versions of the same policy


This page last modified on 23 September 2002.