Tuesday, July 25, 2017

Interview Questions - Operating System

1) What is semaphore and when will you use it?
https://stackoverflow.com/questions/34519/what-is-a-semaphore

2) What is paging in OS?

3) What is interlock and when it is used?

4) What is critical section and when it is needed?

A CRITICAL_SECTION is a synchronization primitive that can protect longer sections. It really does a lock and competing threads will be forced to wait until a thread releases ownership of the critical section. 

Critical sections are OS primitives, but they are limited to a single process. Their big brother of a critical section under Windows is a Mutex, which can be used for cross-process synchronization.

5) What is dead lock and when it will occur and how do you avoid it?

Interview Questions - Data Structures

1) Which data structure is used to implement function and why?

2) Search is faster in single linked list or double?

3) What is Order of notation?

4) You are given a bottle and asked to find out at which floor that will break in 10 story building?

5) When 2 bottles are given how do you identify the floor it breaks?