Design of Auxiliary Simulator For Analysing The Deadlock Occurrence Using Bankers Algorithm

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

265 2015 International Conference on Advances in ICT for Emerging Regions (ICTer)

Design of Auxiliary Simulator for Analysing the


Deadlock Occurrence using
Banl<er's Algorithm
K.T.S. Kasthuriarachchil, U.U.S.K. Rajapaksha2

Department of Information Technology, Facuity of Computing,


Sri Lanka Institute of Information Technology
Malabe, Sri Lanka

lsanvitha.k@sliit.lk,
2samantha.r@sliit.lk

Keywords- deadlock, algorithm, safe sequence, safe state depicts the values of allocation, current need and maximum
need values with relevant to the available processes. As the
1. INTRODUCTION third step, the available resource count can be generated
based on the total allocation and the initial resource count.
The proposed simulator is an interactive visualization Finally, it checks for a safe state be executing the processes
tool which conveys the behaviour of the Banker's algorithm with considering the current need resource count and
and its operation towards identifying whether there exists available resources.
any deadlocks in the system. This tool has been developed
with the intension of making easier the learning of banker's
algorithm. In addition to providing a visual and animated
view, this is an alternative to a static representation provided
by textbooks and other reference books.

Deadlock means a limited number of resources are


distributed among several competing processes. If a process
requests an instance of a resource type, the allocation of an
instance of the type will satisfy the request. If all the
resource instances are allocated to some processes and the
resource from the same class is requested by another process,
that request cannot be granted and it leads to a deadlock
situation till one of the resource is released by a process. A
deadlock situation can arise due to Mutual exclusion: Hold
and wait, No pre-emption and Circular wait. In order to deal
with deadlocks, a protocol can be used to ensure that the
system will never reaches deadlock, allow the system to
Fig]: Visualization Tool a/Banker's Algorithm
enter a deadlock state and then recover and ignore the
problem and pretend that the deadlocks never occur in the
In order to visualize the behaviour of Banker's algorithm the
system. Deadlock avoidance requires that the operating
snapshot of the tool shown in fig I is implemented using
system will be given additional information about the
Microsoft Visual studio 20 I O. User will be able to feed the
resource requests and whether or not the process should wait.
basic details of the system including the number of processes,
In order to decide whether the request is satisfied or delayed
resource types and the initial count of resources, they will be
the system must consider the resources that are currently
able to input the allocated resource count as well as the
available, the resources that are currently allocated to each
requested resource count through the software application.
process, and the future requests and releases of each process.
In making the algorithm more efficient, declare the
III. CONCLUSION
maximum number of resources (Max Need) for each process.
An algorithm is constructed with these details to ensure that
Once the necessary inputs are given, the tool will display the
the system will never enter to a deadlocked state.
matrix including the total allocation, initial available
resource amounts and the safe sequence. Therefore, this
II. METHOD visualization tool can be used to demonstrate the behavior of
First, the number of processes involves in the execution and Banker's algorithm for deadlock avoidance in operating
the resource details including resource types and the initial system. The users will be able to practice this as a learning
resource count can be entered to the system through a tool for both classroom and individual usage.
graphical user interface. Second, the resource allocation and
requests of processes can be added. Third, the simulator

24'" & 251h August 2015

Authorized licensed use limited to: Santa Clara University. Downloaded on October 19,2022 at 08:22:26 UTC from IEEE Xplore. Restrictions apply.

You might also like