Operating Systems Interview Questions – Part II

Ankur Kulhari

  1. What is asymmetric clustering?
  2. Ans:In asymmetric clustering, a machine is in a state known as hot standby mode where it does nothing but to monitor the active server. That machine takes the active server’s role if, the server fails.

  3. What is a thread?
  4. Ans:A thread is a basic unit of CPU utilization. In general, a thread is composed of a thread ID,
    program counter, register set and the stack.

  5. Give some benefits of multithreaded programming.
  6. Ans:

    • There is an increased responsiveness to the user
    • Resource sharing within the process
    • Economy
    • Utilization of multiprocessing architecture
  7. What is Round Robin scheduling algorithm?
  8. Ans:RR (round-robin) scheduling algorithm is primarily aimed for time-sharing systems. A circular
    queue is setup in such a way that the CPU scheduler goes around that queue, allocating CPU to each process for a time interval of up to around 10 to 100 milliseconds.

  9. What necessary conditions can lead to a deadlock situation in a system?
  10. Ans:Deadlock situations occur when four conditions occur simultaneously in a system: Mutual
    exclusion; Hold and Wait; No preemption; and Circular wait.

  11. Enumerate the different RAID levels.
  12. Ans:RAID 0 – Non-redundant striping
    RAID 1 – Mirrored Disks
    RAID 2 – Memory-style error-correcting codes
    RAID 3 – Bit-interleaved Parity
    RAID 4 – Block-interleaved Parity
    RAID 5 – Block-interleaved distributed Parity
    RAID 6 – P+Q Redundancy

  13. Describe Banker’s algorithm
  14. Ans:Banker’s algorithm is one form of deadlock-avoidance in a system. It gets its name from a
    banking system wherein the bank never allocates available cash in such a way that it can no longer satisfy the needs of all of its customers.

    What factors determine whether a detection-algorithm must be utilized in a deadlock avoidance system?

    Ans:One is that it depends on how often a deadlock is likely to occur under the implementation of
    this algorithm. The other has to do with how many processes will be affected by deadlock when this algorithm is applied.

  15. Differentiate logical from physical address space.
  16. Ans:Logical address refers to the address that is generated by the CPU. On the other hand, physical
    address refers to the address that is seen by the memory unit.

  17. How does dynamic loading aid in better memory space utilization?
  18. Ans:With dynamic loading, a routine is not loaded until it is called. This method is especially useful when large amounts of code are needed in order to handle infrequently occurring cases such as
    error routines.

  19. What are overlays?
  20. Ans:Overlays are used to enable a process to be larger than the amount of memory allocated to it.
    The basic idea of this is that only instructions and data that are needed at any given time are kept in memory.

  21. What is the basic function of paging?
  22. Ans:Paging is a memory management scheme that permits the physical-address space of a process
    to be noncontiguous. It avoids the considerable problem of having to fit varied sized memory chunks onto the backing store.

  23. What is fragmentation?
  24. Ans:Fragmentation is memory wasted. It can be internal if we are dealing with systems that have
    fixed-sized allocation units, or external if we are dealing with systems that have variable-sized allocation units.

What do you think about the article?