set model and page fault.44
DESCRIPTION
TRANSCRIPT
http://raj-os.blogspot.in/ 1
Working set model, Page fault frequency
http://raj-os.blogspot.in/ 2
HOME PREVIOUS TOPIC NEXTPREVIOUS QUESTION PAPERS FOR OSCPP 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 setThe 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
numberHow 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 WSSi
D=WSSi, 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/ 1414
Summary
In this class, you have learnt
Working set model
Page fault frequency
http://raj-os.blogspot.in/9CM402.44 1515
Frequently Asked Questions
1. Explain the working-set model ?
2. Explain the page fault frequency ?
http://raj-os.blogspot.in/ 1616
Quiz
1. If a page is in active use, it will be in the a) FIFOb) 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 1717
Quiz
3. Working – set is the approximation of the program’s
a) Locality
b) LRU
c) FIFO
d) None
4. D=WSSi, 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/