A relationship between processes such that each has some part (critical section) which must not be executed while the critical section of another is being executed, is known as A. semaphore B. mutual exclusion C. multiprogramming D. multitasking E. None of the above

[amp_mcq option1=”semaphore” option2=”mutual exclusion” option3=”multiprogramming” option4=”multitasking E. None of the above” correct=”option2″]

The correct answer is: B. mutual exclusion

Mutual exclusion is a property of concurrent systems that ensures that only one process can access a shared resource at a time. This is necessary to prevent data corruption and ensure that the system runs correctly.

Semaphores are a synchronization primitive that can be used to implement mutual exclusion. A semaphore is a variable that can hold a value of 0 or 1. When the value of a semaphore is 0, it means that the resource is in use and no other process can access it. When the value of a semaphore is 1, it means that the resource is available and any process can access it.

Multiprogramming is a technique that allows multiple programs to run on a single computer at the same time. This is done by switching between the programs very quickly, so that it appears that they are all running at the same time.

Multitasking is a technique that allows a single program to run multiple tasks at the same time. This is done by dividing the program into multiple threads, which can run independently of each other.

None of the above options are correct.

Exit mobile version