Thrashing Flashcards

1
Q

what is thrashing? what causes it?

A

high paging to disk activity, process spends more time paging the disk than executing - caused by not having enough frames allocated

caused by too much multiprogramming, each process getting an allocation that is too small

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how do we limit thrashing?

A

using a local replacement algorithm

  • page fault evicts a page of the same process
  • one process thrashing cannot cause others to thrash by stealing from others

or provide the process with the number of frames it needs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how do we know how many frames a process needs?

A

define a locality model

  • a model of process execution
  • process locality is a set of pages actively used together
  • proccess moves from locality to locality as it executes
locality of a function is
- instruction
- local variables
- subset of global variables
we leave the locality on return from function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how do we use locality?

A

locality determined by program structure and data structures

allocate enough frames to hold locality

  • intially pages in locality are faulted
  • no more faulting until locality changes

thrashing occurs when frame allocation is too small to hold locality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the working set?

A
  • based on the assumption of locality, the paramater Δ defines the working-set window
  • we examine the most recent Δ page references, they are the working set
  • if a page is in use, it will be in the set
  • if a page is no longer in use, it will be dropped from the set Δ time units after its last reference
  • the size may change over time

the demand D is
D = sumof WSSi
where WSS is working set size
thrashing occurs if D is greater than the number of frames

How well did you know this?
1
Not at all
2
3
4
5
Perfectly