Question: Assume that a programmer wants mutual exclusion for some part of his code. He uses a semaphore as follows: Semaphore mutex = new Semaphore (0);
Assume that a programmer wants mutual exclusion for some part of his code. He uses a semaphore as follows:
Semaphore mutex = new Semaphore (0);
mutex.acquire();
//CRITICAL SECTION
mutex.release();
Then how many processes will be able to enter critical section
| a. | Any no of processes | |
| b. | Zero | |
| c. | Two | |
| d. | One |
Which one of the following is not true about Interprocess/thread communication?
| a. | Process communicate by sharing memory without overriding the operating system normal constraints
| |
| b. | Process communicate by message passing system
| |
| c. | Threads of a process by default share the same memory location
| |
| d. | Process communicate by sharing memory with overriding the operating system normal constraints |
Run-time binding is useful for saving on memory because :
| a. | modules cannot be loaded | |
| b. | It is static linking. | |
| c. | Only load modules when theyre needed. | |
| d. | Dont allow several processes to share one copy of a module. |
Which of the following statements is true for dealing with the deadlock problem:
- i. We can use the protocol to prevent, ensuring that the system will never enter a deadlocked state.
- ii. We can allow the system to enter a deadlocked state, detect it, and recover.
- iii. We can ignore the problem altogether and pretend that deadlocks never occur in the system
- iv. We can use the protocol to avoid, ensuring that the system will never enter an unsafe and deadlock state.
| a. | i,ii,iii | |
| b. | i,ii,iii,&iv | |
| c. | i | |
| d. | i, ii |
Swap space can exist in ___________
| a. | ROM | |
| b. | Separate Disk Partition | |
| c. | CD ROM | |
| d. | RAM |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
