logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Operating Systems See What Others Are Saying!
  • Question
  • Explain the concept of Reentrancy?


  • Correct Answer
  • 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 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately Thus, the 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 Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure 


  • More questions

    • 1. SNOBOL is mainly used for

    • Options
    • A. Text Operation
    • B. String operations
    • C. List operations
    • D. Numerical operations
    • Discuss
    • 2. Convert the expression ((A + B) * C ? (D ? E) ^ (F + G)) to equivalent Prefix Notation
    • Discuss
    • 3. What would be the output of the following program? main() { char a[] = "Visual C++"; char *b = "Visual C++"; printf ("\n%d %d", sizeof (a), sizeof (b)); printf ("\n%d %d", sizeof (*a), sizeof (*b)); }
    • Discuss
    • 4. Point out the error, if any, in the following program. #include "stdarg.h" main() { display ( 4, 12.5, 13.5, 14.5, 44.3); } display(int num, ...) { float c; int j; va_list ptr; va_start (ptr, num); for ( j = 1; j <= num; j++) { c = va_arg ( ptr, float ); printf ("\n%f", c); } }
    • Discuss
    • 5. Two main measures for the efficiency of an algorithm are

    • Options
    • A. Time and Space
    • B. Complexity and Memory
    • C. Data and Space
    • D. Memory and Processor
    • Discuss
    • 6. Would the following program compile? main() { int a = 10, *j; void *k; J = k = &a; J++; k++; printf ("\n%u %u", j, k); }
    • Discuss
    • 7. What would be the output of the following program? main() { char ch ='A'; printf ("%d%d", sizeof (ch), sizeof ('A')); }
    • Discuss
    • 8. What is the type of the algorithm used in solving the 8 Queens problem ?

    • Options
    • A. Dynamic Programming
    • B. BackTracking
    • C. Branch and Bound
    • D. None
    • Discuss
    • 9. The SQL statements that take care of security and authorization are

    • Options
    • A. DDL
    • B. DML
    • C. DCL
    • D. None
    • Discuss
    • 10. ON UPDATE CASCADE ensures which of the following?

    • Options
    • A. Normalization
    • B. Data Integrity
    • C. Materialized Views
    • D. All of the above.
    • Discuss


    Comments

    There are no comments.

Enter a new Comment