CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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 relasing it. If a thread is unable to acquire a lock, it blocks unitl 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:

A
x = 2, y = 1
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
x = 2, y = 2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
x = 1, y = 1
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
x = 1, y = 2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C x = 1, y = 1
x = 1, y = 1

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Types of Threads
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon