Operating systems miscellaneous


Operating systems miscellaneous

  1. Which of the following is not true for deadlock prevention and deadlock avoidance schemes?









  1. View Hint View Answer Discuss in Forum

    Deadlock prevention does not guarantee the state that the state would be safe when the request for resources is granted instead it is guaranteed by deadlock avoidance and there will be no deadlock at that time.

    Correct Option: A

    Deadlock prevention does not guarantee the state that the state would be safe when the request for resources is granted instead it is guaranteed by deadlock avoidance and there will be no deadlock at that time.


  1. Consider a system with 4 types of resources R1 (3 units), R2 (2 unit), R3 (3 unit), R4 (2 unit). A non-pre-emptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the resource as follows, if executed independently.

    Which one of the following statements is true, if all three processes run concurrently starting at time t = 0?









  1. View Hint View Answer Discuss in Forum


    The Bolded line show that at that time the requirement of resource is less than avaiability but it does not cause dead lock. All process finish without any dead lock

    Correct Option: A


    The Bolded line show that at that time the requirement of resource is less than avaiability but it does not cause dead lock. All process finish without any dead lock



  1. A system has n resources R0, ..... Rn - 1, and k processes P0, .... Pk - 1. The implementation of the resources request logic of each process Pi, is as follows if (i% 2 = = 0) {
        if (i < n) request Ri;
       if (i + 2 < n) request Ri + 2;
    }
    else {
      if (i < n) request Rn - i;
      if (i + 2 < n) request Rn - i - 2;
    }
    In which one of the following situations is a deadlock possible?









  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    NA


  1. A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.









  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    NA



  1. Consider the procedure below for the Producer-Consumer problem which uses semaphores :
    semaphore n = 0;
    semaphore s = 1;

    Which one of the following is TRUE ?









  1. View Hint View Answer Discuss in Forum

    Consumer executes wait (S), then wait (n) and goes to sleep by decreasing n value.
    After the consumer sleep, producer goes to the sleep by executing wait (s).
    Dead lock occurs if the consumers succeeds in aquiring semaphore S when the buffer is empty.

    Correct Option: C

    Consumer executes wait (S), then wait (n) and goes to sleep by decreasing n value.
    After the consumer sleep, producer goes to the sleep by executing wait (s).
    Dead lock occurs if the consumers succeeds in aquiring semaphore S when the buffer is empty.