Operating System Interview Question and Answers

46. What is process synchronization?
 
  • A situation, where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called race condition.
  • To guard against the race condition we need to ensure that only one process at a time can be manipulating the same data.
  • The technique we use for this is called process synchronization.
47. What is a data register and address register?
 
  • Data registers - can be assigned to a variety of functions by the programmer.
  • They can be used with any machine instruction that performs operations on data.
  • Address registers - contain main memory addresses of data and instructions or they contain a portion of the address that is used in the calculation of the complete addresses.
48. What are deadlock prevention techniques?
 
  • Mutual exclusion
  • Hold and wait
  • No preemption
  • Circular wait
49. What is the difference between Complier and Interpreter?
 
  • An interpreter reads one instruction at a time and carries out the actions implied by that instruction.
  • It does not perform any translation. But a compiler translates the entire instructions.
50. What is a Safe State and what is its use in deadlock avoidance?
 
  • When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state.
  • System is in safe state if there exists a safe sequence of all processes.
  • Deadlock Avoidance : ensure that a system will never enter an unsafe state.
123456789101112 Page 10 of 12