Learn and practice Aptitude questions and answers with explanation for interview, competitive exam (Pariksha Corner )

Friday, January 24, 2020

All compilers are designed to be

All compilers are designed to be
Arecursive
Bserially usable
Cself correcting
Dre-entrant.

Answer: re-entrant

Explanation:

Compilers and other programs were often written to be reentrant, so a single copy of the tool lived in memory, yet was shared by perhaps a hundred users. Each person had his or her own data area, yet everyone running the compiler quite literally executed identical code. As the operating system changed contexts from user to user it swapped data areas so one person's work didn't effect any other. Share the code, but not the data.
In the embedded world a routine must satisfy the following conditions to be reentrant:
->It uses all shared variables in an atomic way, unless each is allocated to a specific instance of the function.
->It does not call non-reentrant functions.
->It does not use the hardware in a non-atomic way.

Akilesh Kharvi
answered Dec 8 '2016 at 21:48

All Comments

Post your answers here:

Post

Post your comments here:

Post

Categories