G Shaheena Now , coming to your question. No , deadlock is not possible here. No, there is no deadlock. Hope it is clear now :.
Next Qn. Answer: F. Related questions 1 vote. Hardik Vagadia asked in Operating System Jan 9, Suman Acharya asked in Operating System Sep 12, Deadlocks and threads In a non multi programming os, a deadlock will occur due to a. When two process share the same variable b. Can never happen C. When two process run at the same time, waiting for resources held by each other D.
When an interrupt occurs. Nithish asked in Operating System Jan 11, Deadlocks Consider a system with processes P0, P1,P2,. P99, P, each process requires maximum of 4 resources. System has allocated 2 resources to each process. Suman Acharya asked in Operating System Sep 13, Deadlocks and threads Which one of the following is false about user threads 1. User threads can switch fast since it does noy invoke kernel 2. Subjects All categories General Aptitude 2. Follow gateoverflow. GATE Overflow.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 9 years, 6 months ago. Active 3 years, 9 months ago. Viewed 2k times. Improve this question. With a recursive mutex the problem would not occur. Without it it's just an error in the algorithm.
Hold and Wait or Resource Holding: A process is currently holding at least one resource and requesting additional resources which are being held by other processes - no other processes in this case — user Your thread is requesting a resource that is already held by a thread.
That it's the same thread does not matter, just peculiar. Explain your answer. Answer: No. This follows directly from the hold-and-wait condition. It depends on how you precisely define "deadlock". What about this single threaded process calling WaitforEvent with no one avail to signal it? Deadlock involving only one single-threaded process? Last Edit: August 1, PM A deadlock situation can only arise if the following four conditions hold simultaneously in a system: Mutual Exclusion Hold and Wait No Preemption Circular-wait It is impossible to have circular-wait when there is only one single-threaded process.
So it is not possible to have a deadlock involving only one process.
0コメント