In this section of Operating System Main Memory – Memory Management.it contain Operating System Main Memory – Memory Allocation to a process using Stacks 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

  1. Use of stack..
  2. The memory Allocation Model for a process.

PRACTICE IT NOW TO SHARPEN YOUR CONCEPT AND KNOWLEDGE

view hide answers

1. Variables whose scope is associated with functions, procedures, or blocks, in a program and parameters of function or procedure calls. This kind of data is allocated on the___________

  • Heap
  • stack
  • CPU register
  • Program Counter

2. In Stack, Allocation and deallocations are performed in a _________Manner in response to push and pop operations.

  • FIFO
  • LIFO
  • FILO
  • LILO

3. A pointer called the ______ points to the first entry of the stack, while a pointer called the _____ points to the last entry allocated in the stack.

  • top of Stack (TOS),Frame Base (FB)
  • top of Stack (TOS),Stack Base (SB)
  • Stack Base (SB),top of Stack (TOS)
  • Frame Base (FB),top of Stack (TOS)

4. During execution of a program, a stack is used to support function calls. the group of stack entries that pertain to one function call is called

  • stack
  • Frame Base
  • base Frame
  • Stack frame

5. Stack frame contains

  • Address of the function's parameters
  • values of the functions parameters
  • the return address
  • All of the above

6. The first entry in the stack frame contains

  • The next value of the frame base.
  • The previous value of the frame base.
  • the return address of the function
  • All of the above.

7. The second entry in the stack frame contains

  • The next value of the frame base
  • The previous value of the frame base.
  • the return address of the function
  • All of the above.

8. The frame base points to the

  • Last entry in the stack frame
  • the return address of the function
  • the last local data in the stack frame
  • First entry in the stack frame

9. The TOS points to the

  • the last local data in the stack frame
  • Last entry in the stack frame
  • the return address of the function
  • First entry in the stack frame

10. The size of a program can be obtained from its

  • Directory entry
  • size of the stack
  • PCD-program controlled dynamic data vary during execution of the program
  • all of the above

11. Which of the following statements stands TRUE for Memory Allocation Model?
  1. The code and static data components in the program are allocated memory area that exactly matches their size.
  2. The PCD data and stack share a single large area of memory but grow in opposite directions when memory is allocated to new data.
  3. The PCD data is allocated by starting at the low end of this area while the stack is allocated by starting at the high end of the area. the memory between these two components is free.
  4. In this model the stack and PCD data components do not have individual size restrictions.

  • 1,4
  • 1,2
  • 1,3
  • 1,2,3,4

12. PCD data can be allocated deallocated by

  • MMU
  • run time libraries of the programming language ie.library routines
  • Kernel
  • All of the above
Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook