Virtual Memory

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 17

1) Virtual memory

1) allows the execution of processes that may not be completely in the memory
2) abstracts main memory as viewed by the user from physical memory.
3) allows processes to easily share files.
4) All the above Answer: 4

2) ________ holds those pages that are not present in main memory.
Answer: Secondary memory

3) A common approach for handling address spaces larger than 32 bits is to use a
hashed page table. True / False?Answer: True

4) Virtual memory is commonly implemented by demand paging.

True /False ?

Answer: True

5) Access to a page marked invalid causes a Page- fault trap. True/ False?

Answer: True

6) The effects of thrashing can be limited by using a local page replacement


algorithm. True/False? Answer: True

7) The minimum number of page frames that must be allocated to a running process in a
virtual memory environment is determined by
1) the instruction set architecture
2) page size
3) physical memory size
4) number of processes in memory
Answer: 4

8) Which of the following is a page replacement technique?


1) Least recently used
2) Shortest job first
3) Optimal page replacement
4) 1,3
Ans: 4

9) The problem of thrashing can be solved using

1) Local replacement algorithm


2) Priority algorithm
3) both

4) None

Answer: 3

10) __________ is a policy that a page is not read into memory until it is requested, that is, until
there is a page fault for that page.

1) Demand paging

2) Paging

3) Thrashing

4)

Answer: 1

11) The problem of many page faults occurring in a short time is called _________.

1) Demand paging

2) Paging

3) Page Thrashing

4) None

Answer: 3

By def

12) In FIFO ( Page replacement algorithm) for the given sequence

7, 0, 1, 2, 0 ,3 ,0 , 4, 2, 3, 0, 3, 2, 1 ,2, 0, 1, 7, 0, 1

There are only 3 frames, what will be the ending sequence

7, 0, 1

1, 0, 7

0, 1 , 7

0, 7, 1
Answer: 1

13) In Optimal Page replacement ( Page replacement algorithm) for the given
sequence

7, 0, 1, 2, 0 ,3 ,0 , 4, 2, 3, 0, 3, 2, 1 ,2, 0, 1, 7, 0, 1

There are only 3 pages what will be the ending sequence in the given three pages.

1) 7, 0, 1
2) 1, 0 , 7

3) 0, 1, 7

4) 0, 7, 1

Answer: 1

14) In Least recently used ( Page replacement algorithm) for the given sequence

7, 0, 1, 2, 0 ,3 ,0 , 4, 2, 3, 0, 3, 2, 1 ,2, 0, 1, 7, 0, 1

There are only 3 pages what will be the ending sequence in the given three pages.

1) 7, 0, 1
2) 1, 0, 7

3) 0, 1 , 7

4) 0, 7, 1

Answer: 2

15) In FIFO( page replacement algorithm) for the given sequence

7, 0, 1, 2, 0, 2, 0, 4, 2, 3, 0, 2, 3, 1, 2, 7, 1, 0, 0, 1

There are only 3 pages, what will be the ending sequence in the given 3 pages?

7, 0, 1

1, 0, 7

0, 1 , 7

0, 7, 1
Answer: 1

16) In Optimal Page replacement ( page replacement algorithm) for the given
sequence

7, 0, 1, 2, 0, 2, 0, 4, 2, 3, 0, 2, 3, 1, 2, 7, 1, 0, 0, 1

There are only 3 pages, what will be the ending sequence in the given 3 pages?

1) 7, 0, 1
2) 1, 0, 7

3) 0, 1 , 7

4) 0, 7, 1

Answer: 1

17) In Least Recently Used( page replacement algorithm) for the given sequence

7, 0, 1, 2, 0, 2, 0, 4, 2, 3, 0, 2, 3, 1, 2, 7, 1, 0, 0, 1

There are only 3 pages, what will be the ending sequence in the given 3 pages?

7, 0, 1

1, 0, 7

0, 1 , 7

0, 7, 1

Answer: 4

18) Thrashing _______

1) is a natural consequence of virtual memory systems


2) Can always be avoided by swapping

3) Always occurs on large main memory

4) Can be caused by poor paging algorithms

Answer: 4

19) Which of the following is a service NOT supported by the OS?


1) Protection

2) Accounting

3) Compilation

4) I/O operations

Answer: 3

20) To increase CPU utilization and stop thrashing we must _______ the degree of
multiprogramming.

1) increase

2) decrease

3) optimize

4) None

Answer: 3

21) The page replacement algorithm which uses the recent history as an approximation of the near
future , then it replaces the page that has not been used for the longest period of time. This
algorithm is known as ___________.

1) FCFS

2) Optimal page replacement Algorithm

3) LRU Algorithm

4) None

Answer: 3

22) The page replacement algorithm which replaces the page that will not be used for the longest
period of time. This algorithm is known as __________.

1) FCFS

2) Optimal Page Replacement Algorithm

3) LRU Algorithm
4) None

Answer: 2

23) The page replacement algorithm which replaces the oldest page in the table. This page
replacement algorithm is known as _____________.

1) FCFS

2) Optimal Page Replacement Algorithm

3) LRU Algorithm

4) None

Answer: 1

24) Page size is always in powers of 2. True / False?

Answer: True

25) Special relocation and linking algorithms are needed to construct overlays. True/False

Answer: True

26)Swapping of two processes can be done using a disk as a backing store. True/False

Answer: True

27) One solution to the problem of external fragmentation is Compaction. True/ False?

Answer: True

28) The First fit, Worst fit, Best fit algorithms suffer from the problem of external fragmentation?
True/ False

Answer: True

29) The percentage of times that a particular page number is found in the TLB ( Transfer Look-
aside Buffer) is called the Hit ratio. True/ False?

Answer: True

30) DLL stands for ________-

Answer: Dynamic Link Library


31) Large Page size lead to ___________

1) External fragmentation

2) Internal Fragmentation

3) Compaction

4) None

Answer: 2

32) In paging what is added to the logical address to generate physical address

1) stub

2) offset

3) frame number

4) None

Answer:2

33) Page offset is stored in _________

1) page table

2) frame table

3) Address table

4) none

Answer: 1

34) Physical addresses refer to _________

1) page table

2) frame table

3) Address table

4) none
Answer: 2

35) TLB stands for _____________

Answer: Transition Look-aside Buffer

36) Virtual memory is commonly implemented by___________.

1) paging

2) segmentation

3) demand paging

4) None

Answer: 3

37) A swapper never swaps a page into memory unless that page will be needed.

1) lazy swapper

2) paging

3) context switching

4) None

Answer:1

38) Allowing a part of the virtual address space to be logically associated with a file is known as
___________

1) Address mapping

2) Logical mapping

3) Memory mapping

4) None

Answer: 3

39) In virtual memory Modify bit is known as ___________

1) enhancement bit
2) update bit

3) dirty bit

4) address bit

Answer:3

40) LRU stands for _______________(page replacement technique)

Answer: Least Recently used

41) __________ allows a process to select a replacement frame from the set of all frames, even
if that frame is currently allocated to some other process; one process can take a frame from
another.

1) Global Replacement

2) Local Replacement

3) Swapping

4) None

Answer:1

42) ________________ requires that each process select from only its own set of allocated
frames.

1) Global Replacement

2) Local Replacement

3) Swapping

4) None

Answer:2

43) High paging activity is known as __________

1) page fault

2) thrashing

3) paging
4) swapping

Answer: 2

44) Thrashing is directly proportional to __________

1) speed of the processor

2) free main memory space

3) degree of multiprogramming

4) None

Answer:3

45) Local Replacement algorithm is also known as ___________

1) swapping

2) priority replacement

3) round robin replacement

4) None

Answer:2

46) RAID stands for __________________

1) Rapid application integrated development

2) Redundant Array of Independent Disks

3) Resource Application integrated Deployment

4) None

Answer: 2

47) Mechanism that brings a page into memory when needed, less i/o needed, less memory
needed, faster response, more users is called____

1) Segmentation

2) Fragmentation
3) Demand Paging

4) Page replacement

Answer: 3

48) As the number of frames allocated to a process increases, the page fault rate ____

1) Increases

2) No change

3) Decreases

4) None

Answer: 3

49) Problem caused by fixed partitioning of memory is _________.

1) Compaction

2) Internal fragmentation

3) External fragmentation

4) Relocation

Answer: 3

50) _________ allows memory to be non-contigious.

1) Swapping
2) Buffering

3) Paging

4) Scheduling

Answer: 3

51) Frames reside in _______.

1) Disk

2) Files
3) Main memory

4) Tap

Answer: 3

52) _____ allows process not to be completely in memory for execution.

1) Multiprogramming
2) Relocation

3) Virtual memory

4) Multitasking.

Answer: 3

53) ______ is the difference between the size of memory allocated to a process and the actual
size of the process.

1) External fragmentation

2) Internal fragmentation

3) Compaction

4) Contiguity

Answer: 2

54) A page and a page frame are related by the fact that they are ________

1) in main memory

2) of the same size

3) in backing store

4) contiguous

Answer: 2

55) “Replace the page that will not be used for longest period of time “ is followed by _____
page replacement algorithm.

1) FIFO
2) Optimal page

3) LRU

4) None

Answer: 2

56) Virtual memory is commonly implemented by

1) Segmentation

2) Demand paging

3) Swapping

4) Al the above

Answer: 2

57) Which of the following is not true?

1) Size of page is equal to size of frame

2) Page fault occurs when the page is not in page table

3) Internal fragmentation occurs out of a page

4) Main memory addresses are called physical addresses.

Answer: 3

58) If a process is spending more time paging than executing it is called _____

1) Starvation

2) Paging

3) Thrashing

4) Blocking

Answer: 1

59) A virtual memory system generates a logical address that includes a 10 bit offset. The size
of the page is _____.
1) 1k

2) 10k

3) 256 bytes

4) 4k

Answer: 1

60) Virtual memory is __________.

1) An extremely large main memory


2) An extremely large secondary memory
3) An illusion of extremely large main memory
4) A type of memory used in super computers.
Ans : 3
61) The problem of thrashing is affected scientifically by ________.
1) Program structure
2) Program size
3) Primary storage size
4) None of the above
Ans: - 1
62) If all page frames are initially empty, and a process is allocated 3 page frames in real memory
and references its pages in the order 1 2 3 2 4 5 2 3 2 4 1 and the page replacement is FIFO, the
total number of page faults caused by the process will be __________.

1) 10
2) 7
3) 8
4) 9

Ans: - 4
63) Replace the page that will not be used for the longest period of time. This principle is adopted
by ____________.

1) FIFO Page replacement algorithm


2) Optimal Page replacement algorithms
3) Round robin scheduling algorithm
4) SCAN scheduling algorithm
Ans: - 3
64) Virtual Memory is commonly implemented by __________.

1) Segmentation
2) Swapping
3) Demand Paging
4) None of the above
Ans: - 3

65) _______ is a high speed cache used to hold recently referenced page table entries a part of
paged virtual memory

1) Translation Look aside buffer


2) Inverse page table
3) Segmented page table
4) All the above
Ans: - 1
66) In a virtual memory environment

1) segmentation and page tables are stored in the cache and do not add any substantial
overhead
2) slow down the computer system considerable
3) segmentation and page tables are stored in the RAM
4) none of the above
Ans: - 3

67) Consider an operating system capable of loading and executing a single


sequential user process at a time. The disk head scheduling algorithm used is First Come First
Served (FCFS). If FCFS is replaced by Shortest Seek Time First (SSTF), claimed by the vendor to
give 50% better benchmark results, what is the expected improvement in the I/O performance of
user programs ?

1) 50%

2) 40%

3) 25%

4) 0%

Answer: 4

68) Address Binding can be done at


1) Compile time
2) Load time
3) Execution time
4) All of these
Answer:4
69) Paged memory allocation is based on the concept of:
1) Eliminating internal fragmentation
2) Breaking a program up into smaller programs
3) Dividing each incoming job into pages of equal size
4) Having the memory manager "page" the queued program when it is ready for it
Answer:3
70) Which one is best storage allocation policy?
1) Worst Fit
2) Best Fit
3) First Fit
4) None of these
Answer: 2
71) Memory mapped I/O involves
1) transferring information between memory locations
2) transferring information between registers and memory
3) transferring information between the CPU and I/O devices in the same way as between
the CPU and memory
4) transferring information between I/O devices and memory
Answer: 4
72) Multiprogramming refers to
1) having several programs in RAM at the same time
2) multitasking
3) writing programs in multiple languages
4) none of the above
Answer: 1
73) Multitasking refers to
1) having several programs in RAM at the same time
2) the ability to run 2 or more programs concurrently
3) writing programs in multiple languages
4) none of the above
Answer:2

74) Which of the following could be considered an advantage of Virtual Memory Management?
1) Job size is no longer restricted to the size of main memory
2) Thrashing may occur when a program requires two or more pages
3) Only a part of each page needs to be loaded into memory
4) All of these
Answer:1

75) Which of the following is not an example of a processor-bound job?


1) Statistical analysis of student performance
2) Iterative calculation of a square root
3) Backing up a hard drive to tape
4) Having a program calculate the first 20 prime numbers
Answer:3

76) In the fixed-partition memory management scheme, a job might not be able to run because no
free partition is large enough for it, even though the total unused space in all partitions was more
than what was needed for the job. This is an example of:
1) Dynamic partitions
2) Re-locatable dynamic partitions
3) Internal fragmentation
4) External fragmentation
Answer:4

You might also like