Lecture Notes for Operating Systems Concepts
19 September 2001 - Process Management
- processes and resources - a process holds the resources need to
compute; process manager creates the process abstraction
- implementing processes
- a process descriptor (task control block) - home to the allocated
resources; associated with an id that names the process
- resources - memory (code and data), cpu (process state), others
- creation - allocating resources to the process descriptor
- scheduling - allocating the cpu
- protection and sharing
- implementing resources
- the resource managers create resource abstractions for processes
- not all resources can be allocated at process create time
- resource managers coordinate with other resource managers and the
process manager - files use disk and memory; not enough memory
suspends the process
- os initialization
- system boot-time - why's it take so long
- power-up reads and executes a small block of code from rom or disk
- the boot code reads and executes another block of code (usually) - can
go on several more times
- process address spaces - where process resources are stored; only the
address space is accessible; code and data reside in the address space
- creation - compilation (
.o
) to linking (.o
and .a
) to
loading (a.out
)
- process loading - reading in the executable, starting execution
- address space consistency
- there are many memories - registers, cache, primary, secondary
- to improve performance, parts process state may be copied
- changing state while keeping all copies the same - the consistency
problem
- the process abstraction - resource accounting; who's got what, who needs
what.
- process descriptors - information and resources about a process
- process state - describes the process's behavior
- states - running, waiting, blocked
- state diagram - indicates the transitions between states, and how
- the resource abstraction - resource managers implement resource
abstractions
- resource types and finite counts
- absence of a particular resource blocks the requesting process
- consumable or reusable resources
- resource blocking is unpredictable, both in occurrence and duration
- process hierarchy - how one process relates to others; parent-child hierarchy
- new process states - a more complicated process state diagram
- processes directly affecting one another - suspend, continue, kill
- a process may affect itself - sleeping or yielding
- the different possible states grows rapidly
- where do resource manages live - efficiency vs convenience
- the os provides mechanism, the process provides policy
- threads are an example - process implemented schedulers
- vm and microkernel operating systems, real-time os
This page last modified on 17 September 2001.