1/82
Looks like no tags are added yet.
Deadlock
permanent blocking of a set of processes due to competition for some resource
Fatal region
grey area of a joint progress diagram, deadlock inevitable. Both processes are waiting on a resource held by the other and neither will release

Three conditions for a deadlock
Mutual exclusion, hold and wait, no preemption, circular wait
circular wait
a closed chain of processes exists, such that each process holds at least one
resource needed by the next process in the chain.
joint progress diagram
depicts the progress of processes competing for resources
resource allocation graph
A directed graph that depicts the state of system resources and processes.
Each resource or process is represented by a node.
each dot on R represents how many there are of it
deadlock prevention
constrain resource requests to prevent at least one of the four conditions of deadlock
indirectly, by preventing one of the three necessary policy conditions (mutual exclusion, hold and wait, no preemption)
Directly, by preventing circular wait
Processes must be cooperating
Deadlock Avoidance
allows the three necessary conditions but makes dynamic choices to assure that the deadlock point is never reached (allows more concurrency)
Banker’s Algorithm
an approach to determining when to grant a resource request to maintain the
system in a (deadlock) safe state.
State
The current allocation of resources to a process (Banker’s Algorithm)
Safe state
there is at least one sequence of resource allocations that does not result in a deadlock (Banker’s Algorithm)
Unsafe State
Any resource allocations will result in a deadlock (Banker’s Algorithm)
Deadlock detection
Periodically check for a deadlock and take action to recover
Dispatcher object
Kernel level primitive in windows used for synchronization and thread scheduling (can be waitable and can be set to signalled)
Internal fragmentation
Fragmentation within the memory partition allotted to a process.
External fragmentation
Fragmentation of memory between loaded processes
Compact
occasionally pause running programs, and copy process' memory to eliminate gaps.
dynamic relocation
the ability to move a program in memory without invalidating its memory references
logical address
a reference to a memory location independent of the current assignment of data to
memory - requires a translation to a physical address to actually access memory
relative address
a particular kind of logical address that is expressed relative to a known point - usually
relative to a value in a processor register
physical address
an absolute location in main memory
page
a relatively small, fixed-sized block of a process' memory
frame
a relatively small, fixed-sized block of available memory
simple paging
Dividing main memory into a number of equal size frames is the ________ technique.
where pages are mapped to memory frames
invisible to programmer
internal fragmentation
dynamic run-time loading
a module is brought into memory (loaded)while the program is running when it’s actually needed, or all at startup. Modules are managed like a separate program and uses paging so sharing across different programs is possible
Simple Segmentation
Each process is divided into
a number of segments. A
process is loaded by loading
all of its segments into
dynamic partitions that need
not be contiguous.
Virtual Memory Paging
As with simple paging,
except that it is not
necessary to load all of the
pages of a process.
Nonresident pages that are
needed are automatically
brought in later.
Virtual Memory Segmentation
As with simple segmentation,
except that it is not
necessary to load all of the
segments of a process.
Nonresident segments that
are needed are automatically
brought in later.
Virtual Memory
memory management scheme that lets a process run when only part of it is in main memory, with the rest kept on secondary storage (disk) and brought in on demand
Swapping individual pages of a process in and out of memory based on what memory is actually being used right now
dynamic linking
linking after compilation
load-time dynamic linking
dynamic linking that happens when your program loads
run-time dynamic linking
dynamic linking that happens when your program explicitly requests to load
a shared module
Principle of locality
applications often spend long periods of time (hundreds, thousands or millions of instructions) reading/writing memory in roughly the same area
Real address
The address of a storage location in main memory.
Address space
The range of memory addresses available to a process
Virtual address space
The virtual storage assigned to a process
Virtual address
The address assigned to a location in virtual memory to allow that
location to be accessed as though it were part of main memory.
resident set
the set of memory pages that are currently in memory
real memory
the actual main memory available on the computer
virtual memory
the total amount of memory that a programmer can use - made up of the main memory and secondary memory allotted to the process.
Thrashing
when the OS unloads a process just before it turns out to be needed again
Two level page table
a hierarchical memory management scheme that uses a top-level directory and secondary tables for processes with massive virtual address space
inverted page table
memory management architecture where the page table has one entry for every physical frame in RAM, rather than one entry for every virtual page (via a hash table with linked lists)
Translation lookaside buffer
a high-speed hardware cache inside the CPU's Memory Management Unit (MMU) of the most-recently-used (MRU) page table entries (recent virtual-to-physical address translations)
Page fault
the general name for an interrupt that tells the OS that the processor encountered a miss in
the TLB cache, had to consult the actual page table, and then found that the present bit was not set in the actual page table
Long term scheduling
The decision to add to the pool of processes to be executed
Medium term scheduling
The decision to add to the number of processes that are partially or
fully in main memory
Short term scheduling
The decision as to which available process will be executed by the
processor
I/O scheduling
The decision as to which process's pending I/O request shall be handled by an
available I/O device
Turnaround time
This is the interval of time between the submission of a process and its
completion. Includes actual execution time plus time spent waiting for resources, including the processor. This is an appropriate measure for a batch job.
Response time
For an interactive process, this is the time from the submission of a request until
the response begins to be received. Often a process can begin producing some output to the user while continuing to process the request. Thus, this is a better measure than turnaround time from the user's point of view. The scheduling discipline should attempt to achieve low response time and to maximize the number of interactive users receiving acceptable response time.
Deadlines
When process completion deadlines can be specified, the scheduling discipline
should subordinate other goals to that of maximizing the percentage of deadlines met.
Predictability
A given job should run in about the same amount of time and at about the same
cost regardless of the load on the system. A wide variation in response time or turnaround time is distracting to users. It may signal a wide swing in system workloads or the need for system tuning to cure instabilities
Throughput
The scheduling policy should attempt to maximize the number of processes
completed per unit of time. This is a measure of how much work is being performed. This clearly depends on the average length of a process but is also influenced by the scheduling policy, which may affect utilization.
Processor utilization
This is the percentage of time that the processor is busy. For an expensive shared system, this is a significant criterion. In single-user systems and in some other systems, such as real-time systems, this criterion is less important than some of the others
Fairness
In the absence of guidance from the user or other system-supplied guidance,
processes should be treated the same, and no process should suffer starvation
Enforcing priorities
When processes are assigned priorities, the scheduling policy should
favor higher-priority processes.
Balancing resources
The scheduling policy should keep the resources of the system busy.
Processes that will underutilize stressed resources should be favored. This criterion also involves medium-term and long-term scheduling.
decision mode
the instance in time when a selection function is exercised
nonpremptive selection
once a process is in Running state, it continues to execute until (a) it
terminates or (b) it blocks itself (eg for I/O, a system call, etc.)
preemptive selection
The OS may interrupt the currently-running process and move it to a
non-running state. E.g., because a new process has arrived and changed the system dynamic, a clock interrupt has occurred, etc
time quantum
how long a process is allowed to run before it is preempted in favor of another process.
time slicing
After a period of time, if the process has not terminated or blocked, a clock interrupt will
interrupt it anyway, and the OS can move it to the back of the "ready" queue and pick the next process
demand paging
a page is brought into memory when a reference is made to something on that page.
prepaging
when a process is first started, bring several pages into memory.
replacement policy
selecting a page in main memory to be kicked out (replaced) when a new page must be
brought in.
resident set management
decides how many frames each process gets (fixed or variable allocation) and whether a page fault can evict pages from only that process or from any process (local or global scope)
replacement policy
rule for choosing which specific page to evict from the allowed pool, such as LRU, FIFO, or clock
locked frame
a frame that contains a page that may not be replaced - it must stay in memory.
fixed allocation policy
a process gets a fixed number of frames in main memory
variable allocation policy
the number of page frames allocated to a process may be varied over the
lifetime of a process
Local replacement scope
another page of P must be chosen to be replaced
Global replacement scope
a page from another process than P may be chosen to be replaced to make room for P's page.
working set
the set of pages that are being referenced regularly for a process
demand cleaning
a page is written to secondary memory only when it is selected for replacement
precleaning
a page is written to secondary memory while still allocated to a frame
allows for batch writes
cleaning policy
policy dictating when should a modified page be written out to secondary memory
multiprogramming level
How many processes will be allowed to be resident in main memory?
L=S criterion
Load control algorithm that adjusts the multiprogramming level dynamically so that the mean time between faults is equal to the mean time required to process a page fault.
50% criterion
Load control algorithm that keeps utilization of the paging device (secondary storage) at approximately 50%
Monitor the clock algorithm
load control method that watches how fast the clock replacement pointer sweeps around the circular buffer of resident pages.
A slow scan rate means few page faults or many readily replaceable pages, so memory isn’t under pressure and the OS can safely increase the multiprogramming level.
Process suspension policies
Lowest-priority, Faulting process, Last process activated, Process with smallest resident set, Largest process, Process with largest remaining execution window
done when you reduce the multiprogramming level
Fair share scheduling
divides CPU time fairly among groups of processes instead of among individual processes so that no processes with a higher amount of individuals overtake