CSCE4600 Final Flashcards

1
Q

How many milliseconds in 1 second

A

1000 (10^-3)

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

How many microseconds in 1 second

A

1000000 (10^-6)

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

How many nanoseconds in 1 second

A

(10^-9)

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

What are the 3 different types of approaches for the deadlock problem

A

Detection and Recovery
Prevention
Avoidance

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

What are reusable resources

A

permanent objects with two properties

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

What are consumable resources

A

produced and consumed dynamically

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

What are the two properties of reusable resources

A

1) # of units is constant
2) each unit is available or allocated to
exactly one process

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

What are the three properties of consumable resources

A

1) # of units will vary over time;
2) system can create new units
3) process may request, acquire,
and consume resource units

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

T/F: With single unit resources, cycle -> deadlock

A

True

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

What are the 4 points of cycles and knots

A

deadlock -> cycle
cycle !-> deadlock
expedient & knot -> deadlock
deadlock !-> knot

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

What is a blocked state

A

no action by process Pi will result in a state change,

does not mean deadlock

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

What is a secure state

A

S is not a deadlock state and any state T reachable by S is not a deadlock state

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

What is total deadlock

A

If all processes Pi are deadlocked in state S

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

What is a deadlock state

A

If Pi is deadlocked in state S

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

T/F: does a cycle always mean dependency

A

False

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

What are the four conditions for deadlock

A

1) Mutual Exclusion
2) Nonpreemption
3) Resource waiting
4) Partial Allocating

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

What is mutual exclusion

A

Processes hold resources exclusively, hence making them unavailable to other processes

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

What is non preemption

A

Resources cannot be taken away from a process that is holding them. Only the process can release the resources they hold

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

What is resource waiting (Circular Wait)

A

Processes that request unavailable resources (or units) will block until they become available.

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

What is Partial allocation

A

Processes may hold some resources when they request additional units of the same resource or other resources. (Hold and Wait)

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

What is a sink

A

A node with no outgoing edges

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

What is an isolated node

A

A node with no outgoing and no inbound edges

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

What is a path

A

a sequence (a,b,c ..y,z) of at least two nodes for which (a, b) ε E

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

What is a cycle

A

a path with the same first and last vertex

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

What is a reachable set

A

reachable(z) = {b | there is a path from z to b}

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

What is a knot

A

All nodes are reachable from any other node

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

What is compile time

A

The compiler translates symbolic addresses to absolute addresses

28
Q

What is load time

A

Generates relocatable code if memory location is not known at compile time

29
Q

What is execution time

A

binding is delayed until runtime of the process can be moved during its execution from one segment to another

30
Q

What is a logical address

A

generated by the CPU; also referred to as virtual address

31
Q

What is a physical address

A

address seen by the memory unit

32
Q

Which address space tends to be larger?

A

Logical

33
Q

how many frames is physical memory

A

2^25

34
Q

how many frames is logical memory

A

2^32

35
Q

what is a relocation register

A

is added to every address generated by a user process at the time it is sent to memory

36
Q

What does a relocation register contain

A

value of smallest physical address

37
Q

what is a limit register

A

contains range of logical addresses

38
Q

logical address must be…

A

less than the limit register

39
Q

what is a hole

A

block of available memory

40
Q

what is external fragmentation

A

when we have sufficient space in memory but the space is not contiguous

41
Q

pros and cons for best fit

A

pro: better speed and storage utilization, leaves very large holes and very small holes
cons: very small holes may be useless, must search entire list

42
Q

pros and cons for first fit

A

pros: better speed and storage utilization, leaves “average” size hoes
cons: may end up clustering towards top

43
Q

pros and cons for worst fit

A

pros: allocates the largest holes
cons: must search entire list, worst in terms of storage utilization

44
Q

what is internal fragmentation

A

the wasted memory space when the requested memory is slightly smaller than the allocated memory

45
Q

what is compaction

A

move allocated blocks such that a single region of free memory is maintained

all internal addresses may have to be relocated and not always possible

46
Q

pros and cons for fixed partition

A

pro: easy to implement, fast context switches
cons: suffers from internal fragmentation, one size does not fit all (example: large processes)

47
Q

pros and cons for variable partition

A

pro: no internal fragmentation, allocates just enough for process
con: large overhead to keep track of free memory

48
Q

variable partitioning requires…

A

coalescing, or combining neighboring small holes into contiguous memory

49
Q

what is buddy system

A

splits block into two equal buddies, continuous until smallest block greater than or equal to s is generated

50
Q

are frames physical memory or logical memory

A

physical

51
Q

are pages physical memory or logical memory

A

logical

52
Q

used as an index into a page table which contains base address for each page

A

page number

53
Q

combined with base address to define the physical memory address

A

page offset

54
Q

What are the 4 steps to a basic page replacement

A

1) find the location of desired page on disk
2) find a free frame (if no free frame use page replacement algo to select victim)
3) read the desired page into new free frame and update page and frame tables
4) resume the process

55
Q

what does a 1 valid-invalid bit mean

A

in-memory

56
Q

what does a 0 valid-invalid bit mean

A

not in memory

57
Q

if valid-invalid bit is 0…

A

page fault

58
Q

What are the 5 steps to the page fault process

A

1) look at another table to decide if invalid reference, abort, or just not in memory
2) get empty frame
3) Swap page into frame
4) reset tables, validation bit = 1
5) restart instructions

59
Q

what is locality

A

code that is executed frequently and executes a few fragments at one time

60
Q

what does belady’s optimal algorithm do

A

replace page that will not be used for the longest period of time

61
Q

free to select a victim from any page in memory

A

global policies

62
Q

defines a working set that belongs to the same processes or group of processes and selects a victim from them

A

local policies

63
Q

what is thrashing

A

when a process is busy swapping pages in and out

64
Q

Compiler: If you know at compile time where the process will reside in memory

A

then absolute code can be generated (Static)

65
Q

Loader: If it is not known at compile time where the process will reside in memory

A

then the compiler must generate relocatable code

66
Q

how many bytes are in a megabyte

A

1000000 (10^6)

67
Q

how many bytes are in a kilobyte

A

1000 (10^3)