MEMORY MANAGEMENT
1) In ___________total memory space exists to satisfy a request, but it is not contiguous.
1) Segmentation
2) External fragmentation
3) Internal fragmentation
4) Paging
Answer: 2
Exp: external fragmentation is non contiguous.solution is paging
Level:1
2) In _________allocated memory may be slightly larger than requested memory; this size
difference is memory internal to a partition, but is not being used. 1) Fragmentation 2) External
fragmentation 3) Internal fragmentation 4) Paging
Answer: 3
Exp: by def
Level:1
3) problems with multiprogrammed systems with fixed-partitioning
1) Internal fragmentation.
2) Inability to run processes greater in size than a partition, but smaller then memory
3) None
4) both 1 and 2
Answer: 4
Exp: paging does not solve internal fragmentation
Level:1
4) Assume a system protected with base-limit registers. What are the problems with such a
protected system (compared to a paged or segmented VM system)?
1) Partitions must be contiguous - external fragmentation.
2) Entire process must be in memory.
3) Cannot practically share memory with other processes.
4) All the above
Answer: 4
Exp: problems with multi processor systems
Level:1
5) MMU stands for __________
Answer: Memory management Unit
Exp: acronym
Level:1
6) Run time mapping from virtual to physical addresses is done by a hardware device called
_______
1) Memory Allocator
2) Memory Management Unit
3) Memory utilizer
4) Memory Optimizer
Answer: 2
Exp: by def
Level:1
7) In dynamic linking, a stub is used to indicate
1) how to locate the appropriate memory resident library routine.
2) how to load the library if the routine is not already present.
3) Both
4) None
Answer: 3
Exp: by def
Level:2
8) to enable a process to be larger than the amount of memory allocated to it ___________ is
used.
1) stub
2) overlays
3) both
4) none
Answer: 2
Exp: by def
Level: 1
9) The process of shuffling the memory contents to place all free memory together in one large
block is called ___________.
1) Fragmentation
2) Segmentation
3) Paging
4) Compaction
Answer: 4
Exp: by def
Level:1
10) ________ is a memory management scheme which permits the physical- address space of
a process to be non-contiguous.
1) Fragmentation
2) Segmentation
3) Paging
4) Compaction
Answer: 3
Exp: by def
Level:1
11) Physical memory is broken into fixed sized blocks called________
1) pages
2) frames
3)segments
4) None of the above
Answer: 2
Exp: by def
Level:1
12) Logical memory is broken into fixed sized blocks called________
1) pages
2) frames
3)segments
4) None of the above
Answer: 1
Exp: by def
Level:1
13) Page size is always
1) in powers of 2
2) any number
3) in powers of 3
4) any of the above
Answer: 1
Exp: since bits are in powers of 2
Level: 2
14) _____________ is caused by under allocation of minimum number of pages required by a
process, forcing it to continuously page fault.
Answer: Thrashing
Exp: by def
Level:1
15) What can the system do to eliminate thrashing?
1) Reduce the level of multiprogramming
2) Reduce the level of multitasking
3) Both 1 and 2
4) The system cant do anything
Answer: 1
Exp: by its service
Level:1
16) Which scheduling does Solaris2 use?
1) priority based scheduling
2) round robin
3) FCFS
4)SJF
Answer:1
Exp: by its service
Level:2
17) Which algorithms does Linux use for scheduling?
1)Prioirty based scheduling.
2) time sharing algorithm
3) absolute priority for real time operations
4) round robin
Answer: 2 and 3
Exp: service
Level:2
18) Under what circumstances do page faults occur?
a) when an access to a page that has not been brought into main memory takes place.
b) when no pages are loaded into main memory
c) when the access to the page is denied due to some reasons(such as protection)
d) none
Answer: a
when a page is not there in the memory and try to access that page a page fault occurs.
Level:2
19) state whether true or false?
The operating system verifies the memory access, aborting the program if it is invalid. If it is valid,
a free frame is located and I/O is requested to read the needed page into the free frame.
Answer: true
Level:2
20) Assume that you have a page-reference string for a process with m frames (initially all empty).
The page-reference string has length p; n distinct page numbers occur in it. What is a lower bound
on the number of page faults?
a) n
b) p
c) np
d) none
Answer: a
Level:2
21) Assume that you have a page-reference string for a process with m frames (initially all empty).
The page-reference string has length p; n distinct page numbers occur in it.What is an upper bound
on the number of page faults?
a. n
b. p
c. np
d.none
Answer: b
Level:2
22) Which of the following programming techniques and structures are “good” for a demand-paged
environment ?
a) Stack
b) Hashed symbol table
c) Sequential search
d) Binary search
e) Pure code
f) Vector operations
g) Indirection
1) 1,2,5,6
2) 2,3,4,5
3) 3,5,6,7
4) 1,3,5,6
Answer: 4
Level:2
23) Which of the following programming techniques and structures are “not good” for a demand-
paged environment ?
a) Sequential search
b) Binary search
c) Pure code
d) hashed symbol table
e) stack
f) Indirection
g) vector operations
1) 2,3,6
2) 1,3,5
3) 2,4,6
4) 2,4,7
Answer: 3
Level:2
24) Arrange the following page replacement algorithms on a five-point scale from “bad” to “perfect”
according to their page-fault rate.
1)LRU replacement,2) FIFO replacement,3) optimal replacement,4) Second-chance replacement
1) rank1-LRU,rank2-FIFO,rank3-Optimal,rank4-Second-chance
2) rank1-Optimal,rank2-LRU,rank3-Second-chance,rank4-FIFO
3) rank1-FIFO,rank2-LRU,rank3-Second-chance,rank4-Optimal
4) rank1-Optimal,rank2-FIFO,rank3-LRU,rank4-Second-chance
Answer: 2
Level:2
25) which of the following page-replacements suffer from Belady’s anamoly?
a) 1 Optimal
b) 2 LRU
c) 3 Second-chance
d) 4 FIFO
1) 1,2
2) 1,3
3) 2,4
4) 3,4
Answer: 4
Level: 2
26) which of the following page-replacement algorithms do not suffer from Belady’s anamoly?
a) Optimal
b) LRU
c) Second-chance
d) FIFO
1) 1,3
2) 2,4
3) 1,2
4) 2,3
Answer: 3
Level:2
27) FIFO page-replacement algorithm does not suffer from Belady’s anamoly? True/false
Answer: false
Level:2
28) LRU page-replacement algorithm does not suffer from Belady’s anamoly? True/false
Answer: true
Level:2
29) Optimal page-replacement algorithm suffer from Belady’s anamoly? True/false
Answer: false
Level:2
30) Second-chance page-replacement algorithm suffer from Belady’s anamoly? True/false
Answer: true
Level:2
31) When virtual memory is implemented in a computing system the costs are______
1) Slower access time
2) additional hardware
3) both
4) none
Answer: 3
Level:2
32) when virtual memory is implemented in a computing system the costs are __________?
1) good utilization of memory
2) b)larger logical address space than physical address space.
3) both
4) none
Answer: 3
Level:2
33) An operating system supports a paged virtual memory, using a central processor with a cycle
time of 1 microsecond. It costs an additional 1 microsecond to access a page other than the
current one. Pages have 1000 words, and the paging device is a drum that rotates at 3000
revolutions per minute and transfers 1 million words per second. The following statistical
measurements were obtained from the system:
• 1 percent of all instructions executed accessed a page other than the current page.
• Of the instructions that accessed another page, 80 percent accessed a page already in memory.
• When a new page was required, the replaced page was modified 50 percent of the time.
Calculate the effective instruction time on this system, assuming that the system is running one
process only and that the processor is idle during drum transfers.?
1) 34.0 * 10-6 sec
2) 25.0 * 10-6 sec
3) 34.0 * 10-3 sec
4) 25.0 * 10-3 sec
Answer: a
effective access time = 0.99 × (1 *10-6 sec + 0.008 × (2 *10-6sec)
+ 0.002 × (10,000*10-6 sec + 1,000 *10-6sec)
+ 0.001 × (10,000*10-6 sec + 1,000 *10-6sec)
= (0.99 + 0.016 + 22.0 + 11.0) *10-6 sec
= 34.0 *10-6sec
Level: 3
34) Consider the two-dimensional array A:
int A[][] = new int[100][100];
where A[0][0] is at location 200, in a paged memory system with pages of size 200. A small
process is in page 0 (locations 0 to 199) for manipulating the matrix; thus, every instruction fetch
will be from page 0.For three page frames, how many page faults are generated by the following
array-initialization loops, using LRU replacement, and assuming
page frame 1 has the process in it, and the other two are initially empty?
1. for (int j = 0; j < 100; j++)
for (int i = 0; i < 100; i++)
A[i][j] = 0;
a) 100
b) 50
c) 125
d) 150
Answer: b
Level: 3
35) Consider the two-dimensional array A:
int A[][] = new int[100][100];
where A[0][0] is at location 200, in a paged memory system with pages of size 200. A small
process is in page 0 (locations 0 to 199) for manipulating the matrix; thus, every instruction fetch
will be from page 0.For three page frames, how many page faults are generated by the following
array-initialization loops, using LRU replacement, and assuming
page frame 1 has the process in it, and the other two are initially empty?
for (int i = 0; i < 100; i++)
for (int j = 0; j < 100; j++)
A[i][j] = 0;
1) 1000
2) 1500
3) 5000
4) 2500
Answer: 3
Level:3
36) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for LRU page replacement algorithm assuming there are five
frames and all frames are initially empty
1) 6
2) 8
3) 9
4) 12
Answer: 2
Level:2
37) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for LRU page replacement algorithm assuming there are seven
frames and all frames are initially empty
a) 7
b) 8
c) 9
d) 11
Answer: a
Level:2
38) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for LRU replacement algorithm assuming there are two frames
and all frames are initially empty
a) 20
b) 17
c) 18
d) 12
Answer:c
Level:2
39) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for Optimal page replacement algorithm assuming there are six
frames and all frames are initially empty
a) 11
b) 6
c) 7
d) 16
Answer: c
Level:2
40) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for Optimal page replacement algorithm assuming there are
three frames and all frames are initially empty
a) 12
b) 14
c) 18
d) 11
Answer:d
Level:2
41) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for FIFO page replacement algorithm assuming there are five
frames and all frames are initially empty
a) 10
b) 11
c) 18
d) 20
Answer: a
Level:2
42) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for FIFO page replacement algorithm assuming there are four
frames and all frames are initially empty
a) 11
b) 10
c) 14
d) 18
Answer: c
Level:2
43) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for FIFO page replacement algorithm assuming there are six
frames and all frames are initially empty
a) 11
b) 10
c) 18
d) 16
Answer: b
Level:2
44) Suppose that you want to use a paging algorithm that requires a reference bit (such as second-
chance replacement), but the hardware does not provide one. Arrange the steps how you could
simulate a reference bit even if one were not provided by the hardware.
a) reset the valid/invalid bit to valid.
b) The operating system will set a software bit to 1
c) set the bit to invalid.
d) On first reference a trap to the operating system is generated.
1) 1,2,3,4
2) 2,4,1,3
3) 4,1,2,3
4) 3,4,2,1
Answer: 4
Level:2
45) You have devised a new page-replacement algorithm that you think may be optimal. In some
contorted test cases, Belady’s anomaly occurs. Is the new algorithm optimal? Yes/no
Answer: no
Expl: An optimal algorithm replaces the page that will not be used for the longest time. Belady’s
anomaly occurs when a page-replacement algorithm evicts a page that will be needed in the
immediate future. An optimal algorithm would not have selected such a page.
Level:2
46) Segmentation is different from paging? True/false
Answer: false
Segmentation uses variable-sized “pages.”
Level:2
47) Consider a demand-paged computer system where the degree of multiprogramming is
currently fixed at four. The system was recently measured to determine utilization of CPU and the
paging disk. The results are as follows.what is happening? CPU utilization 13 percent; disk
utilization 97 percent
1) multi-programming is sufficiently high
2) CPU utilization is high
3) thrashing is occurring
4) both 1 and 2
Answer: 3
Level:2
48) Consider a demand-paged computer system where the degree of multiprogramming is
currently fixed at four. The system was recently measured to determine utilization of CPU and the
paging disk. The results are as follows.what is happening?
CPU utilization 87 percent; disk utilization 3 percent
1) Thrashing is occurring
2) multi-programming is high
3) CPU utilization is high
4) both b and c
Answer: 4
Level:2
49) Consider a demand-paged computer system where the degree of multiprogramming is
currently fixed at four. The system was recently measured
to determine utilization of CPU and the paging disk. The results are as follows.what is happening?
CPU utilization 13 percent; disk utilization 3 percent
1) Thrashing is occurring.
2) CPU utilization is sufficiently high to leave things alone and increase degree of
multiprogramming.
3) Increase the degree of multiprogramming
4) none
Answer: 3
Level:2
50) We have an operating system for a machine that uses base and limit registers, but we have
modified the machine to provide a page table. How can the page tables be set up to simulate base
and limit registers?
1) memory is allocated in fixed-size segments
2) specifying the base and limit registers for each segment
3) implementing paging technique
4) none
Answer: 1
the base of a segment can be entered into the page table and the valid/invalid bit used to indicate
that portion of the segment as resident in the memory.
Level:2
51) _________ occurs in a dynamic memory allocation when many of the free blocks are
too small to satisfy any request.
1) Fragmentation
2) Segmentation
3) Both
4) None
Answer: 1
Level:2
52) ________ happens when a dynamic memory allocation algorithm allocates some
memory and a small piece is left over that cannot be effectively used.
1) External Fragmentation
2) Internal Fragmentation
3) Both
4) None
Answer: 1
Level:2
53) Disc which has a boot partition is called _______
1) System disc
2) Partition disc
3) Start-up disc
4) None
Answer: 1
Level:2
54) Swap-space management is done using ________
1) Main memory
2) Virtual memory
3) CPU registers
4) Cache
Answer: 2
Level:2
54) OS is responsible for the following activities in connection with memory
management
1) Keeping track of which parts of memory are currently being used and by
whom
2) Deciding which processes are to be loaded into memory when memory
space becomes available
3) Allocating and de-allocating memory space as needed.
4) All the above
Answer: 4
Level:2
55) In_______, routine is not loaded until it is called. Unused routine is never
loaded.
1) Dynamic loading
2) Dynamic linking
3) Overlays
4) None
Answer: 1
Level:2
56) In ______ linking is postponed until execution time.
1) Dynamic loading
2) Dynamic linking
3) Both
4) None
Answer: 2
Level:2
57) Memory management unit is a hardware device which maps virtual to
physical address. True/False
Answer: True
Level:2
58) The windows registry database is called a _______.
1) regedit
2) msconfig
3) hive
4) none
Answer: 3
Level:2
59) An address generated by the CPU is commonly referred to as a ________
1) physical address
2) logical address
3) absolute address
4) None
Answer: 2
Exp: not req.
Level:2
60) Physical addresses is loaded into _________
1) program counter
2) location register
3) address register
4) None
Answer:3
Exp: not req.
Level:2
61) The _________ address is loaded into address register.
1) physical address
2) logical address
3) absolute address
4) None
Answer: 1
Exp: not req.
Level:2
62) Which of the following supports swapping?
1) Short term scheduler
2) Medium scheduler
3) Long term scheduler
4) None
Answer: 2
Level: 1
63) Memory area that stores data while they are transferred between two devices is called ___.
1) cache
2) Buffer
3) Virtual memory
4) None
Answer: 2
Level: 2
64) Page fault occurs when the page is not in page table? True/False
Answer: True
level: 1
65) Page fault occurs when
1) Page is corrupted
2) Page is in main memory
3) OS divides the page
4) Page is not in main memory.
Answer: 4
level: 1
66) Which of the following page replacement algoirithm suffers from Belady’s anomaly?
1) Optimal
2) FIFO
3) LRU
4) Optimal and LRU
Answer: 2
lelve: 2
67) First fit, best-fit, Worst- fit algorithms can be used for
1) Linked allocation
2) Contigious allocation
3) Indexed allocation
4) All the above
Answer: 2
Level: 2
68) Segment table contains
1) User and monitor
2) Page and frame numbers
3) Base and limit
4) Offest and displacement
Answer: 3
Level: 2
69) A solution to external fragmentation is ______.
1) Hole
2) Dispatching
3) Compaction
4) Context switch
Answer: 3
Level: 1
70) Which of the following is used to select a free hole from al list of available holes?
1) Mutual exclusion
2) Segmentation
3) Paging
4) Best fit
Answer: 4
level: 2
s
71) Which of the following schemes supports the concept of users view of memory?
1) Paging
2) Page replacement
3) Segmentation
4) None
Answer: 3
level: 2
72) 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
level: 2
73) If the address space of the computer starts from 00000 the first address of the user program ill
always be 00000- true or false
Ans: false
Justification: most systems allow the program to reside in any part of the memory
level: 2
74) if we know at compile time where the processes will reside in memory , then ______________
can be generated?
1) absolute code
2) virtual code
3)object code
4) the exe file
Ans: 1
level: 3
75) when the compiler has to generate a relocatable code the final binding has to wait till ?
1) compile time
2) run time
3) load time
4) none
Ans: 3
level: 3
76) if the process can be moved during execution from one memory segment to another , then
binding must be delayed until?
1) run time
2) load time
3) compile time
4) none
Ans: 1
Level: 2
77) The compile time and load time address binding methods generate identical logical and
physical addresses- true or false
Ans: true
level: 2
78) The execution time address binding methods generate identical logical and physical
addresses- true or false
Ans: false
Level: 2
79) Dynamic loading requires special support from the Operating system- true or false
Ans: false
Justification: it does not require- as it is the responsibility of the users to design their programs to
take advantage of such a method
level: 2
80) what eliminates the need for all the programs to have a copy of their language library (or at
least the routines referenced by the program ) included in the executable image?
1) dynamic loading
2) dynamic linking
3) static loading
4) static linking
Ans: 2
level: 3
81) In dynamic linking _______ is included in image for each library routine reference.
1) physical Address
2) logial address
3) Stub
4) none of the above
Ans: 3
level: 2
82) what is a stub?
a) A piece of code that indicates how to locate the appropriate memory resident library routines.
b) A piece of code that imitates the memory resident library routines.
c) A piece of code that indicates how to load the library routines if the routine is not already present
1) a,b
2) b,c
3) a,c
4) all
Ans: 3
level: 2
83) Dynamic linking requires support from the operating system- true or false
Ans: true
Level: 1
84) which of the following is the correct statement?
1) dynamic linking requires support from the OS but dynamic loading does not.
2) dynamic linking does not require support from the OS but dynamic loading does.
3) both of them require support from the OS
4) none of the above
Ans: 1
level: 2
85) In swapping the process that is swapped out can be swapped back to the same memory space
if the binding is done at ?
1) load time
2) assembly time
3)execution time
4) none
Ans: 3
level: 2
86) Compaction can be done only if the relocation is done at the
a. execution time
b. load time
c. assembly time
1) a,b,c
2) a,b
3) only b
d) only a
Ans: 3
level: 3
87) Compaction is not possible in the backing store while swapping a process from the main
memory as .
a) the access is slower
b) backing store not as big as the main memory
1) only a
2) only b
3) both b,a
4) none
Ans: 1
level: 3
88) Traditionally the paging has been handled by the
1) hardware
2) software
3) Operating system
4) none
Ans: 1
89) Routine is not loaded until it is called. All routines are kept on disk in a
relocatable load format. The main program is loaded into memory & is executed.
This type of loading is called _________
1) Static loading
2) Dynamic loading
3) Dynamic linking
4) Overlays
Ans: 3
level: 1
90) 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
level: 2
91) _________ allocates the largest hole (free fragmant) available in the
memory.
1) Best Fit
2) Worst Fit
3) First Fit
4) None of the above
Ans: - 2
level: 2
92) Heap is __________.
1) A region from where the memory is allocated
2) Lies in the process space
3) Is a finite area
4) All of the above
Ans: - 4
level: 1
93) Moving process from main memory to disk is called ________.
1) Scheduling
2) Caching
3) Swapping
4) Spooling
Ans: - 3
level: 1
94) In memory management, fragmentation problem is caused by creation of
________.
1) A large number of processes
2) Large number of small free holes
3) Large number of free holes
4) Large number of waiting processes
Ans: - (3 )
level: 1
95) The search concept used in associative memory is ________.
1) Parallel search
2) Sequential search
3) Binary search
4) Selection search
Ans: - 1
level: 3
96) The status of the Kernel is
1) task
2) process
3) not defined
4) none of the above
Answer:2
Level: 2
97) Buffering is
1) the process of temporarily storing the data to allow for small variation in device
speeds
2) a method to reduce cross talks
3) storage of data within transmitting medium until the receiver is ready to receive
4) storage of data within transmitting medium until the receiver is ready to receive
Answer: 1
Level: 2
98) Memory allocation of variables declared in a program is
1) allocated in RAM.
2) allocated in ROM.
3) allocated on stack
4) assigned to registers.
Answer: 3
Level: 2
99) OS/2 is a
1) Single User OS
2) Multi User OS
3) Multi Tasking OS
4) None of these
Answer: 3
Level: 2
105) Which is the best page replacement algorithm?
1) LRU
2) FIFO
3) OPR
4) None of these
Answer: 1
Level: 1
106) Thrashing is a
1) Low paging activity
2) high paging activity
3) not related to paging
4) None of these
Answer:2
Level: 2
107) The page fault rate may increase as the number of allocated frames increases in
some page replacement algorithms.This is known as
1) Thrashing
2) Context Switching
3) Belady’s Anamoly
4) Page Buffering
Answer: 3
Level: 3