GATE CS 2017 (Forenoon) — Question 27

Operating Systems (OS)Concurrency & Synchronization (Semaphores, Mutex, Monitors, Locks)MCQ2 marks · −2/3 if wrongEasy

A multithreaded program P executes with \(x\) number of threads and uses \(y\) number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock \(l\), then it cannot re-acquire lock \(l\) without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of \(x\) and the minimum value of \(y\) together for which execution of P can result in a deadlock are:
  1. A
    \(x = 1\), \(y = 2\)
  2. B
    \(x = 2\), \(y = 1\)
  3. C
    \(x = 2\), \(y = 2\)
  4. D
    \(x = 1\), \(y = 1\)
Practise the full 2017-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
Practise more on Concurrency & Synchronization (Semaphores, Mutex, Monitors, Locks)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group