[This](http://docs.oracle.com/javase/tutorial/essential/concurrency/deadlock.html) is the example i was looking at. The docs say that trying to access the bowBack() method is creating the deadlock , but im new to threads , and i really dont understand why this is happening. In need of some guidance here...

Member Avatar
Member Avatar
+0 forum 3

Hi I'm currently going through some questions, basically studying up one bits for my operating systems unit and my particular weakness is algorithms and 'working out' type questions such as this one below. Consider the following snapshot of the system, with 4 types of resources and 3 processes, P1, P2 and P3. Available resources vector A: [4 1 0 1] Current allocation matrix C: P1 [3 1 0 0] P2 [0 0 1 2] Maximum request matrix R: P1 [3 4 4 0] P2 [0 0 1 3] P3 [0 2 3 4] P3 [3 3 4 6] a. What …

Member Avatar
Member Avatar
+0 forum 4

i've just started learning the C# language and this is my first program to use threads. I don't understand why the consumer thread doesn't get called( only after the producer has stopped)and when it gets called it doesn't consume anything, also I've noticed that the majority of produced elements are of the same values. Here is the full code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace Sem_example_luci { class Semaphore { private Object oLock; private int iResourceAccesses; private Boolean isBinary; // private LinkedList<Thread> vWaitingTh; private Semaphore() { this.oLock = new Object(); //this.vWaitingTh = new LinkedList<Thread>(); } …

Member Avatar
+0 forum 0

Is there any method to deal with distributed deadlock when multiple instances are available for each resource type? I think method of wait-for graph and chase algorithm can be used only when single instance of each resource type is available.

Member Avatar
Member Avatar
+0 forum 1

Hi folks, I need a solution for following scenario. 1. Suppose two processes running simulteneously. 2. Process (P1) has already locked a mutex (M1). 3. Process (P2) is trying to lock same mutex (M1) but as it is already locked by (P1), P2 is waiting for unlocking (M1). 4. Now somehow process (P1) terminates or dies wihtout unlocking mutex (M1). 5. (P2) is still waiting for unlocking (M1). But as (P1) is dead now there is no other way to unlock the mutex. 6. In this situation, (P2) experiences a deadlock. How to resolve this kind of situation.

Member Avatar
Member Avatar
+0 forum 2

1) Can a single connection to a MySql database be shared among applications? 2) Are there any possibilities that an error might accure when two applications compete for a single connection to a MySQL database? For example, Application 1 is using the connection to submit an insert operation to the MySQL database. So before Application 1 can complete the insert operation, Application 2 starts to submit an insert operation to the MySQL database. Therefore a deadlock takes place. If so what would you recommend?

Member Avatar
Member Avatar
+0 forum 1

Hi Guys. Is it possible to trap this error in Classic ASP, and redirect to another page instead of displaying this error? [COLOR="Red"] Microsoft OLE DB Provider for SQL Server error '80004005' Transaction (Process ID 104) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.[/COLOR] It happens when a lot of people accessing my intranet site all at the same time. Thanks in advance!

Member Avatar
Member Avatar
+0 forum 1

Hi.Im working on an ASP.NET website.In this application there are some local functions and a call to an external C# exe.Every thing works fine if I use a msgbox control before this form redirects to the output page.If I dont use this msgbox before redirecting, the output is different than expected. More Info:-This C# exe creates a .txt file in a folder and the redirected page just reads that txt file. Question why the output is different with and without using just a msgbox.

Member Avatar
Member Avatar
+0 forum 2

I really need your help on this. What is deadlock? Can someone explain to me in the simplest form what is deadlock in operating systems. How can a process be deadlocked or not. pls. give me examples of resource allocation graph then explain .. I've been reading about deadlocks quite often but still it is unclear to me. I hope someone is kind enough to help me with this.

Member Avatar
Member Avatar
+0 forum 4

Hi, We've got an application running on Tomcat and we've setup Manage Engine's Applications Manager 9.0 to monitor our environment. I've set an alarm that fires whenever a thread is in the "BLOCKED" state at the moment of the polling and I'd like to get a thread dump of that moment so that I can debug the blocks (same for deadlocks). I don't think the monitoring tool offers this possibility by default, but I could execute a batch file from the monitoring server to get that thread dump. The question is, how do I create a batch file that polls …

Member Avatar
+0 forum 0

hello buddies.. i am facing a serious issue with my live site,the site runs smooth for say 1-2hrs or even days,but all of a sudden (not able to reproduce the event on which this is happening)it hangs sometime .And any http request to the site results in IIS hang.the browser progress bar stuck . when i check the event view i found following messages 'c:\windows\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'. and 'a process serving application pool '..' exceed time limits during shut down.The process id was '3576' i tried #1. checking the database connection and …

Member Avatar
+0 forum 0

Hi, i have created a window service with multithreading, but getting many deadlocks on sql in one Stored procedure when i start this service,and after that service does not do anything but in idle mode. the details of exception is below. Error :Wednesday, September 23, 2009 2:22:58 AM Method:UPD_CrawlerLastUrl 1. Transaction (Process ID 68) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. 2. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject …

Member Avatar
Member Avatar
+0 forum 7

The End.