Module 4 Flashcards

(65 cards)

1
Q

It is a technique that allows the execution of processes that may not be completely in memory.

A

Virtual Memory

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

True or Flase
In Virtual Memory, programs can be larger than physical memory.

A

True

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

Virtual Memory _________ main memory into a large uniform array of storage.

A

Abstracts

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

Virtual Memory ___________ logical memory from physical memory and allows users to have a large virtual memory with a small physical memory.

A

Separates

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

True or False
Virtual Memory frees the concerns of memory storage limitations.

A

True

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

True or False
In Virtual Memory, multiple programs do not need to be in main memory at the same time.

A

True

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

What are the benefits of Virtual Memory?

A
  • A program would no longer be constrained by the amount of physical memory available.
  • More programs could run at the same time.
  • Less I/O is needed to load or swap each program into memory (i.e. it runs faster).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

This system is similar to a paging system with swapping.

A

Demand-Paging System

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

This is when the OS or pager swaps only the necessary pages into memory.

A

Lazy Swapping

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

In Demand-Paging, there is an additional bit in the page table which is the __________.

A

Valid-Invalid Bit

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

It is when the page is in memory/primary memory.

A

Valid Bit

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

It is when the page is in secondary storage.

A

Invalid Bit

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

Using a page not in physical memory will result in a __________.

A

Page-Fault

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

This will cause a trap indicating an invalid address error.

A

Page-Fault

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

Steps in Handling Page-Fault:

A

Step 1: The system could start executing a process with no pages in memory in extreme
cases. It would immediately fault for the page with the first instruction.
Step 2: After the first page is brought into memory, the process would continue to execute,
faulting as necessary until every page that it needed was actually in memory.
Step 3: This is pure demand paging: never bring a page into memory until it is required.
Step 4: The principle of locality of reference ensures that programs do not access a new
page of memory with each instruction execution.
Step 5: The effectiveness of the demand paging is based on the locality of reference.
Step 6: Analysis of programs shows that most of their execution time is spent on routines in
which many instructions are executed repeatedly.
Step 7: It is important to keep the page-fault rate low in a demand-paging system. Otherwise,
the effective access time increases, slowing down process execution dramatically.
Step 8: A problem occurs if there is a need to transfer a page from disk to memory but there is
no memory space or free frames available. In other words, memory is over-allocated.

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

What step is this in handling Page-Fault?

The system could start executing a process with no pages in memory in extreme
cases. It would immediately fault for the page with the first instruction.

A

Step 1

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

What step is this in handling Page-Fault?

After the first page is brought into memory, the process would continue to execute,
faulting as necessary until every page that it needed was actually in memory.

A

Step 2

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

What step is this in handling Page-Fault?

This is pure demand paging: never bring a page into memory until it is required.

A

Step 3

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

What step is this in handling Page-Fault?

The principle of locality of reference ensures that programs do not access a new
page of memory with each instruction execution.

A

Step 4

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

What step is this in handling Page-Fault?

It is important to keep the page-fault rate low in a demand-paging system. Otherwise,
the effective access time increases, slowing down process execution dramatically.

A

Step 7

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

What step is this in handling Page-Fault?

Analysis of programs shows that most of their execution time is spent on routines in
which many instructions are executed repeatedly.

A

Step 6

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

What step is this in handling Page-Fault?

A problem occurs if there is a need to transfer a page from disk to memory but there is
no memory space or free frames available. In other words, memory is over-allocated.

A

Step 8

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

How many steps are there in handling Page-Fault?

A

8 Steps

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

True or False
The operating system could terminate the user process. However, demand paging is the operating system’s attempt to improve the computer system’s utilization and throughput.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
True or False Users should not be aware their processes are running on a paged system; paging should be logically transparent to the user.
True
26
In this scheme, the operating system removes or replaces one of the existing pages in memory to give way for the incoming page.
Page Replacement
27
This algorithm is used to select which pages in memory will be replaced.
Page Replacement Algorithm
28
Page Replacement takes the following approach:
- If no frame is free, the system finds one that is currently being used and frees it. - Freeing a frame means transferring its contents to the disk and changing the page table (and all other tables) to indicate that the page is no longer in memory.
29
True or False In Page Replacement, if no frame is free, the system finds one that is currently being used and frees it.
True
30
True or False In Page Replacement, freeing a frame means transferring its contents to the disk and changing the page table (and all other tables) to indicate that the page is no longer in memory.
True
31
True or False The Page Fault Service Routine is now modified to include Page Replacement.
True
32
What are the steps of Page Fault Service Routine?
1. Find the location of the desired page on the disk. 2. Find a free frame 3. If there is a free frame, use it. 4. Otherwise, use a page-replacement algorithm to select a victim frame. 5. Write the victim page to the disk; change the page and frame tables accordingly. 6. Read the desired page into the newly free frame; change the page and frame tables. 7. Restart the user process.
33
What step is this in the Page Fault Service Routine? Find the location of the desired page on the disk.
Step 1
34
What step is this in the Page Fault Service Routine? Find a free frame
Step 2
35
What step is this in the Page Fault Service Routine? If there is a free frame, use it.
Step 3
36
What step is this in the Page Fault Service Routine? Otherwise, use a page-replacement algorithm to select a victim frame.
Step 4
37
What step is this in the Page Fault Service Routine? Write the victim page to the disk; change the page and frame tables accordingly.
Step 5
38
What step is this in the Page Fault Service Routine? Read the desired page into the newly free frame; change the page and frame tables.
Step 6
39
What step is this in the Page Fault Service Routine? Restart the user process.
Step 7
40
How many steps are there in the Page Fault Service Routine?
7 Steps
41
In Page Replacement, if no frames are free, how many page transfers are required?
Two page transfers (one out and one in)
42
True or False In Page Replacement, two page transfers doubles the Page-Fault Service time and increases the effective access time accordingly.
True
43
To reduce overhead, __________ is necessary for each page or frame.
Modify Bit or Dirty Bit
44
This bit is set when a byte is written into to indicate that the page has been modified.
Modify Bit
45
True or False An incoming page can overwrite an unchanged page whose modify bit is 0.
True
46
These are techniques which an OS decides which memory pages to swap out, write to disk when a page of memory need to be allocated.
Page Replacement Algorithms
47
A good Page-Replacement algorithm is one with __________.
Low Page-Fault rate
48
An algorithm is evaluated by running it on a particular _____________ and computing the number of page faults.
Reference String
49
It is the simplest page-replacement algorithm; the oldest page is used to replace a page.
First-In First-Out (FIFO/Queue) Algorithm
50
In this algorithm, it is not necessary to record the time when a page is brought in.
FIFO Algorithm
51
True or False In FIFO Algorithm, the head of the queue is replaced if a frame is needed and brought into memory at the tail of the queue.
True
52
True or False FIFO Algorithm performance is not always good.
True
53
True or False In FIFO Algorithm, even if the algorithm selects for replacement a page that is in active use, everything still works correctly.
True
54
In FIFO Algorithm, a _______ increases the page-fault rate and slow process execution, but does not cause incorrect execution.
Bad replacement choice
55
The ______________ in physical memory, the lower the page-fault rate.
More frames available
56
It is the instance where the page-fault rate increases as the number of physical memory frames increases.
Belady's Anomaly
57
This algorithm has the lowest page-fault rate of all algorithms.
Optimal Algorithm
58
In Optimal Algorithm, the ___________ is the one that will not be used for the longest period of time.
Page replaced
59
True or False In Optimal Algorithm, if the first three page-faults are ignored, the algorithm is twice as good as FIFO Algorithm.
True
60
This algorithm is difficult to implement since it requires future knowledge of the reference string.
Optimal Algorithm
61
This algorithm is used mainly for comparison studies.
Optimal Algorithm
62
This algorithm uses the recent pas to approximate the near future.
Least Recently Used (LRU) Algorithm
63
This algorithm, similar to the Optimal Algorithm, replaces the page that has not been used for the longest period of time.
Least Recently Used (LRU) Algorithm
64
The ________ is often used as a page replacement algorithm and is considered to be quite good.
LRU policy
65
True of False A major problem in LRU Algorithm is how to implement the LRU replacement.
True