Describe re-entrant procedure with the help of schematic diagram.
Re-entrant Procedures: A procedure is said to be re-entrant, if it can be interrupted, used and re-entered without losing or writing over anything. To be a re-entrant, Procedure must first push all the flags and registers used in the procedure. It should also use only registers or stack to pass parameters. In some situation it may happen that procedure1 is called from main program, procedure2 is called from procedure1 is again called from procedure2. In this situation program execution flow reenters in the procedure1. These types of procedures are called reentrant procedures.