Technical Questions

Q:

Explain the concept of Reentrancy?

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.

Report Error

View answer Workspace Report Error Discuss

0 3338
Q:

What are rings in Windows NT?

Answer

Windows NT uses protection mechanism called rings provides by the process to implement separation between the user mode and kernel mode.

Report Error

View answer Workspace Report Error Discuss

0 3334
Q:

Point out the error, if any, in the following program.

#include "stdio.h"

main()

{

      unsigned char;

       FILE *fp;

       fp = fopen ("trail", "r");

       while (( ch = getc (fp)) ! = EOF)

               printf ("%c", ch);

       fclose (fp);

}  

Answer

EOF has been defined as #define EOF -1 n the file "stdio.h" and an unsigned char ranges from 0 to 255 hence when EOF is read from the file it cannot be accommodated in ch. Solution is to declare ch as an int.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 3318
Q:

 Which of the following occurs when a transaction rereads data it has previously read and finds modification or deletions caused by a committed transaction?

A) Nonrepeatable read B) Phantom read
C) Dirty read D) Consistent read
 
Answer & Explanation Answer: A) Nonrepeatable read

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

0 3318
Q:

MAU-Multiple access unit

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

MAU is Multistation Access Unit

Report Error

View Answer Workspace Report Error Discuss

Subject: Networking
Job Role: Network Engineer

0 3318
Q:

What is Throughput, Turnaround time, waiting time and Response time?

Answer

Throughput : number of processes that complete their execution per time unit.

Turnaround time : amount of time to execute a particular process.

Waiting time : amount of time a process has been waiting in the ready queue.

Response time : amount of time it takes from when a request was submitted until the firstresponse is produced, not output (for time-sharing environment).

Report Error

View answer Workspace Report Error Discuss

2 3297
Q:

 Which of the following is an advantage of partitioning?

A) Complexity B) Inconsistent access speed
C) Extra space D) Security
 
Answer & Explanation Answer: D) Security

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

0 3287
Q:

What is a zombie?

Answer

When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it – for example, the parent may need to check the child’s exit status. To be able to get this information, the parent calls `wait()’; In the interval between the child terminating and the parent calling `wait()’, the child is said to be a `zombie’ (If you do `ps’, the child will have a `Z’ in its status field to indicate this.)

Report Error

View answer Workspace Report Error Discuss

Subject: Operating Systems Exam Prep: GATE

1 3279