Unit 7 : Memory Management Flashcards

1
Q

List out 2 partision methods

A
  1. Fixed Partision
  2. Variable Partision
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List out the 2 methods for fixed partision

A
  1. Fixed
    • Fixed size of the memory
    • Not the same value
  2. Paging
    • Fixed size of the memory
    • Same Value
  • Fixed ( 1 - 100kb , 2 - 200 kb , 3 - 300 kb )
  • Paging ( All parts are 50kb )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does variable partisioning assign the space?

A
  1. Depends on the size of the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What components does RAM uses to create Virtual Memory?

A
  1. Storage Device ( Hard Drive / SSD )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What techniques does Virtual Memory uses? What is the total Memory when there is 8GB of RAM and 2GB of Virtual Memory?

A
  1. Swap In / Out
  2. 10 GB
  • But computer can only use 8GB
  • When programs at not running at the RAM ( but app is still opening ) it will swap in to the virtual memory, if there is programs that is being used in virtual memory, it will swap out from virtual memory to RAM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What things that programmers do not have to worry about when a pc has virtual memory?

A
  1. Do not have to worry about space and writing overlay codes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What techniques does virtual memory implemented?

A
  1. Demand paging
  2. Demand segmentation
  • This allows for a process larger then the system physical memory to be executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In paging, physical memory is broken into fixed-sized blocks called what?

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

In pagging, logical memory is also broken into blocks of the same size called what?

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

What is the word paged means in memory?

A
  1. Write in to the memory when a process needs to be executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What decides which pages to bring into memory?

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

Does demand paging pages all the process?

A
  1. No, only pages that are needed are brought in
  • An media player that has features like media and audio player, when user are playing audio, the media code won’t be in the memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the advantages of demand paging? ( 3 )

A
  1. Avoid reading apges that will not be used
  2. Decreases paging time
  3. Decrease physical memory needed
  • It only brings in pages that are needed into memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

List out 3 things for demand paging works ? ( 3 )

A
  1. Logical Memory
  2. Page Table
  3. Physical Memory
  • Table examples on Slide 6
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does addresses specify in segmentation?

A
  1. Segment Name
  2. Offset
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does a logical address space have?

A
  1. A collection of segments
  • Each segment has a name and a length
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is segmentation?

A
  1. Is a memory management scheme that supports a user view of memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the most efficient virtual memory storage method?

A
  1. Demand Segmentation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What needs significant amount of hardware requirements?

A
  1. Demand Segmentation
  • It allocetes memory in segments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Does all paging systems use segmentation?

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

What keeps track of segments?

A
  1. Segment Descriptors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Instead of allocatiing pages in memory, it was allocating in what ?

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

How does demand paging works ? ( 3 )

A
  1. Logical Address Space
  2. Physical Memory
  3. Segment Table
  • See example on Slide 11
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What does Limit and Base mean in Segment table?

A
  1. Limit
    • The storage used
  2. Base
    • Where it starts from ( in physical memory )

*Limit 1000 Base 1400
Means it uses 1000 in physical memory and starts from 1400 in physical memory

Slide 11

25
Q

What is the condition for shared segmentation?

A
  1. There are same instructions in the program
  • The difference is the data that we’re transforming
26
Q

When does page fault occurs? ( 2 )

A
  1. A process tries to use a page that is not in memory ( virtual memory is not counted as memory )
  2. An operating system interrupt occurs as a result of trying to access a missing page
27
Q

What are the steps in handling a page fault? ( 5 )

A
  1. Locate the missing page
  2. Find free memory frame
  3. Copy into physical memory
  4. Reset the page table
  5. Restarts the instructions
28
Q

What will happen when there is no free frames to handle a new page? ( 2 )

A
  1. Find a frame that is not currently begin used and free it
29
Q

How to free a frame? List out the steps ( 4 )

A
  1. Find a frame not currently used
  2. Copy its contents to disk ( Virtual Memory )
  3. Change the page table to indicate that the page is no longger in memory
  4. Newly free frame can be used to store the page that resulted in the page fault
30
Q

What does computer uses to find a free frame?

A
  1. Use a page replacement algorithm to find a free frame
31
Q

What is a string of memory reference called?

A
  1. Reference string
32
Q

What do we need to consider for a given page?

A
  1. Only the page number, not the entire address
33
Q

Does every operating system has its own unique page replacement algorithm ?

A
  1. Yes
34
Q

What does we want when selecting a particular algorithm?

A
  1. Lowest page fault rate
35
Q

List out the types of page repplacement algorithms

A
  1. First in First Out
  2. Optimal
  3. Least Recently Used
36
Q

What is the simplest page replacement algorithm?

A
  1. First In First Out
37
Q

What is page replacement algorithm is easily implemented

A
  1. First in First Out
38
Q

What page replacement algorithm uses the age of the page as the criteria to perform page replacement

A
  1. First In First Out
39
Q

What is the age of the page mean in First In First Out?

A
  1. The amount of time the page has spent in memory
40
Q

Which page is the victim page?

A
  1. Oldest Page

For example, check out in Slide 26

41
Q

What is the advantage of the First In First Out technique? ( 3 )

A
  1. The oldest page could be very much in demand
  2. The oldest page is replaced there will be an immediate page fault
  3. Suffers from BELADY’S ANOMALY
42
Q

What is one of the pioneers of modern operating systems who did extensive studies on Page Replacement Schemes?

A
  1. Belady
43
Q

What will happen when the number of memory frames are increased on the basis of logical thinking?

A
  1. The number of page faults decreases
  • But Belady found that certain memory reference strings, as the number of memory frames are increased the number of page faults increases
44
Q

What page replacement algorithm that matches the below statement?
1. Lowest page fault with a fixed number of frames
2. Does not suffer from Belady’s Anomaly

A
  1. Optimal
45
Q

What does optimal page replacement algorithm do?

A
  1. Replaces the page that will not be used for the longest period of time
46
Q

Why optimal is difficult to implement?

A
  1. Because it requires future knowledge of the reference string
47
Q

What page replacement algorithms uses the technique of looking backwards?

A
  1. Least Recently Used
48
Q

What does least recently used ( page replacement algorithm ) does? ( 2 )

A
  1. Associates each page with time of when the page was last used
  2. When a page needs to be replaced, the page that has not been used for the longest period will be chose
49
Q

What page replacement algorithm causes CPU utilisation to drop?

A
  1. Thrashing
49
Q

What page replacement algorithms have the condition below :
1. A condition where there is high page replacement activity
2. A process spends more time replacing pages than processing.
3. Causes CPU utilisation to drop
4. System throughput reduced and page fault rate increases

A
  1. Thrashing
50
Q

Virtual Memory techniques ( Demand Paging / Segmentation ) takes what responsibility from programmer to code?

A
  1. Techniques for overlays
  2. Fixed or Variable Partisions
50
Q

When does Page Faults occur?

A
  1. When a page that is needed is found in memoru
51
Q

What does Page Replacements are based on what?

A
  1. Trying to find free frames
52
Q

When does Page Replacement Algorithm are used?

A
  1. When there exists no free frames
53
Q

Summarize how FIFO does as Page Replacement Algorithm

A
  1. First-In-First-Out replaces the oldest page
54
Q

Summarize how Optimal does as Page Replacement Algorithm

A
  1. Replaces the pages that is least likely to be used
55
Q

Summarize how Least Recently Used does as Page Replacement Algorithm

A
  1. Replaces the page that has not been used recently
56
Q

When does Thrashing occurs?

A
  1. When page replacement activities occurs more then process execution
57
Q

Describe the term below:
1. First Fit
2. Best Fit
3. Worst Fit

A
  1. First Fit
    • Allocates the first space available to fit the process
  2. Best Fit
    • Allocated the smallest space that will fit the process
  3. Worst Fit
    • Allocate the largest space available