Professional Documents
Culture Documents
Memory Management
Memory Management
1) Segmentation
2) External fragmentation
3) Internal fragmentation
4) Paging
Answer: 2
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
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
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.
Answer: 4
Level:1
Exp: acronym
Level:1
6) Run time mapping from virtual to physical addresses is done by a hardware device called
_______
1) Memory Allocator
3) Memory utilizer
4) Memory Optimizer
Answer: 2
Exp: by def
Level:1
3) Both
4) None
Answer: 3
Exp: by def
Level:2
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
1) pages
2) frames
3)segments
Answer: 2
Exp: by def
Level:1
1) pages
2) frames
3)segments
Answer: 1
Exp: by def
Level:1
Level: 2
Exp: by def
Level:1
Level:1
2) round robin
3) FCFS
4)SJF
Answer:1
Level:2
4) round robin
Answer: 2 and 3
Exp: service
Level:2
Level:2
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
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
Level:2
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
Level: 3
Level:3
Level:2
Level:2
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
Level:2
Level:2
Level:2
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
Level:2
Level:2
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
1) System disc
2) Partition disc
3) Start-up disc
4) None
Answer: 1
Level:2
1) Main memory
2) Virtual memory
3) CPU registers
4) Cache
Answer: 2
Level:2
1) Keeping track of which parts of memory are currently being used and by
whom
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
1) Dynamic loading
2) Dynamic linking
3) Both
4) None
Answer: 2
Level:2
Answer: True
Level:2
3) hive
4) none
Answer: 3
Level:2
1) physical address
2) logical address
3) absolute address
4) None
Answer: 2
Level:2
1) program counter
2) location register
3) address register
4) None
Answer:3
Level:2
61) The _________ address is loaded into address register.
1) physical address
2) logical address
3) absolute address
4) None
Answer: 1
Level:2
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
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
Answer: 3
Level: 2
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
2) ) page size
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
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
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
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
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
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
Ans: - 4
level: 1
1) Scheduling
2) Caching
3) Swapping
4) Spooling
Ans: - 3
level: 1
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
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
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