For 2/23 Flashcards

1
Q

What does virtual memory allow for?

A

Parts of a program, only the current instructions and data, need to be in memory for execution. The rest gets a virtual address in secondary memory

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

Address space

A

The range of memory addresses available to a process

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

virtual address space

A

The virtual storage assigned to a process

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

Real address

A

The address of a storage location in main memory

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

resident set

A

The portion of a process that is actually in main memory

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

What happens if there is a page fault?

A

The process is blocked, what is needed is fetched while other things are processed, and then it is ready again

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

What is an advantage to only having a resident set?

A

More processes can be in main memory at a time, and a process can be larger than all of memory

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

Real memory

A

The same as main memory

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

Thrashing

A

The system spends too much time swapping out data and not executing

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

What prevents thrashing?

A

The OS keeps track of what has been used least recently when moving things around

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

Principle of locality

A

Program and data references within a process tend to cluster

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

How is a page table modified for virtual memory?

A

It indicates if a page is present in main memory and if it has been modified

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

How many page tables are there?

A

One per process

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

How are large page tables handled?

A

They too can be put into virtual memory. Only parts of the table are in main memory at a time

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

What is an inverted page table?

A

One that hashes the page number portion of a virtual address. the hash points to the inverted page table

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

What does an inverted page table contain?

A

The addresses of a real memory page frame in lieu of one per virtual address

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

What makes the inverted page table inverted?

A

It addresses by frame number instead of virtual page number

18
Q

How many main memory accesses are there per virtual memory access?

A

Two. One for the page table and one for the data

19
Q

translation look aside buffer (TLB)

A

Caches functions and contains page table entries that have most recently been used

20
Q

What happens if something is not found in the TLB?

A

It indexes the process page table, and gets the data, then updates the TLB

21
Q

Associative mapping

A

The processor stores the entire page table entry in the TLB and checks the TLB entries when it’s looking for a page table entry

22
Q

What happens if pages are too small?

A

There are too many pages and more faults

23
Q

What happens if a page is too large?

A

They begin to contain data further and further away from what is needed, which violates locality and causes more faults

24
Q

What happens if a program jumps around? (Object oriented)

A

There are fewer TLB hits and locality decreases. The TLB actually causes bottlenecking

25
Q

Why do most OSes only support one page size?

A

Because page sized effect OS performance throughout

26
Q

What is the difference between segmentation and paging?

A

Paging is invisible to the programmer

27
Q

What is a ring structure?

A

A method of assigning program privileges. Kernel functions get ring 0

28
Q

What 3 things are considered in OS memory management?

A

Using virtual memory, paging/segmentation/both, and management algorithms

29
Q

What is fetch policy?

A

The means by which it is decided if a page should be brought into main memory

30
Q

Demand paging

A

Only binging a page into memory when a request is made for that page. Lots of faults at first, then locality kicks in

31
Q

Prepaging

A

Bringing in a lot of contiguous pages at once. This fails if the ones brought in are never referenced

32
Q

Placement Policy

A

Determining where in main memory a process should reside. Usually handled with hardware rather than software

33
Q

Replacement Policy

A

Determining how to replace a page when a new page must be brought in

34
Q

Resident Set Management

A

How many page frames are to be allocated per process, and if pages replaced should be limited to the process causing a fault

35
Q

Frame Locking

A

Frames that cannot be replaced. Usually applies to kernel/os stuff

36
Q

Optimal replacement policy

A

Replace the page with the longest time to the next reference. Has least number of page faults

37
Q

Least recently used replacement policy

A

Replaces the page that has the longest time since the last reference. Locality says this is least likely to be referenced in the future.

38
Q

First in first out replacement policy

A

Page frames are treated as a circular buffer. Simple to implement but performs poorly.

39
Q

Clock policy

A

Tries to implement LRU in a fashion with little overhead. Blends LRU with FIFO

40
Q

How does clock policy work?

A

Each page frame has a use bit. When it’s time to replace, it replaces with the first thing that has a 0 use bit. Anything looped through until that zero has a use bit set to 0.