CSCE4600 Final Flashcards Preview

Programming > CSCE4600 Final > Flashcards

Flashcards in CSCE4600 Final Deck (67):
1

How many milliseconds in 1 second

1000 (10^-3)

2

How many microseconds in 1 second

1000000 (10^-6)

3

How many nanoseconds in 1 second

(10^-9)

4

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

Detection and Recovery
Prevention
Avoidance

5

What are reusable resources

permanent objects with two properties

6

What are consumable resources

produced and consumed dynamically

7

What are the two properties of reusable resources

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

8

What are the three properties of consumable resources

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

9

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

True

10

What are the 4 points of cycles and knots

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

11

What is a blocked state

no action by process Pi will result in a state change,
does not mean deadlock

12

What is a secure state

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

13

What is total deadlock

If all processes Pi are deadlocked in state S

14

What is a deadlock state

If Pi is deadlocked in state S

15

T/F: does a cycle always mean dependency

False

16

What are the four conditions for deadlock

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

17

What is mutual exclusion

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

18

What is non preemption

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

19

What is resource waiting (Circular Wait)

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

20

What is Partial allocation

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

21

What is a sink

A node with no outgoing edges

22

What is an isolated node

A node with no outgoing and no inbound edges

23

What is a path

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

24

What is a cycle

a path with the same first and last vertex

25

What is a reachable set

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

26

What is a knot

All nodes are reachable from any other node

27

What is compile time

The compiler translates symbolic addresses to absolute addresses

28

What is load time

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

29

What is execution time

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

30

What is a logical address

generated by the CPU; also referred to as virtual address

31

What is a physical address

address seen by the memory unit

32

Which address space tends to be larger?

Logical

33

how many frames is physical memory

2^25

34

how many frames is logical memory

2^32

35

what is a relocation register

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

36

What does a relocation register contain

value of smallest physical address

37

what is a limit register

contains range of logical addresses

38

logical address must be...

less than the limit register

39

what is a hole

block of available memory

40

what is external fragmentation

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

41

pros and cons for best fit

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

pros and cons for first fit

pros: better speed and storage utilization, leaves "average" size hoes

cons: may end up clustering towards top

43

pros and cons for worst fit

pros: allocates the largest holes

cons: must search entire list, worst in terms of storage utilization

44

what is internal fragmentation

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

45

what is compaction

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

pros and cons for fixed partition

pro: easy to implement, fast context switches

cons: suffers from internal fragmentation, one size does not fit all (example: large processes)

47

pros and cons for variable partition

pro: no internal fragmentation, allocates just enough for process

con: large overhead to keep track of free memory

48

variable partitioning requires...

coalescing, or combining neighboring small holes into contiguous memory

49

what is buddy system

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

50

are frames physical memory or logical memory

physical

51

are pages physical memory or logical memory

logical

52

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

page number

53

combined with base address to define the physical memory address

page offset

54

What are the 4 steps to a basic page replacement

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

what does a 1 valid-invalid bit mean

in-memory

56

what does a 0 valid-invalid bit mean

not in memory

57

if valid-invalid bit is 0...

page fault

58

What are the 5 steps to the page fault process

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

what is locality

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

60

what does belady's optimal algorithm do

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

61

free to select a victim from any page in memory

global policies

62

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

local policies

63

what is thrashing

when a process is busy swapping pages in and out

64

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

then absolute code can be generated (Static)

65

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

then the compiler must generate relocatable code

66

how many bytes are in a megabyte

1000000 (10^6)

67

how many bytes are in a kilobyte

1000 (10^3)