Interview Questions - Operating Systems

Why should I learn to solve Operating Systems technical interview questions?

Learn and practise solving Operating Systems technical interview questions and answers to enhance your skills for clearing technical interviews, HR interviews, campus interviews, and placement tests.

Where can I get technical Operating Systems technical interview questions and answers with explanations?

IndiaBIX provides you with lots of fully solved Operating Systems technical interview questions and answers with a short answer description. You can download Operating Systems technical interview questions and answers as PDF files or e-books.

How do I answer Operating Systems technical interview questions from various companies?

You can answer all kinds of Operating Systems technical interview questions by practising the given exercises (short answer type). You can also find the frequently asked Operating Systems technical interview questions with answers from various companies, such as TCS, Wipro, Infosys, CTS, IBM, etc.

Explain the concept of Reentrancy?
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.

Explain Belady's Anomaly?
Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process virtual memory, the process execution is faster, because fewer page faults occur. Sometimes, the reverse happens, i.e., the execution time increases even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns.

What is a binary semaphore? What is its use?
A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes.

What is thrashing?
It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.