Module 4 Flashcards

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
Q

True or False
Users should not be aware their processes are running on a paged system; paging should be logically transparent to the user.

A

True

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

In this scheme, the operating system removes or replaces one of the existing pages in memory to give way for the incoming page.

A

Page Replacement

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

This algorithm is used to select which pages in memory will be replaced.

A

Page Replacement Algorithm

28
Q

Page Replacement takes the following approach:

A
  • 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
Q

True or False
In Page Replacement, if no frame is free, the system finds one that is currently being used and frees it.

A

True

30
Q

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.

A

True

31
Q

True or False
The Page Fault Service Routine is now modified to include Page Replacement.

A

True

32
Q

What are the steps of Page Fault Service Routine?

A
  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
Q

What step is this in the Page Fault Service Routine?

Find the location of the desired page on the disk.

A

Step 1

34
Q

What step is this in the Page Fault Service Routine?

Find a free frame

A

Step 2

35
Q

What step is this in the Page Fault Service Routine?

If there is a free frame, use it.

A

Step 3

36
Q

What step is this in the Page Fault Service Routine?

Otherwise, use a page-replacement algorithm to select a victim frame.

A

Step 4

37
Q

What step is this in the Page Fault Service Routine?

Write the victim page to the disk; change the page and frame tables accordingly.

A

Step 5

38
Q

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.

A

Step 6

39
Q

What step is this in the Page Fault Service Routine?

Restart the user process.

A

Step 7

40
Q

How many steps are there in the Page Fault Service Routine?

A

7 Steps

41
Q

In Page Replacement, if no frames are free, how many page transfers are required?

A

Two page transfers (one out and one in)

42
Q

True or False
In Page Replacement, two page transfers doubles the Page-Fault Service time and increases the effective access time accordingly.

A

True

43
Q

To reduce overhead, __________ is necessary for each page or frame.

A

Modify Bit or Dirty Bit

44
Q

This bit is set when a byte is written into to indicate that the page has been modified.

A

Modify Bit

45
Q

True or False
An incoming page can overwrite an unchanged page whose modify bit is 0.

A

True

46
Q

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.

A

Page Replacement Algorithms

47
Q

A good Page-Replacement algorithm is one with __________.

A

Low Page-Fault rate

48
Q

An algorithm is evaluated by running it on a particular _____________ and computing the number of page faults.

A

Reference String

49
Q

It is the simplest page-replacement algorithm; the oldest page is used to replace a page.

A

First-In First-Out (FIFO/Queue) Algorithm

50
Q

In this algorithm, it is not necessary to record the time when a page is brought in.

A

FIFO Algorithm

51
Q

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.

A

True

52
Q

True or False
FIFO Algorithm performance is not always good.

A

True

53
Q

True or False
In FIFO Algorithm, even if the algorithm selects for replacement a page that is in active use, everything still works correctly.

A

True

54
Q

In FIFO Algorithm, a _______ increases the page-fault rate and slow process execution, but does not cause incorrect execution.

A

Bad replacement choice

55
Q

The ______________ in physical memory, the lower the page-fault rate.

A

More frames available

56
Q

It is the instance where the page-fault rate increases as the number of physical memory frames increases.

A

Belady’s Anomaly

57
Q

This algorithm has the lowest page-fault rate of all algorithms.

A

Optimal Algorithm

58
Q

In Optimal Algorithm, the ___________ is the one that will not be used for the longest period of time.

A

Page replaced

59
Q

True or False
In Optimal Algorithm, if the first three page-faults are ignored, the algorithm is twice as good as FIFO Algorithm.

A

True

60
Q

This algorithm is difficult to implement since it requires future knowledge of the reference string.

A

Optimal Algorithm

61
Q

This algorithm is used mainly for comparison studies.

A

Optimal Algorithm

62
Q

This algorithm uses the recent pas to approximate the near future.

A

Least Recently Used (LRU) Algorithm

63
Q

This algorithm, similar to the Optimal Algorithm, replaces the page that has not been used for the longest period of time.

A

Least Recently Used (LRU) Algorithm

64
Q

The ________ is often used as a page replacement algorithm and is considered to be quite good.

A

LRU policy

65
Q

True of False
A major problem in LRU Algorithm is how to implement the LRU replacement.

A

True