Exam 7: Synchronization Examples

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Dining philosophers problem is important because it represents a class of problems where multiple processes need to share multiple resources.

Free
(True/False)
4.8/5
(37)
Correct Answer:
Verified

True

A reader-writer lock is useful when

Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
Verified

D

Explain the relationship between the state of a dispatcher object and the state of a thread in Windows.

Free
(Essay)
4.8/5
(38)
Correct Answer:
Verified

When a thread blocks on a dispatcher object in a nonsignaled state its state changes from ready to waiting. When the state for a dispatcher object moves to signaled, the kernel checks whether any
threads are waiting on the object. If so, the kernel moves one thread-or possibly more-from the waiting state to the ready state, where they can resume executing.

Which of the following statements is not true about spinlocks in Linux?

(Multiple Choice)
4.8/5
(35)

A solution to the readers-writers problem that avoids starvation and allows some concurrency among readers is not possible.

(True/False)
4.8/5
(35)

A notify( ) operation in Java monitors

(Multiple Choice)
4.9/5
(31)

Describe the mechanisms used for synchronization in Windows kernel in single and multiprocessor systems. Explain why Windows uses different mechanisms for the two systems.

(Essay)
4.9/5
(36)

In JAVA monitors, when a thread is placed in the entry set, is that thread guaranteed to own the object lock some time in future.

(Essay)
4.9/5
(33)

When the state for a dispatcher object moves to signaled, the Windows kernel

(Multiple Choice)
4.8/5
(30)

In an asymmetric solution for the dining philosophers problem, deadlock is avoided, because

(Multiple Choice)
4.9/5
(26)

Which of the following is true about the two versions of readers-writers problem?

(Multiple Choice)
4.9/5
(30)

Does nested critical sections in OpenMP provide any utility? Explain why.

(Essay)
4.8/5
(27)

In functional programming languages,

(Multiple Choice)
4.8/5
(36)

Allowing at most four philosophers to sit simultaneously prevents deadlock.

(True/False)
4.9/5
(42)

If a thread has the ownership of a Reentrant lock, it will block forever if it calls lock( ) before calling unlock( ).

(True/False)
4.7/5
(42)

Semaphores in JAVA can be initialized to a negative value.

(True/False)
5.0/5
(37)

In Windows, a thread may get preempted while holding a spinlock.

(True/False)
4.8/5
(41)

POSIX named semaphores

(Multiple Choice)
4.8/5
(40)

In the solution for dining philosophers problem using monitors, provide a scenario in which a philosopher may starve to death.

(Essay)
5.0/5
(37)

The solution for bounded buffer problem provided in

(True/False)
4.7/5
(31)
Showing 1 - 20 of 57
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)