SlideShare a Scribd company logo
1 of 18
Working set model, Page fault frequency




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




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


In the last class, you have learnt

   Concepts of thrashing

   Allocation of frames




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

On completion of this period, you would be able
    to know

   Working set model

   Page fault frequency




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


          WS(t1) = {1,2,5,6,7}               WS(t2) = {3,4}


Changes continuously - hard to maintain an accurate
 number
How can the system use this number to give optimum
 memory to the process?
                             http://raj-os.blogspot.in/              5
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/       6
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/        7
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/   8
http://raj-os.blogspot.in/   9
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/        10
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/     11
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/   12
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/      13
Summary


    In this class, you have learnt

   Working set model

   Page fault frequency




                   http://raj-os.blogspot.in/   14
                                                14
Frequently Asked Questions


1. Explain the working-set model ?

2. Explain the page fault frequency ?




                   http://raj-os.blogspot.in/
                          9CM402.44             15
                                                15
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/   16
                                                    16
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
                      http://raj-os.blogspot.in/
                             9CM402.44                   17
                                                         17
Other subject materials

•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home


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

More Related Content

What's hot

physical file system in operating system
physical file system in operating systemphysical file system in operating system
physical file system in operating systemtittuajay
 
Evolution of operating system
Evolution of operating systemEvolution of operating system
Evolution of operating systemArshad khan
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptxRajapriya82
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management Duressa Teshome
 
9 virtual memory management
9 virtual memory management9 virtual memory management
9 virtual memory managementDr. Loganathan R
 
Virtual memory managment
Virtual memory managmentVirtual memory managment
Virtual memory managmentSantu Kumar
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating systemRafi Dar
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-SystemsVenkata Sreeram
 
Allocation of Frames & Thrashing
Allocation of Frames & ThrashingAllocation of Frames & Thrashing
Allocation of Frames & Thrashingarifmollick8578
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device ManagementDamian T. Gordon
 

What's hot (20)

Demand paging
Demand pagingDemand paging
Demand paging
 
physical file system in operating system
physical file system in operating systemphysical file system in operating system
physical file system in operating system
 
Evolution of operating system
Evolution of operating systemEvolution of operating system
Evolution of operating system
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Kernels and its types
Kernels and its typesKernels and its types
Kernels and its types
 
Scheduling
SchedulingScheduling
Scheduling
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
9 virtual memory management
9 virtual memory management9 virtual memory management
9 virtual memory management
 
Swapping | Computer Science
Swapping | Computer ScienceSwapping | Computer Science
Swapping | Computer Science
 
Kernel (OS)
Kernel (OS)Kernel (OS)
Kernel (OS)
 
Os functions
Os functionsOs functions
Os functions
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Virtual memory managment
Virtual memory managmentVirtual memory managment
Virtual memory managment
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Allocation of Frames & Thrashing
Allocation of Frames & ThrashingAllocation of Frames & Thrashing
Allocation of Frames & Thrashing
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 

Viewers also liked

Deleting structure.56
Deleting structure.56Deleting structure.56
Deleting structure.56myrajendra
 
File directory definition 54(2)
File directory definition 54(2)File directory definition 54(2)
File directory definition 54(2)myrajendra
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53myrajendra
 
Operations on a directory 54(3
Operations on a directory 54(3Operations on a directory 54(3
Operations on a directory 54(3myrajendra
 
Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49myrajendra
 
38 paged segmentation
38 paged segmentation38 paged segmentation
38 paged segmentationmyrajendra
 
Issues in acyclic graph directories.57 to 58
Issues in acyclic graph directories.57 to 58Issues in acyclic graph directories.57 to 58
Issues in acyclic graph directories.57 to 58myrajendra
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifomyrajendra
 
File management53(1)
File management53(1)File management53(1)
File management53(1)myrajendra
 
34 single partition allocation
34 single partition allocation34 single partition allocation
34 single partition allocationmyrajendra
 
35. multiplepartitionallocation
35. multiplepartitionallocation35. multiplepartitionallocation
35. multiplepartitionallocationmyrajendra
 
Acyclic grapch directory 56(2)
Acyclic grapch directory 56(2)Acyclic grapch directory 56(2)
Acyclic grapch directory 56(2)myrajendra
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidancewahab13
 
42 lru optimal
42 lru optimal42 lru optimal
42 lru optimalmyrajendra
 
36 fragmentaio nnd pageconcepts
36 fragmentaio nnd pageconcepts36 fragmentaio nnd pageconcepts
36 fragmentaio nnd pageconceptsmyrajendra
 
Scan scheduling 50 1
Scan scheduling 50 1Scan scheduling 50 1
Scan scheduling 50 1myrajendra
 
C scan scheduling 50 2
C scan scheduling 50 2C scan scheduling 50 2
C scan scheduling 50 2myrajendra
 

Viewers also liked (20)

cache memory
 cache memory cache memory
cache memory
 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
 
Deleting structure.56
Deleting structure.56Deleting structure.56
Deleting structure.56
 
File directory definition 54(2)
File directory definition 54(2)File directory definition 54(2)
File directory definition 54(2)
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53
 
Operations on a directory 54(3
Operations on a directory 54(3Operations on a directory 54(3
Operations on a directory 54(3
 
Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49
 
33
3333
33
 
38 paged segmentation
38 paged segmentation38 paged segmentation
38 paged segmentation
 
Issues in acyclic graph directories.57 to 58
Issues in acyclic graph directories.57 to 58Issues in acyclic graph directories.57 to 58
Issues in acyclic graph directories.57 to 58
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifo
 
File management53(1)
File management53(1)File management53(1)
File management53(1)
 
34 single partition allocation
34 single partition allocation34 single partition allocation
34 single partition allocation
 
35. multiplepartitionallocation
35. multiplepartitionallocation35. multiplepartitionallocation
35. multiplepartitionallocation
 
Acyclic grapch directory 56(2)
Acyclic grapch directory 56(2)Acyclic grapch directory 56(2)
Acyclic grapch directory 56(2)
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
 
42 lru optimal
42 lru optimal42 lru optimal
42 lru optimal
 
36 fragmentaio nnd pageconcepts
36 fragmentaio nnd pageconcepts36 fragmentaio nnd pageconcepts
36 fragmentaio nnd pageconcepts
 
Scan scheduling 50 1
Scan scheduling 50 1Scan scheduling 50 1
Scan scheduling 50 1
 
C scan scheduling 50 2
C scan scheduling 50 2C scan scheduling 50 2
C scan scheduling 50 2
 

Similar to Set model and page fault.44

Similar to Set model and page fault.44 (20)

Unit 2chapter 2 memory mgmt complete
Unit 2chapter 2  memory mgmt completeUnit 2chapter 2  memory mgmt complete
Unit 2chapter 2 memory mgmt complete
 
Ch9
Ch9Ch9
Ch9
 
Java multi thread programming on cmp system
Java multi thread programming on cmp systemJava multi thread programming on cmp system
Java multi thread programming on cmp system
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
381 ccs chapter7_updated(1)
381 ccs chapter7_updated(1)381 ccs chapter7_updated(1)
381 ccs chapter7_updated(1)
 
10 Ways To Improve Your Code( Neal Ford)
10  Ways To  Improve  Your  Code( Neal  Ford)10  Ways To  Improve  Your  Code( Neal  Ford)
10 Ways To Improve Your Code( Neal Ford)
 
Memory Management
 Memory Management Memory Management
Memory Management
 
بيي
بييبيي
بيي
 
Module4
Module4Module4
Module4
 
Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009
 
HPC and HPGPU Cluster Tutorial
HPC and HPGPU Cluster TutorialHPC and HPGPU Cluster Tutorial
HPC and HPGPU Cluster Tutorial
 
Distributed Operating System_3
Distributed Operating System_3Distributed Operating System_3
Distributed Operating System_3
 
Virtual memory This is the operating system ppt.ppt
Virtual memory This is the operating system ppt.pptVirtual memory This is the operating system ppt.ppt
Virtual memory This is the operating system ppt.ppt
 
virtual memory Operating system
virtual memory Operating system virtual memory Operating system
virtual memory Operating system
 
CH09.pdf
CH09.pdfCH09.pdf
CH09.pdf
 
Rails Application Optimization Techniques & Tools
Rails Application Optimization Techniques & ToolsRails Application Optimization Techniques & Tools
Rails Application Optimization Techniques & Tools
 
Virtual memory pre-final-formatting
Virtual memory pre-final-formattingVirtual memory pre-final-formatting
Virtual memory pre-final-formatting
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
OSCh10
OSCh10OSCh10
OSCh10
 
Ch10 OS
Ch10 OSCh10 OS
Ch10 OS
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

Set model and page fault.44

  • 1. Working set model, Page fault frequency http://raj-os.blogspot.in/ 1
  • 2. HOME PREVIOUS TOPIC NEXT PREVIOUS QUESTION PAPERS FOR OS CPP TUTORIALS http://raj-os.blogspot.in/ 2
  • 3. Recap In the last class, you have learnt  Concepts of thrashing  Allocation of frames http://raj-os.blogspot.in/ 3
  • 4. Objective On completion of this period, you would be able to know  Working set model  Page fault frequency http://raj-os.blogspot.in/ 4
  • 5. Working Set Model 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 WS(t1) = {1,2,5,6,7} WS(t2) = {3,4} Changes continuously - hard to maintain an accurate number How can the system use this number to give optimum memory to the process? http://raj-os.blogspot.in/ 5
  • 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/ 6
  • 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/ 7
  • 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/ 8
  • 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/ 10
  • 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/ 11
  • 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/ 12
  • 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/ 13
  • 14. Summary In this class, you have learnt  Working set model  Page fault frequency http://raj-os.blogspot.in/ 14 14
  • 15. Frequently Asked Questions 1. Explain the working-set model ? 2. Explain the page fault frequency ? http://raj-os.blogspot.in/ 9CM402.44 15 15
  • 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/ 16 16
  • 17. 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 http://raj-os.blogspot.in/ 9CM402.44 17 17
  • 18. Other subject materials • Web designing • Micro processors • C++ tutorials • java home http://raj-os.blogspot.in/ 18