Asian Journal of Information Technology

Year: 2014
Volume: 13
Issue: 6
Page No. 356 - 362

Deadlock Maps: A Dynamic Deadlock Detection for Multithreaded Programs

Authors : A. Mohan and P. Senthil Kumar

Abstract: Deadlock freedom is the major challenge in developing multithreading programs. To avoid the potential risk of blocking a program, prior monitoring of threads can be made during the execution process. The proper monitoring scheme can monitor the threads and can identify whether the threads might enter a deadlock stage. It maintains a back up to store the threads. So, after the execution of one thread the injection of the other thread can be made from backup into the processing stage. By using this process the deadlock can be avoided in the multithreading environment. In the proposed system, the thread monitoring and thread mapping techniques are implemented to identify the threads running in the program. A map is present which is used to store the thread objects, the locks acquired and requested by them. Whenever, a thread tries to acquire a lock and if the access is denied, then it waits for certain period of time. After the time period expires, the thread again tries to access the lock. If the access is still denied then the thread traverses the map to identify the threads that have requested or held the same locks requested by it. If it finds any such threads then it detect that deadlock has occurred. The deadlocked threads wait for each other for infinite time. Now, the thread releases all the locks acquired by it, thereby allowing the deadlocked threads to complete their operations. If more than one thread detects deadlock then priorities are assigned to them at random manner. According to the priorities of threads, they wait for a while (i.e., let other threads to complete their operation). According to the priority, thread execution states are changed. It helps the threads to recover from deadlock situation and allows the threads to complete their execution.

How to cite this article:

A. Mohan and P. Senthil Kumar, 2014. Deadlock Maps: A Dynamic Deadlock Detection for Multithreaded Programs. Asian Journal of Information Technology, 13: 356-362.

Design and power by Medwell Web Development Team. © Medwell Publishing 2024 All Rights Reserved