In this section of Operating System Main Memory – Memory Management.it contain Operating System Main Memory – Memory Allocation MCQs (Multiple Choice Questions Answers).All the MCQs (Multiple Choice Question Answers) requires in detail reading of Operating System subject as the hardness level of MCQs have been kept to advance level.
This MCQs section is mainly focused on below lists of topics
- Managing Memory hierarchy.
- Static and Dynamic Memory Allocation.
- Static Binding
- Dynamic Binding
- Execution of programs.
- Compilation or assembly
- Linking
- Relocation
- Static and Dynamic relocation of program
- Linking
- static and Dynamic Linking
- Self relocating program
- Reentrant Programs
1. Memory allocation and deallocation can be managed by________
- CPU
- MMU
- GPR
- None of the above
MMU-Memory management unit
2. Which of the below factor considered the most in management of memory
- Efficient use of memory
- speedy allocation of memory
- speedy deallocation of memory
- All of the above
3. Which of the following statements stands true for Static memory allocation.
- Static memory allocated can be performed by a compiler,linker or loader.
- Static memory allocation to a process is possible only if size of its data structures are known before its execution begins.
- static memory allocation is performed in a lazy manner during execution of program.
- static memory is allocated to a function or a variable just before its is used for the first time.
- 1,2
- 2,3
- 3,4
- 1,4
Static memory allocated can be performed by a compiler,linker or loader while a program is being readied for execution.
Static memory allocation to a process is possible only if size of its data structures are known before its execution begins.if sizes are not known,they have to be guessed :wrong estimation can lead to wastage of memory and lack of flexibility
4. Which of the following statements stands true for Dynamic memory allocation.
- Dynamic memory allocated can be performed by a compiler,linker or loader.
- Dynamic memory allocation to a process is possible only if size of its data structures are known before its execution begins.
- Dynamic memory allocation is performed in a lazy manner during execution of program.
- Dynamic memory is allocated to a function or a variable just before its is used for the first time.
- 1,2
- 2,3
- 3,4
- 1,4
Dynamic memory allocation is performed in a lazy manner during execution of program.
Dynamic memory is allocated to a function or a variable just before its is used for the first time.
5. In which of the following memory allocation memory is wasted if we overestimate the its size or process may not operate correctly if we underestimate its size
- Dynamic memory allocation
- Static memory allocation
- contiguous memory allocation
- None-Contiguous memory allocation
6. ______memory allocation avoid problems of wastage of memory and the problems of underestimating the memory size
- Dynamic memory allocation
- Static memory allocation
- contiguous memory allocation
- None-Contiguous memory allocation
It can avoid the problems by allocating a memory area whose size matches the actual size of the array, which would be known by the time the allocation is performed.it can even permit the array size to vary during operation of the process
7. __________memory allocation incurs the overhead of memory allocation actions performed during operation of a process.
- Dynamic
- Static
- contiguous
- None-Contiguous
8. ___ is generally called a translator
- loader
- Linker
- Compiler or Assembler
- re-locator
it translates program P into an equivalent program in the object module form.this program contains instruction in the machine language of the computer.
9. source program is converted to machine language of the computers by_________
- loader
- Linker
- relocator
- Compiler or Assembler
10. Program P may call other programs during its execution,eg functions from mathematical libraries ,these functions should be included in the program,and their start address should be used in the function call instruction in P. This Procedure is called __________
- loading
- Linking
- Compiling or Assembling
- relocation
11. some object module merged with program P may have conflicting translated time address.This conflict is resolved by changing the memory binding of the object modules;this action is called______
- linking of object module
- loading of object module
- Relocation of object module
- compiling of object module
It involves changing addresses of operands used in their instruction.
12. The relocation and linking functions are performed by program called______
- compiler
- linker
- loader
- relocator
The addresses assigned by it are called linked addresses.The user may specify the linked origin for program ;otherwise ,the linker assumes the linked origin to be same as the translated origin;In accordance with the linked origin and relocation necessary to avoid address conflicts,the linker binds instruction and data of the program to a set of linked address.
13. A Binary program has to be loaded in memory for execution.This function is performed by the __________
- compiler
- linker
- loader
- relocator
14. Which of the following statements stands TRUE for Static Relocation of programs?
- static relocation is performed before execution of the programs begins.
- static relocation is performed during execution of the programs .
- static relocation can be performed by suspending a program's execution,carrying out the relocation procedures and then resuming its execution.
- it would require information concerning the translated origin and address sensitive instructions to be available during the program execution.
- 1
- 1,2
- 1,2,3
- 1,2,3,4
static relocation is performed before execution of the programs begins.
15. Which of the following statements stands TRUE for Dynamic Relocation of programs
- Dynamic relocation is performed before execution of the programs begins.
- Dynamic relocation is performed during execution of the programs .
- Dynamic relocation can be performed by suspending a program's execution,carrying out the relocation procedures and then resuming its execution.
- it would require information concerning the translated origin and address sensitive instructions to be available during the program execution.
- 1
- 1,2
- 2,3
- 2,3,4
Dynamic relocation is performed during execution of the programs .
Dynamic relocation can be performed by suspending a program's execution,carrying out the relocation procedures and then resuming its execution.
it would require information concerning the translated origin and address sensitive instructions to be available during the program execution.
16. some computer architecture provide a __________ to simplify dynamic relocation.
- Base Register
- special register
- Relocation register
- PSW-Program Status word
The relocation register is special register in the CPU whose contents are added to every memory address used during execution of a program. whose result is another memory address,which is actually used to make a memory reference.
Effective memory address=memory address used in the current instruction+content of the relocation register
17. Which of the following statements stands true for Static linking?
- the linker links all modules of a program before its execution begins.
- The linker is invoked when an unresolved external reference is encountered during its execution.the linker resolves the external reference and resumes execution of the program.
- if several programs use the same module from a library,each program will get a private copy of the module;several copies of the module might present in a memory at the same time if program using the same module.
- All of the above.
- 1 only
- 1,2 only
- 1,3 only
- 4
the linker links all modules of a program before its execution begins.
it produce binary program that does not contain any unresolved external references.
if several programs use the same module from a library,each program will get a private copy of the module;several copies of the module might present in a memory at the same time if program using the same module.
18. Which of the following statements stands true for Dynamic linking?
- linking is performed during execution of a binary program.
- if the module referenced by the program has already been linked to another program that is execution,the same copy of the module could be linked to this program as well,thus saving the memory
- it produce binary program that does not contain any unresolved external references.
- All of the above
- 1 only
- 1,2 only
- 1,3 only
- 4
linking is performed during execution of a binary program.
if the module referenced by the program has already been linked to another program that is execution,the same copy of the module could be linked to this program as well,thus saving the memory.
The linker is invoked when an unresolved external reference is encountered during its execution.the linker resolves the external reference and resumes execution of the program.
19. _____contains instructions and data of a program and information required for its relocation and linking.
- reentrant program
- object module
- Binary Program
- self-relocating program
20. ______ is ready to execute form of a program
- reentrant program
- object module
- Binary Program
- self-relocating program
21. In ________ linking is performed in a lazy manners,ie an object module defining a symbol is linked to a program only when that symbol is referenced during the program's execution.
- Dynamically linked program
- Object module
- Binary Program
- self-relocating program
22. _______ can relocate itself to execute in any area of memory
- Dynamically linked program
- Reentrant program
- Binary Program
- self-relocating program
23. ______ can be executed on several sets of data concurrently.
- Dynamically linked program
- Reentrant program
- Binary Program
- self-relocating program