• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/35

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

35 Cards in this Set

  • Front
  • Back

4 conditions needed for deadlock

1. No preemption


2. Circular wait


3. Hold and wait


4. Mutual exclusion

Deadlock prevention techniques

Prevent any of the 4 conditions needed

Deadlock avoidance technique

Banker's algorithm

Vectors needed in the banker's algorithm

1. Allocated


2. Max


3. Need


4. Available

Deadlock detection technique for system with one instance of each resource type.

Wait-for graph (remove the resource nodes and collapse its edges). A cycle means there is a deadlock.

Deadlock detection technique for system with multiple instances of each resource type.

Use something similar to banker's algorithm with vectors: Allocation, Request, Available.

Ways to recover from deadlock.

1. Abort all deadlocked processes or,


2. Abort one process at a time until the deadlock cycle is eliminated.

Issues with resource preemption.

1. Selecting a victim


2. Rollback considerations


3. Starvation

Base register

Holds the smallest legal physical memory address

Limit register

Specifies the size of the range

Describe swapping

A process can be temporarily swapped out of memory into a backing store and then swapped back in when needed. This allows the total physical address space of all processes that is needed to exceed the capacity.

First fit

Find the first hole big enough for the process.



Best fit

Find the smallest hole the process can fit into.

Worst fit

Get the biggest hole available for the process.

Internal fragmentation vs. external fragmentation

External fragmentation: There is enough memory available for the process, but it is not contiguous.




Internal fragmentation: Physical memory is broken down into blocks and memory is allocated based on block size. Holes can be left within that block - those are internal.

Segment table

User provides two-dimensional address (segment # and offset). The segments must be mapped to actual physical address. Each entry in the table has a segment base and a segment limit.

Page

Refers to block of logical memory

Frame

Refers to a block of physical memory

TLB

Translation lookaside buffer - smaller, faster version of the page table allowing for faster lookup of the page to frame mapping

Page table

Maps the page to the frame, uses offset

RAID

Redundant arrays of independent disks

RAID 0

Non-redundant striping

RAID 1

Mirrored discks

RAID 2

Memory style error-correcting codes

RAID 3

bit-interleaved parity

RAID 4

Block interleaved parity

RAID 5

Block interleaved distributed parity

RAID 6

P + Q redundancy (error correcting codes used instead of parity bits).

5 disk scheduling algorithms

1. FCFS


2. Scan (elevator)


3. C-Scan


4. SSTF (shortest seek time first)


5. Look

7 Directory operations

1. Read


2. Write


3. Append


4. Delete


5. Copy


6. Execute


7. Change protection

LRU (virtual memory)

Least-recently used


There is a clock or counter on the system and the page has a time-of-use field. When the page is accessed by the memory, it gets the counter timestamp on it. The oldest one can then be selected as the victim to get swapped out of memory and put onto backing store.

Second-chance algorithm (virtual memory)

A page gets a reference bit. If it gets modified since it was loaded into memory then we don't select it as a victim. If it the bit is zero, when it's turn comes up according to the FIFO algorithm, then we can get rid of it. If we do skip over it, we set the bit to 0 because it only gets one second chance.

How to detect thrashing

Page fault frequency: too many faults means thrashing. Not enough faults means it has too many frames so we take some of its processes away.

What is a dirty bit used for?

In page replacement, it prevents us from unnecessarily doubling time to get rid of old page and bring in new page. If the bit is 1, we know we have to write out that page's contents to memory before we dump it. If it's 0, then it hasn't been updated since last added to memory so we won't have to re-write it and will thus save some time.

When is a process thrashing?

When it is spending more time paging than executing.