1-on-1 - Lecture Notes 11 Virtual Memory Management Anand...

Info iconThis preview shows pages 1–18. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture Notes 11 Virtual Memory Management Anand Tripathi CSci 5103 Operating Systems
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Topics from Chapter 4 Memory allocation to processes. Working set model Working set estimation Effect of page sizes Inverted Page Tables Examples of paging architectures: PDP 11 VAX Intel 386
Background image of page 2
3 FRAME ALLOCATION A minimum number of frames are necessary, otherwise the program would never be able to run. This number depends on the instruction set's memory reference model. Depends on the largest number of pages that could be accessed by any instruction. Example: ADD A B It would require three pages in the worst case when the instruction code, A, and B all reside in separate pages.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 FRAME ALLOCATION SCHEMES 1. EQUAL ALLOCATION 2. PROPORTIONAL ALLOCATION 3. WORKING SET MODEL: It is based on the locality of memory references.
Background image of page 4
5 Working Set Model It is based on the locality of memory references. The memory references generated by a program over some period of time tend to be confined to some small number of pages which reflects its "locality" during that execution phase. Try to maintain the pages which belong to the current working set (locality).
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Working Set Model For the working set model, a parameter is the "window size” or the time interval over which we assess the locality of a program. h which represents the window size. If h is made very large, then the entire address space would look like the locality.
Background image of page 6
7 Working Set Model For example consider the page reference string: and h = 5 1 2 3 2 3 1 2 4 3 4 7 4 3 3 4 1 1 2 2 2 1 Points a b c At a, the working set is {1, 2, 3 } At b, {3, 4, 7} At c, {1, 2}
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 The Working Set Page Replacement Algorithm (1) • The working set is the set of pages used by the k most recent memory references • w(k,t) is the size of the working set at time, t
Background image of page 8
9 Working Set Estimation Using hardware level support of Reference bit and Reference register. MSB of the reference register is the reference bit. After h units of execution the contents of the register are shifted right.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10 Working Set Estimation Suppose that the reference register has 8 bits. On a page-fault, examine the reference registers to determine which pages have at least one of these 8 bits set to 1. Such a page has been references over the past M references, such that 7*h <= M <= 8*h. These pages would be included in the working set.
Background image of page 10
11 Eztimating Working Set using Reference Register 1 0 1 0 1 0 1 1 0 1 1 0 0 1 0 R bits for 5 pages After clock tick 1 After clock tick 2 After clock tick 3 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 Register values
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12 The Working Set Page Replacement Algorithm The working set algorithm
Background image of page 12
13 The WSClock Page Replacement Algorithm Operation of the WSClock algorithm
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
14 Review of Page Replacement Algorithms
Background image of page 14
15 Modeling Page Replacement Algorithms Belady's Anomaly FIFO with 3 page frames FIFO with 4 page frames P 's show which page references show page faults
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16 Stack Algorithms State of memory array, M , after each item in reference string is processed
Background image of page 16
17 The Distance String Probability density functions for two hypothetical distance strings
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 18
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 61

1-on-1 - Lecture Notes 11 Virtual Memory Management Anand...

This preview shows document pages 1 - 18. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online