Computer Organization MCQ set number 00080

1. The private work space dedicated to a subroutine is called as ________
a) System heap
b) Reserve
c) Stack frame
d) Allocation

Answer

Answer: c [Reason:] This work space is where the intermediate values of the sub routines is stored.

2. If, the sub routine exceeds the private space allocated to it then the values are pushed onto ___
a) Stack
b) System heap
c) Reserve Space
d) Stack frame

Answer

Answer: a [Reason:] If the allocated work space is exceeded then the data is pushed onto the system stack.

3. ______ pointer is used to point to parameters passed or local parameters of the sub routine.
a) Stack pointer
b) Frame pointer
c) Parameter register
d) Log register

Answer

Answer: b [Reason:] This pointer is used to track the current position of the stack being used.

4. The reserved memory or private space of the sub routine, gets deallocated when _______
a) The stop instruction is executed by the routine
b) The pointer reaches the end of the space
c) When the routine’s return statement is executed
d) None of the mentioned

Answer

Answer: c [Reason:] The work space allocated to a sub routine gets de allocated when the routine is completed.

5. The private space gets allocated to each sub routine when ___
a) The first statement of the routine is executed
b) When the context switch takes place
c) When the routine gets called
d) When the Allocate instruction is executed

Answer

Answer: c [Reason:] When the call statement is executed, simultaneously the space also gets allocated.

6. _____ the most suitable data structure used to store the return addresses in case of nested sub routines.
a) Heap
b) Stack
c) Queue
d) List

Answer

Answer: b [Reason:] None.

7. In case of nested sub routines the stack top is always ___
a) The saved contents of the called sub routine
b) The saved contents of the calling sub routine
c) The return addresses of the called sub routine
d) None of the mentioned

Answer

Answer: a [Reason:] None.

8. The stack frame for each sub routine is present in ______
a) Main memory
b) System Heap
c) Processor Stack
d) None of the mentioned

Answer

Answer: c [Reason:] The memory for the work space is allocated from the processor stack.

9. The data structure suitable for scheduling processes is _______
a) List
b) Heap
c) Queue
d) Stack

Answer

Answer: c [Reason:] The Queue data structure is generally used for scheduling as it is two directional.

10. The sub-routine service procedure, is similar to that of the interrupt service routine in ________
a) Method of context switch
b) Returning
c) Process execution
d) Method of context switch & Process execution

Answer

Answer: d [Reason:] The Sub routine service procedure is same as the interrupt service routine in all aspects, except the fact that interrupt might not be related to the process being executed.

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.