Question: Consider the code below of the two processes P 1 and P 2 . Which of the following initial values of S and Q may
Consider the code below of the two processes and Which of the following initial values
of and may cause indefinite blocking for one or both processes.
a
b
c
d
e None of the above
Assume that a semaphore named S already exists. The result of calling semopen as shown
below is
#define PERMS modetSIRUSR SIWUSR SIRGRP SIROTH
#define FLAGS CREAT
semopen S FLAGS, PERMS, ;
a Changing the permissions on the existing semaphore to PERMS, and setting its value to
b Ignoring PERMS and setting the value of the semaphore is
c Both PERMS and the value that is will be ignored
d A new semaphore with is created with the same name, and its access permissions are set
to PERMS and its initial value is set to
e None of the above
Which of the following functions is used to remove a named semaphore from the system?
a semunlink
b semdestroy
c semclose
d None of the above
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
