Set model and page fault.44

myrajendra 4,606 views 18 slides Mar 18, 2013
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

No description available for this slideshow.


Slide Content

http://raj-os.blogspot.in/ 1
Working set model, Page fault frequency

http://raj-os.blogspot.in/ 2
HOME PREVIOUS TOPIC NEXT
PREVIOUS QUESTION PAPERS FOR OS
CPP TUTORIALS

http://raj-os.blogspot.in/ 3
Recap
In the last class, you have learnt
Concepts of thrashing
Allocation of frames

http://raj-os.blogspot.in/ 4
Objective
On completion of this period, you would be able
to know
Working set model
Page fault frequency

http://raj-os.blogspot.in/ 5
The pages used by a process within a window of
time are called its working set
The working-set model is based on the assumption of
locality
…2 6 1 5 7 7 7 7 5 1 6 2 3 4 1 2 3 4 4 4 3 4 3 4 4 4 1 3 2 3 4
Changes continuously - hard to maintain an accurate
number
How can the system use this number to give optimum
memory to the process?
WS(t1) = {1,2,5,6,7} WS(t2) = {3,4}
Working Set Model

http://raj-os.blogspot.in/ 6
Working Set Model
 defines the working set window
If a page is in active use, it will be in the working
set
If it is not in the use, it will be drooped from the
working set
Working – set is the approximation of the
program’s locality
The accuracy of the working set depends on the
selection of the

http://raj-os.blogspot.in/ 7
Working Set Model
Important property of the working set is the size
Compute working set size for each process in
the system WSS
i
 D=SWSS
i
, where D is the total demand for
frames
If D>m where m is the total no. of available
frames thrashing will occur
The operating system monitors the working-set
of each process and allocates them enough
frames

http://raj-os.blogspot.in/ 8
Working Set Model
Working-set strategy prevents thrashing
Degree of multiprogramming will be high
Disadvantage
Keeping track of working set
Working set is a moving window

http://raj-os.blogspot.in/

9

http://raj-os.blogspot.in/ 10
The Working Set Model
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

http://raj-os.blogspot.in/ 11
Steps in handling a Page Fault
The process has touched a page not currently
in memory
Check an internal table for the target process
to determine if the reference was valid (do this
in hardware)
If it was valid, but page isn't resident, then try
to get it from secondary storage
Find a free frame; a page of physical memory
not currently in use (May need to free up a
page)

http://raj-os.blogspot.in/ 12
Steps in handling a Page Fault
Schedule a disk operation to read the desired
page into the newly allocated frame
When memory is filled, modify the page table to
show the page is now resident
Restart the instruction that failed
Repeat these steps

http://raj-os.blogspot.in/ 13
Page Fault Frequency
This is a good indicator of thrashing
If the process is faulting heavily, allocate it more
frames
If faulting very little, take away some frames

http://raj-os.blogspot.in/ 14
14
Summary
In this class, you have learnt
Working set model
Page fault frequency

http://raj-os.blogspot.in/9CM402.44 15
15
Frequently Asked Questions
1. Explain the working-set model ?
2. Explain the page fault frequency ?

http://raj-os.blogspot.in/ 16
16
Quiz
1.If a page is in active use, it will be in the
a) FIFO
b) LRU
c) Working set
d) None
2. Important property of the working set is the
a) FIFO
b) LRU
c) Size
d) None

http://raj-os.blogspot.in/9CM402.44 17
17
Quiz
3. Working – set is the approximation of the program’s
a) Locality
b) LRU
c) FIFO
d) None
4. D=SWSS
i
, where D is the total demand for
a) LRU
b) Frames
c) FIFO
d) None

Other subject materials
•Web designing
•Micro processors
•C++ tutorials
•java
home
18http://raj-os.blogspot.in/
Tags