Self Studies

Operating Syste...

TIME LEFT -
  • Question 1
    1 / -0

    Consider a counting semaphore which was initialized to (y + 7) for a system. Seven wait and (y+ 3) signal operations were completed on this semaphore. If the final value of the semaphore is (y + 2) then what is the value of y?

  • Question 2
    1 / -0

    Which of the following is false about Peterson’s synchronization mechanism?

  • Question 3
    1 / -0

    Let P, Q, R be the three concurrent processes as shown below, which access a shared variable A that has been initialized to 150

    P

    Q

    R

    :

    :

    A = A + 30

    :

    :

    :

    :

    A = A - 40

    :

    :

    :

    :

    A = A + 15

    :

    :

     

    The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of A after the three processes have completed execution are M and N respectively, then the value of N - M is __________.

  • Question 4
    1 / -0

    Suppose P, Q and R are co-operating processes satisfying Mutual Exclusion condition. Then if the process Q is executing in its critical section then

  • Question 5
    1 / -0

    Two concurrent processes P and Q execute the following code.

    Process P:

    While (True){

    W:_____

    Print(‘0’); print(‘0’);

    X:____

    }

    Process q;

    While (True){

    Y;

    print(‘1’); print(‘1’);

    Z:_____

    }

    Given S and T are binary semaphore variables, and P() and V() as standard “wait” and “signal” functions respectively. What should be the semaphore operations W, X, Y, and Z for the output string: 11001100…? 

  • Question 6
    1 / -0

    The following two functions F1 and F2 that share a variable X, Y with an initial value 10 execute concurrently.

    F1()

    {

    Y = X – 5;

    S = 5 × Y;

    }

    F2()

    {

    Y = 5 × X;

    S = Y – 5;

    }

    Find the sum of the distinct values that S can possibly take after the execution?

  • Question 7
    1 / -0

    To overcome difficulties in Readers-Writers problem, which of the following statement/s is/are true?

    1) Writers are given exclusive access to shared objects

    2) Readers are given exclusive access to shared objects

    3) Both readers and writers are given exclusive access to shared objects.

    Choose the correct answer from the code given below:

  • Question 8
    1 / -0

    Let flag be declared as Boolean flag[2] set to false and i = 1 - j

    while(1)

    {

    flag[i] = true;

    while(flag[j]);

    <critical section>

    flag[i] = false;

    <remainder section>

    }

    Lets two processes execute concurrently, then in the above case.

  • Question 9
    1 / -0

    Consider a non-negative counting semaphore S. The operation P(S) performs the operation --S and operation V(S) perform the operation ++V. During program execution, 17P and 11V operation is performed in the some order. What is the smallest initial value of S for which at most 4 processes are in the blocked state?

  • Question 10
    1 / -0

    Let each process Pi, i = 1 to 7 executes the following code.

    repeat

    P(mutex);

    CS

    V(mutex);

    forever

    The process P8 executes the following code:

    repeat

    V(mutex);

    CS

    V(mutex);

    forever

    What is the maximum number of processes that can be present in the critical section at any point of time? Given that the initial value of binary semaphore variable “mutex” is 1.

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Submit Test
Selfstudy
Selfstudy
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now