Test #3 Flashcards

(48 cards)

1
Q

Deadlock

A

Condition where a set of 2 or more procs are blocked and waiting for something from another proc in that set to do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

4 Necessary Conditions for Deadlock

A
  1. mutex
  2. hold and wait
  3. no preemption (cant take away resource I have)
  4. circular wait
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

4 Ways to deal with deadlock

A
  1. Ignore it
  2. detect and recover
  3. prevent
  4. avoid
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To prevent deadlock, which condition should you prevent

A
  1. circular wait
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does detect and recover work

A
  • delete one process and reallocate resources
  • rollback
  • tough decision will have to be made
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does Prevent work

A

Remove one of the four conditions that cause deadlock
1) Mutex BAD - lost update
2) hold and wait INEFFICIENT - get all resources before you start
3) no preemption BAD
4) Circular wait BEST - put priority on resources and allocate accordingly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Know the Bankers algorithm safety algorithm

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

R -> P

A

resource allocated to process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

P -> R

A

Process requesting resource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

when you find a cycle in a resource allocation graph

A

deadlock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

easiest way to recover from deadlock

A

kill all processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Know the resource allocation graphs

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Know the seven state process state diagram

A

Start, ready, ready suspended, run, blocked, blocked suspended, exit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Variable sized blocks/partitions

A

RAM partitions have varying size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Fixed sized blocks/partitions

A

RAM partitions are equally sized

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Internal Fragmentation

A

small slivers of unusable RAM between processes in fixed sized partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

External Fragmentation

A

small slivers of unusable RAM between processes in variable sized partitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Job placement first fit

A

first slot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Job placement worst fit

A

free space that is largest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Job placement next fit

A

first fit AFTER previous job

21
Q

Job placement best fit

22
Q

Non-swapping

A

RAM only, logarithmic dmp graph

23
Q

swapping

A

swapping between RAM and disk, bell curve dmp graph

24
Q

Know how paging memory management works

25
Logical address
page # , offset
26
Physical address
location in RAM
27
Relocatable code
Code that can be run from any spot in memory (references to data are variable)
28
Page Table
Each process has one page table, which frame is loaded from RAM
29
Frame Table
1 per system; holds information about which frames are mapped
30
Memory Management Unit (mmU)
Translates logical address into physical address
31
Demand Paging
putting pages in when they need it (not loaded)
32
Thrashing
situation where the system spends more time swapping pages between RAM and disk than executing actual process, leading to severe performance degradation - represented on tail end of swapping memory dmp graph
33
Memory compaction
In external fragmentation, shifting all the processes up, moving all free space to bottom
34
FIFO page replacement
First in first out
35
LRU page replacement
Least Recently Used; time stamp and lots of overhead (slow)
36
Optimal page replacement
theoretical; frame that will be referenced longest time in the future
37
LRU-approx page replacement
Contains dirty bit and ref bit
38
Dirty Bit:
only set if you write to FRAME - local copy diff from DB - ex: x++;
39
Ref Bit:
reading or writing to PAGE = 1 - all are cleared after sweeping time interval
40
if ref bit = 1...
page has been referenced since last clear
41
LRU Approx Ref and Dirty Bit combo rankings
#1) 0 0 #3) 0 1 #2) 1 0 #4) 1 1
42
Global Frame Policy
Look at whole frame table to kick someone out
43
Local Frame Policy
Set distinct # of frames and determine if kick out
44
Belady's Anomoly
Anomaly where increasing number of page frames results in an INCREASE in number of page faults
45
A process is divided into
pages
46
Page Fault
special interrupt that says somebody was running and made a reference to some part of program that is not loaded in memory
47
RAM is divided into
frames
48
when do we use replacement algorithm
when RAM is full