Skip to content
TimL03 edited this page Aug 26, 2023 · 5 revisions

At first, you have the starting window to choose the Algorithm and the number of resources. image

The Main-GUI is separated into four different parts, each necessary for the general understanding of deadlocks.

1. Control Panel & Time Stamps

Here you can find:

  • how long the algorithm is already running
  • the currently used algorithm to prevent a deadlock
  • a log-output field where you can see which process acquires how much of a resource
  • the start, stop and restart button

grafik

2. Availability Panel

This panel has many functionalities:

  1. The green colour indicates, that the resource is being used by at least one process
  2. The numbers (e.g. 0/1) show how many of the given resources are being used right now ( 1/1 Printer used)
  3. Processes that use some of the resources at the moment, are listed inside the white label bar

grafik

3. Requirements

  • On the left side of the matrix are the processes.
  • The Top shows different Resources: Printer, CD... -> The numbers inside the matrix: The needed count of resources a process needs to work with.

During the Simulation, you will notice, that the numbers are shrinking. The matrix only shows the still needed resources and subtracts the already acquired ones.

grafik

This is based on the requirements matrix given in the Book by A. Tanenbaum:

grafik

4. Occupation

The Occupation matrix shows which process has which resources and how many of them are occupied right now.

grafik

This is based on the occupation matrix given in the Book by A. Tanenbaum:

image

5. Explanation

This section explains the currently selected algorithm (default) and the general function of the simulation (arrow button to right).

grafik

Clone this wiki locally