Swapping: Policies

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards

Memory Pressure

forces the OS to start PAGING OUT pages to make room for actively-used pages

2
New cards

Minimize the Number of Cache Misses

Goal in picking a replacement policy for this cache

3
New cards

Average Memory Access Time (AMAT)

The number of cache hits and misses

4
New cards

AMAT = (Phit * Tm) + (Pmiss * Td)

Formula of AMAT

5
New cards

Definition of Tm, Td, P hit, and P miss

Tm - The cost of accessing memory

Td - The cost of accessing disk

P hit - The probability of finding the data item in the cache (a hit)

P miss - The probability of not finding the date in the cache (a miss)

6
New cards

Optimal Replacement Policy

• Lead to the fewest number of misses overall

• Replaces the page that will be accessed furthest in the future

• Resulting in the FEWEST POSSIBLE cache misses

• Serve only as a comparison point, to know how to close we are to PERFECT

7
New cards

Simple Policy: FIFO

• Pages are place in QUEUE

• The page tail of the queue is evicted

8
New cards

Belady’s Anomaly

We expect the cache hit rate to increase, but in FIFO, it gets worse

9
New cards

Simple Policy: Random

Picks a random page to replace under memory pressure

10
New cards

Using History

Lean on the past

11
New cards

2 Types of Historical Information

Recency - More recently page is accessed, more likely to be accessed again

Frequency - If page is accessed many times, it should NOT be replaced

12
New cards

Clock Algorithm

All pages of the system arranged in CIRCULAR list

13
New cards

Dirty Pages

Page has been MODIFIED

14
New cards

Page Selection Policy

The OS has to decide WHEN to bring a page into memory

15
New cards

Prefetching

The OS GUESS that a page is about to be used

16
New cards

Clustering/Grouping

Collect a number of PENDING WRITES in memory and write them to disk in ONE WRITE

17
New cards

Thrashing

• Memory is OVERSCRIBED

• Memory demands set of processes EXCEEDS to available physical memory