CIS343|510         Chapter Eight Review w/ Answers

Two characteristics of paging and segmentation are keys to a fundamental breakthrough in memory management. They are...

1-3. All memory references within a process are _____ that are dynamically

translated into _____ at run time. This means that a process may be

_____ such that it occupies different regions of main memory at

different times during the course of execution.

logical addresses; physical addresses;

swapped in and out of main memory

4-6. A process may be broken up into _____ and these need not be _____

in main memory during execution. The combination of dynamic

run-time _____ and the use of a page or segment table permits this.

a number of pieces; contiguously located; address translation

The breakthrough can be described this way:

7-10. If the preceding two characteristics are present, then it is _____ that

all of the pages or all of the segments of a process be _____ during

execution. If the piece that holds _____ and the piece that holds

_____ are in main memory, then at least for a time execution may

proceed.

not necessary; in main memory;

the next instruction to be fetched;

the next data location to be accessed

11. The portion of a process that is actually in memory at any given time is

called the _____ of the process.

resident set

The breakthrough mentioned above has two important implications.

12-16. More _____ may be _____. Because we are only going to load

some of the pieces of any particular process, there is _____. This leads

to more efficient utilization of _____ because it is more likely that at

least one of the more numerous processes will be _____ at any

particular time.

processes ; maintained in main memory;

room for more processes; the processor;in a Ready state

17. It is possible for a process to be _____.

larger than all of main memory

18. Because a process executes only in main memory, that memory is

referred to as ...

real memory

19. But a programmer or user perceives a potentially much larger memory -

that which is allocated on disk. This latter is referred to as...

virtual memory

20. When a processor spends most of its time swapping pieces rather than

executing instructions, this is known as...

thrashing

21-22. When virtual memory is implemented via paging, what two bits must

be present in the page table entry for each page?

resident bit; modified bit

23-27. In principle, every virtual memory reference can cause two physical

memory accesses: one to _____, and one to _____. This would have

the effect of doubling the memory access time. To overcome this

problem, most virtual memory systems make use of a special _____

for _____, usually called a _____. It contains those page table entries

that have been most recently used.

fetch the appropriate page table entry; fetch the desired data;

cache; page table entries; translation lookaside buffer

28. If the desired page is not in main memory when it is needed to continue

execution, this is called a ...

page fault

Listed below are considerations relevant to the choice of page size. Identify which are used to argue for larger, which for smaller page size.

Desire to...

29. ...decrease internal fragmentation.

smaller

30. ...decrease size of page tables

larger

31. ...increase the number of pages available in main memory for a process

smaller

32. Physical characteristics (rotational) of most secondary memory devices.

larger

33. Describe how a double page fault can occur for a single memory

reference.

Neither page referenced nor portion of page map table is in

memory

34-35. Describe two programming techniques used in large programs that

tend to decrease the locality of reference within a process.

OO techniques => many small program & data modules

scattered over a relatively large number of objects in

a relatively short period of time

Multithreaded applications => abrupt changes in instruction

stream & scattered memory references

Describe these fetch policies:

36. Demand paging

a page is brought into main memory only when a reference is

made to a location on that page

37. Prepaging

pages other than the one demanded are brought in

38-39. Choice of placement policy is an important issue for _____ but

relatively unimportant for _____.

pure segmentation systems;

pure paging or combined paging/segmentation systems

40. What is frame locking? Where may it be used?

specifying that the page contained in that frame may not be

replaced much of the kernel of the OS is held in locked frames

Identify the replacement policies described below:

41. Select that page for which the time to next reference is the longest.

optimal

42. Replace that page that has not been referenced for the longest time.

LRU = least recently used

43. Replace the page that has been in memory the longest.

FIFO = first in, first out

44. Using a use bit, replace the first page whose use bit = 0, resetting that

bit to 0 for each page passed over.

Clock

45. If there are 10 pages in the set to be considered for replacement, what is

the maximum number of pages, under Clock, that may be scanned before

a page is found to be replaced.

11

46. In the modification of Clock using two bits (u - used; m - modified), there

are 4 possible combinations of u & m: 0,0; 0,1; 1,0; 1,1. Which

combination is chosen during step 1 of this algorithm?

0,0

47. Which is chosen during step 2 of the algorithm?

0,1

48. If Step 2 fails, Step 3 involves

a. A repetition of Step 1 only.

b. A repetition of Step 1, and Step 2 (if necessary).

b

49. How is it possible for a page to be unused, but modified?

The used bit gets reset during Step #2 of 2nd Clock Alg.

Identify these resident set management policies:

50. Give a process a fixed number of pages within which to execute.

Fixed-allocation policy

51. Allow the number of page frames allocated to a process to change over

the lifetime of a process.

Variable-allocation policy

Identify these scope of replacement policies:

52. Choose only among the resident pages of the process that generated the

page fault to find a page to replace.

Local replacement policy

53. Choose all unlocked pages in memory are candidates for replacement,

regardless of which process they belong to.

Global replacement policy

54. Of the 4 combinations of resident set management and scope of

replacement policies, which one is not possible?

Fixed allocation, global scope

55. The set of pages that a process is accessing over a period of time is

known as its ...

working set

Describe how the working set of a process can be used to guide a strategy for determining resident set size:

56. Monitor the _____ of each process.

working set

57. Periodically _____ those pages that are not in its working set.

remove from the resident set of a process

58. A process may execute only if ...

its working set is in main memory

Give three problems with the working set strategy:

59. The past ...

does not always predict the future

60. A true measurement of the working set of each process ...

is impractical

61. The optimal value of delta ...

is unknown and would vary

62. What measurement may be used as an approximation for determining

whether or not the working set of a process is in main memory?

page-fault frequency

63. A problem with this approach is that during interlocality transitions, the

rapid succession of page faults causes _____ to swell.

the resident size of a process

64. An approach that attempts to deal with the phenomenon of interlocality

transition is the ...

variable-interval sampled working set (VSWS) policy

Identify these cleaning policies:

65. A page is written out to secondary memory only when it is selected for

replacement.

demand cleaning

66. Modified pages are written before page frames are needed, so that pages

can be written out in batches.

precleaning

67-71. The load control policy is critical in effective memory management.

If _____ are resident at any one time, then there will be many

occasions when all processes will be blocked, and much time will be

spent _____. On the other hand, if _____ are resident, then, on

average, the size of the resident set of each process will be inadequate

and _____ will occur.

too few processes; swapping; too many processes;

frequent faulting