Practice Library

All MCQs

Browse exam-wise, subject-wise, and country-wise MCQs with explanations.

What does an atomic swap instruction exchange?

Choose an option to check your answer.

How does compare-and-swap update a shared variable?

Choose an option to check your answer.

What does a test-and-set instruction typically do atomically?

Choose an option to check your answer.

On a single-processor system, why can disabling interrupts protect a very short kernel critical section?

Choose an option to check your answer.

In Peterson’s solution, what does a process’s flag indicate?

Choose an option to check your answer.

In Peterson’s solution, what is the purpose of the shared turn variable?

Choose an option to check your answer.

Peterson’s solution provides software mutual exclusion for how many cooperating processes in its classic form?

Choose an option to check your answer.

Which requirement says that processes outside their critical and entry sections must not indefinitely delay the choice of the next entrant?

Choose an option to check your answer.