Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2018 | Question 78
  • Difficulty Level : Basic
  • Last Updated : 06 Jul, 2018

In multi-programmed systems, it is advantageous if some programs such as editors and compilers can be shared by several users.
Which of the following must be true of multi-programmed systems in order that a single copy of a program can be shared by several users?

I. The program is a macro
II. The program is recursive
III. The program is reentrant
(A) I only
(B) II only
(C) Ill only
(D) I, II and III


Answer: (C)

Explanation: Reentrant code is commonly required in operating systems and in applications intended to be shared in multi-use systems. A programmer writes a reentrant program by making sure that no instructions modify the contents of variable values in other instructions within the program. Each time the program is entered for a user, a data area is obtained which keep all the variable values for that user. The data area is in another part of memory from the program itself. When the program is interrupted to give another user a turn to use the program, information about the data area associated with that user is saved. When the interrupted user of the program is once again given control of the program, information in the saved data area is recovered and the program can be reentered without concern that the previous user has changed some instruction within the program.

Option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :