Basic CS-Operating System [TCS Placement]: Sample Questions 5 - 5 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 5

Describe in Detail Essay▾

Explain the concept of Reentrancy?

Edit

Explanation

  • It is a useful, memory-saving technique for multiprogrammed timesharing systems.
  • A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period.
  • Reentrancy has key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately.
  • Permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program.
  • Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters.
  • The temporary part associated with each activation is the activation record.
  • Generally, the activation record is kept on the stack.
  • Dynamic stack variables provide inherent reentrancy.
  • Each task has ints own task.
  • E. g. linked list in lstLib
  • Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.
Given the Image is Define the Reentrancy Program is a Way to Handle Multitasking